Livestock status detection method, device, electronic device and storage medium

By combining video data for posture tracking and multi-channel audio data for cough detection, the problem of poor detection of single audio data in the existing technology is solved, and the accuracy and credibility of livestock status detection results are improved. Before the disease outbreak, remind relevant personnel to treat livestock in a timely manner.

CN115885884BActive Publication Date: 2025-02-14SHANGHAI IFLYTEK HEGUANG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211600641.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-02-14
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

In the prior art, the livestock status detection effect based on single audio data is poor, resulting in low accuracy and credibility of the detection results.

Method used

By combining video data for posture tracking and multi-channel audio data for cough detection, the cough interval and posture status are determined, and livestock status detection is performed.

Benefits of technology

It has achieved a dual improvement in the accuracy and credibility of livestock status detection results. It can remind relevant personnel to conduct further testing and targeted medication in the early stages of the disease outbreak, reduce the treatment rate and contagiousness, treat livestock in a timely manner, and reduce the losses of farms. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115885884B_ABST
    Figure CN115885884B_ABST
Patent Text Reader

Abstract

The present invention provides a livestock status detection method, device, electronic device and storage medium, wherein the method comprises: determining video data in a livestock pen and audio data of at least two channels; performing cough detection based on the audio data of each channel to obtain the cough interval of each channel; performing posture tracking based on the video data to obtain the livestock posture status; performing livestock status detection based on the cough interval of each channel and the livestock posture status to obtain the livestock status detection result, thereby overcoming the defect of poor detection effect in traditional solutions and achieving a double improvement in the accuracy and credibility of the livestock status detection result. In addition, the livestock status detection result can be used to prevent diseases in livestock, and can remind relevant personnel to perform further detection and targeted medication in the early stage of the disease outbreak, so as to reduce the cure rate and infectiousness, timely treat livestock, and greatly reduce the loss of breeding farms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a livestock status detection method, device, electronic equipment and storage medium. Background Art

[0002] With the development of the livestock industry, people pay more and more attention to the monitoring of livestock growth and development and the prevention of their diseases during livestock breeding. Since the status of livestock is closely related to their disease prevention and growth status, livestock status detection has become a crucial step in the livestock breeding process.

[0003] At present, the livestock status detection process mostly relies on manual labor, that is, the breeders rely on the livestock's performance symptoms to judge their status during the patrol process, and then carry out targeted treatment. However, most livestock are often in the middle and late stages of the disease when they show obvious symptoms. At this time, the cure rate and infectiousness are extremely strong, and it is difficult to treat livestock, which ultimately leads to serious losses to the breeding farm.

[0004] In addition, there are a few schemes that use livestock coughing data for detection and judgment, but the detection effect of such schemes is often poor. The reason is that: the process of judging whether livestock is sick is very complicated, and the credibility of the results obtained by detecting a single coughing data is not high; in addition, most coughing data are mixed with other sounds, and the noise will directly affect the detection results. Summary of the invention

[0005] The present invention provides a livestock status detection method, device, electronic device and storage medium, which are used to solve the defect of poor detection effect based on single audio data in the prior art, and achieve a dual improvement in the accuracy and credibility of livestock status detection results.

[0006] The present invention provides a method for detecting livestock status, comprising:

[0007] determining video data within the corral, and at least two channels of audio data;

[0008] Perform cough detection based on audio data of each channel to obtain a cough interval of each channel;

[0009] Performing posture tracking based on the video data to obtain the posture status of the livestock;

[0010] Based on the coughing intervals of the various channels and the livestock posture conditions, livestock status detection is performed to obtain livestock status detection results.

[0011] According to a livestock status detection method provided by the present invention, the livestock status detection is performed based on the cough intervals of the respective channels and the livestock posture status to obtain the livestock status detection result, including:

[0012] The coughing area is located based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock;

[0013] Based on the audio data of the channel corresponding to the livestock coughing area, cough separation is performed to obtain the number of coughing livestock in the livestock coughing area;

[0014] Determining a livestock coughing trend based on a livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area;

[0015] Based on the livestock coughing tendency and the livestock posture condition, livestock status detection is performed to obtain livestock status detection results.

[0016] According to a livestock status detection method provided by the present invention, the coughing area is located based on the coughing intervals of each channel to obtain the livestock coughing area, including:

[0017] Determine the mean value of the zero-crossing rate of the same cough interval in each channel;

[0018] Based on the zero-crossing rate mean, the coughing area is located to obtain the livestock coughing area;

[0019] Or, a target cough interval is selected from the same cough intervals under each channel, and a cough array is formed based on the target cough interval, wherein the target cough interval is the cough intervals of the channels corresponding to the first preset number of the zero-crossing rate means arranged in order from large to small;

[0020] Based on the odd-even ratio in the cough array, the cough area is located to obtain the livestock cough area, and the odd-even ratio is determined based on the corresponding channel of each target cough interval.

[0021] According to a livestock status detection method provided by the present invention, the cough separation is performed based on the audio data of the channel corresponding to the livestock cough area to obtain the number of coughing livestock in the livestock cough area, including:

[0022] Performing zero-crossing rate detection on the audio data of the channel corresponding to the livestock coughing area, and performing segment fusion based on each cough segment obtained by the zero-crossing rate detection to obtain a continuous cough segment;

[0023] Determine the number and type of coughing animals corresponding to the continuous coughing segments based on the sound intervals in the continuous coughing segments and / or the coughing frequencies corresponding to the continuous coughing segments;

[0024] In the case that the type of the number of coughing livestock is not a single animal, hierarchical clustering is performed on the continuous cough segments to obtain livestock cough segments in units of animals, and the segments are combined based on the feature similarity between the audio features of each livestock cough segment to obtain the number of coughing livestock.

[0025] According to a livestock status detection method provided by the present invention, the cough detection is performed based on the audio data of each channel to obtain the cough interval of each channel, including:

[0026] Performing one-dimensional convolution on the audio data of each channel to obtain one-dimensional convolution features of each channel;

[0027] Extracting audio features of the audio data of each channel, and performing two-dimensional convolution on the audio features to obtain two-dimensional convolution features of each channel;

[0028] Based on the frequency correlation between the one-dimensional convolution features of the channels and the channel correlation and spatial correlation between the two-dimensional convolution features of the channels, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused;

[0029] Cough detection is performed based on the fused features of each channel to obtain the cough intervals of each channel.

[0030] According to a livestock status detection method provided by the present invention, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused based on the frequency correlation between the one-dimensional convolution features of each channel and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, including:

[0031] Determine a first attention weight of the one-dimensional convolutional features of each channel based on the frequency correlation between the one-dimensional convolutional features of each channel;

[0032] Determine the second attention weights of the two-dimensional convolution features of each channel based on the channel correlation and spatial correlation between the two-dimensional convolution features of each channel;

[0033] Based on the first attention weight and the second attention weight, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused.

[0034] According to a livestock state detection method provided by the present invention, the livestock posture status includes various livestock postures, duration of the various livestock postures, and the duration change trend of the duration, and the various livestock postures include at least one of a standing posture, a dog-sitting posture, a side-lying posture, and a lying posture;

[0035] The livestock coughing trend includes at least one of a regional change trend of the livestock coughing area, a number change trend of the number of coughing livestock in the livestock coughing area, and an overall change trend of the number of coughing livestock in the livestock pen.

[0036] According to a livestock status detection method provided by the present invention, the livestock status detection is performed based on the livestock coughing trend and the livestock posture status to obtain the livestock status detection result, including:

[0037] When the duration of the non-standing posture in the livestock posture condition is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, determining that the livestock status detection result is a warning state;

[0038] When the duration of the non-standing posture in the livestock posture condition is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, the livestock status detection result is determined to be a warning state.

[0039] According to a livestock status detection method provided by the present invention, the livestock status is obtained by performing posture tracking based on the video data, including:

[0040] Performing posture detection based on each video frame in the video data to obtain a posture detection result for each video frame;

[0041] Based on the posture detection results of each video frame and the video data, posture tracking is performed to obtain the posture status of the livestock.

[0042] The present invention also provides a livestock status detection device, comprising:

[0043] A data determination unit, used to determine video data in the livestock pen and audio data of at least two channels;

[0044] a cough detection unit, configured to perform cough detection based on audio data of each channel to obtain a cough interval of each channel;

[0045] A posture tracking unit, used for performing posture tracking based on the video data to obtain the posture status of the livestock;

[0046] The state detection unit is used to perform livestock state detection based on the coughing intervals of the respective channels and the livestock posture conditions to obtain livestock state detection results.

[0047] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the livestock status detection method as described above is implemented.

[0048] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the livestock status detection method as described in any one of the above is implemented.

[0049] The livestock status detection method, device, electronic device and storage medium provided by the present invention perform cough detection through audio data of each channel, determine the cough interval of each channel in combination with the cough detection result at the frame level, perform posture tracking through video data, and obtain the livestock posture status; combine the cough interval of each channel and the livestock posture status to jointly perform livestock status detection, overcome the defect of poor detection effect based on single audio data in traditional schemes, and achieve double improvement of accuracy and credibility of livestock status detection results. In addition, the livestock status detection results can be used for disease prevention of livestock, and can remind relevant personnel to conduct further detection and targeted medication in the early stage of the disease outbreak, so as to reduce the cure rate and infectiousness, timely treat livestock, and greatly reduce the loss of farms. At the same time, the automated livestock status detection process avoids the subjectivity and uncertainty of manual detection and judgment, and also saves the time and energy required for manual judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 It is a schematic diagram of the flow of the livestock status detection method provided by the present invention;

[0052] Figure 2 is a flow chart of step 140 in the livestock status detection method provided by the present invention;

[0053] Figure 3 is a flow chart of step 141 in the livestock status detection method provided by the present invention;

[0054] Figure 4 is a schematic diagram of the distribution of cough intervals in a zero-crossing rate statistical diagram provided by the present invention;

[0055] Figure 5is a flow chart of step 142 in the livestock status detection method provided by the present invention;

[0056] Figure 6 is a flow chart of step 120 in the livestock status detection method provided by the present invention;

[0057] Figure 7 Schematic diagram of the cough detection process provided by the present invention;

[0058] Figure 8 is a flow chart of step 123 in the livestock status detection method provided by the present invention;

[0059] Fig. 9 is a flow chart of step 130 in the livestock status detection method provided by the present invention;

[0060] Fig.10 It is the overall framework diagram of the livestock status detection method provided by the present invention;

[0061] Fig.11 It is a structural schematic diagram of the livestock status detection device provided by the present invention;

[0062] Fig.12 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0064] In livestock farming, the status of livestock is closely related to its disease prevention and growth status. Therefore, livestock status detection has become an indispensable step in the livestock farming process. Taking pig farms as an example, the incidence of respiratory diseases in pigs in pig farms is high. After suffering from respiratory diseases, pigs lose their appetite, have low nutrient absorption efficiency, grow slowly, and are also accompanied by symptoms such as coughing and difficulty breathing. Especially in the late nursery and fattening periods, the incidence of respiratory diseases in pigs is extremely high and highly contagious. At this time, if the status of pigs can be known in advance, diseases can be prevented, thereby protecting pig farming.

[0065] At present, livestock status detection is mostly done manually, that is, the breeders rely on the livestock's performance symptoms to judge their status during the inspection process, such as frequent coughing, decreased appetite, etc., and then carry out targeted treatment. However, when the livestock show obvious symptoms, most of them are already in the middle and late stages of the disease. It is too late to treat them at this time, which ultimately causes serious losses to the farm.

[0066] Furthermore, with the development of deep learning technology, there are still a few solutions for livestock disease detection and judgment through deep learning models, that is, using cough sample data and its corresponding disease type labels to pre-train a livestock disease detection model, which records the mapping relationship between livestock cough data and disease types. Therefore, when the cough data is input into the livestock disease recognition model, the disease type corresponding to the cough data can be output accordingly.

[0067] However, although such solutions can detect and judge livestock diseases, their detection results are often poor. The reasons are: first, the cough data used for detection are mostly mixed with other sounds, such as the eating sounds and humming sounds of pigs, and the noise will directly affect the detection results; second, the process of judging livestock diseases is very complicated, and the accuracy and credibility of the results obtained by detecting a single cough data are not high.

[0068] In this regard, the present invention provides a livestock status detection method, which aims to perform cough detection through audio data in a livestock pen, determine the cough interval of each channel through frame-level cough detection results, and on this basis, combine the livestock posture status obtained through video data analysis to jointly perform livestock status detection, thereby achieving a dual improvement in the accuracy and credibility of the livestock status detection results. In addition, the livestock status detection results can be used to prevent diseases in livestock, and can remind relevant personnel to conduct further testing and targeted medication in the early stage of a disease outbreak, so as to reduce the treatment rate and infectiousness, timely treat livestock, and significantly reduce the losses of farms.

[0069] In addition, the automated livestock status detection process can avoid the subjectivity and uncertainty of manual detection and judgment in traditional solutions, and also save the time and energy required for manual judgment. The method provided by the present invention can be applied to pigs and other animals; for the convenience of explanation, the following embodiments are described by taking the status detection of pigs as an example. Figure 1 Schematic diagram of the livestock status detection method provided by the present invention, such as Figure 1 As shown, the method includes:

[0070] Step 110, determining video data in the livestock pen and audio data of at least two channels;

[0071] Specifically, before performing livestock status detection, it is first necessary to determine the detection object and its corresponding audio data and video data. The detection object here is the livestock in the livestock pen, which can be the pigs in the pig house. Since the coverage area of ​​the pig house in the farm is usually very wide, a single sound pickup component is often difficult to collect audio data of the pigs in all pig house units. Therefore, in the embodiment of the present invention, multiple sound pickup components are deployed in different areas of the livestock pen to cover the entire livestock pen, wherein the number of channels between the sound pickup components is different, so that the audio data in the livestock pen can be picked up by the sound pickup components of each channel. Here, the sound pickup component can be a microphone, a monitoring head, etc., and its number of channels can be set accordingly according to actual conditions, actual needs, etc.

[0072] After obtaining the audio data of each channel, it can be further processed for subsequent cough detection, that is, the audio data can be used to establish a corresponding audio feature data set. Specifically, the audio data can be denoised and then its audio features can be extracted. The audio features here can be Fbank (Filter bank), PCEN (Per-channel energy normalization), CQT (constant Q transform) features, log mel features (log melspectrogram features, log mel spectrum features), etc.

[0073] Corresponding to the audio data, the video data in the livestock pen can be collected by the image acquisition device. Corresponding to the difficulty of collecting the audio data of all livestock by a single sound pickup component, a single image acquisition device here is also unable to collect the image data of all livestock. Therefore, in order to better and more comprehensively detect the posture of livestock, in the embodiment of the present invention, an image acquisition device can be installed above or on the side of each stall in the livestock pen, or image acquisition devices can be installed in different directions in the same stall at the same time. The embodiment of the present invention does not specifically limit this. The image acquisition device here is an electronic device with a video / recording function, which can be a camera, a webcam, etc.

[0074] In the embodiment of the present invention, the acquisition of audio data and video data provides data support for subsequent cough detection and posture tracking based on the audio data and video data, and lays a foundation for livestock status detection combining cough status and posture status. In addition, compared with traditional solutions, the supplementation of video data in the embodiment of the present invention can help improve the accuracy of livestock status detection results.

[0075] Step 120, performing cough detection based on the audio data of each channel to obtain a cough interval of each channel;

[0076] Specifically, after obtaining the audio data of each channel in the livestock pen, cough detection can be performed based on the audio data to determine the cough interval of each channel. The specific process may include:

[0077] First, it is necessary to determine the audio features of the audio data of each channel, that is, the audio features of each channel. The audio features here can be obtained by extracting features from the audio data, which can be one or more of Fbank, PCEN, CQT features, and log mel features;

[0078] Then, a dual-stream branch method can be used to process the audio data and the audio features respectively to obtain the features of the two branches. The features of the two branches can then be fused, and cough detection can be performed based on the fused features to finally obtain the cough intervals of each channel.

[0079] Specifically, in the first branch, a first convolution operation can be performed on the audio data of each channel through a continuous convolution module to extract the convolution features of different channels, thereby obtaining the first convolution features of each channel, and then processed through the frequency attention mechanism, that is, the first convolution features of each channel are input into the frequency attention mechanism to learn the importance of different frequency units to the first convolution features of each channel, that is, to pay attention to the frequency correlation between the first convolution features of each channel, and finally the features of the first branch can be obtained.

[0080] Correspondingly, in the second branch, the second convolution operation can be performed on the audio features of each channel through a continuous convolution module different from the first branch to extract the convolution features of different channels, thereby obtaining the second convolution features of each channel. It is worth noting that the audio feature here can be one of the features listed above, or multiple. In the case of multiple features, it must be a combination of multiple features, and the combination method is required to be a connect fusion that keeps the time axis unchanged, so as to ensure the consistency of the features in time sequence;

[0081] Next, it can be processed through a hybrid attention mechanism, which includes a channel attention mechanism and a spatial attention mechanism. That is, the second convolution features of each channel are input into the hybrid attention mechanism to learn the importance of different feature dimensions and different channels to the second convolution features of each channel, that is, pay attention to the channel correlation and spatial correlation between the second convolution features of each channel, and finally the characteristics of the second branch can be obtained.

[0082] Afterwards, the features of the first branch and the second branch can be fused. The audio length needs to be kept unchanged during the fusion, so that the fused features of each channel can be obtained, and the fused features can be used to perform cough detection to obtain frame-level cough detection results, that is, the cough detection results of each audio frame. The cough detection result can indicate whether the corresponding audio frame is a cough audio frame, and combined with the cough detection results of each audio, the cough interval in the audio data of each channel, that is, the cough interval of each channel, can be determined.

[0083] It should be noted that since the cough interval is determined based on the frame-level cough detection result, and the sampling frame rate of the audio data is very high, the cough interval of each channel obtained here is very accurate, specifically, it can be accurate to the millisecond level.

[0084] Step 130, tracking the posture of the livestock based on the video data to obtain the posture status of the livestock;

[0085] Specifically, after determining the video data in the livestock pen, the video data can also be used for posture tracking to obtain the livestock posture status. The specific process includes the following steps:

[0086] Since the symptoms of livestock diseases are mostly manifested not only at the sound level but also at the movement level, such as respiratory diseases of pigs are often accompanied by posture changes, the livestock posture status can be obtained with the help of video data in the embodiments of the present invention. The livestock posture status here includes various postures of the livestock, the duration of each posture, and the changes in the duration.

[0087] Specifically, we can first use video data as a benchmark to perform posture detection on livestock, so as to obtain the posture detection results of livestock. The posture detection here is also frame-level, that is, posture detection is performed on each video frame to obtain the posture detection results of each video frame. Since the differences between the postures of livestock are quite obvious, such as pigs standing, pigs lying on the ground, pigs sitting, pigs lying on their sides, etc., we can directly use the conventional posture detection model here to perform posture detection without specially training the target detection model for large targets, which saves time and energy and promotes the livestock status detection process.

[0088] Then, based on the posture detection results of each video frame, the video data can be used to track the posture of the livestock, so as to obtain the posture status of the livestock. Specifically, the posture detection results of each video frame are used as a benchmark, and the postures of different livestock are tracked in combination with the target tracking algorithm. When the posture of the livestock changes, the tracking is terminated, while the identity identification number of the tracking target is kept unchanged, and the next tracking is started. Finally, the postures of different livestock, the duration of each posture, and the change in duration, that is, the posture status of the livestock, can be obtained.

[0089] In the embodiment of the present invention, posture detection is performed with the help of video data, which can provide livestock posture conditions for subsequent livestock status detection, thereby making the information of the livestock status detection process more comprehensive, the viewing angle more perfect, and the accuracy of the livestock status detection results obtained by detection higher.

[0090] Step 140 , based on the coughing intervals of each channel and the posture of the livestock, livestock status detection is performed to obtain livestock status detection results.

[0091] Specifically, after the cough interval of each channel is obtained through cough detection, and the livestock posture status is obtained through posture tracking, the livestock status detection can be performed based on the two to obtain the livestock status detection result. The specific process includes the following steps:

[0092] First, the coughing trend can be determined by the coughing interval of each channel, that is, the coughing interval of each channel within the preset time range is determined by combining the audio data within the preset time range to determine whether the coughing trend of the livestock is an upward trend, a stable trend, or a downward trend. The trend judgment here can be at the regional level, at the livestock level under the regional level, at the livestock pen level, or at multiple levels above, and the embodiment of the present invention does not make specific limitations on this;

[0093] Among them, the upward trend indicates that the livestock's cough is becoming more serious and the symptoms are getting worse; on the contrary, the downward trend indicates that the livestock's cough is becoming more stable and improving, and the symptoms are being alleviated; correspondingly, the stable trend indicates that the livestock's cough is becoming more stable and the symptoms are gradually stabilizing.

[0094] Then, livestock status detection can be performed based on the livestock coughing trend and livestock posture status, that is, combining the livestock coughing trend and livestock posture status to detect whether the livestock status is a warning state. Specifically, the livestock status can be detected and determined by referring to the changing trend of the livestock posture and its duration reflected by the livestock posture status, and the changing situation of the livestock coughing symptoms reflected by the livestock coughing trend, so as to obtain the livestock status detection result.

[0095] Here, the livestock status detection result is a warning state or a non-warning state. The warning state indicates that the livestock symptoms are aggravated, the condition is not good, and there is a risk of disease, so a warning is required, waiting for further detection and judgment by relevant personnel; correspondingly, the non-warning state indicates that the livestock symptoms have improved / not obvious, there is no obvious risk of disease, so no warning is required.

[0096] The livestock status detection method provided by the present invention performs cough detection through audio data of each channel, determines the cough interval of each channel in combination with the cough detection result at the frame level, and performs posture tracking through video data to obtain the livestock posture status; livestock status detection is performed together with the cough interval of each channel and the livestock posture status, thereby overcoming the defect of poor detection effect based on single audio data in the traditional scheme, and achieving a double improvement in the accuracy and credibility of the livestock status detection result. In addition, the livestock status detection result can be used for disease prevention of livestock, and can remind relevant personnel to conduct further detection and targeted medication in the early stage of the disease outbreak, so as to reduce the cure rate and infectiousness, timely treat livestock, and greatly reduce the loss of farms. At the same time, the automated livestock status detection process avoids the subjectivity and uncertainty of manual detection and judgment, and also saves the time and energy required for manual judgment.

[0097] Based on the above embodiments, Figure 2 is a flow chart of step 140 in the livestock status detection method provided by the present invention, such as Figure 2 As shown, step 140 includes:

[0098] Step 141, locating the coughing area based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock;

[0099] Step 142, performing cough separation based on the audio data of the channel corresponding to the livestock coughing area, and obtaining the number of coughing livestock in the livestock coughing area;

[0100] Step 143, determining the livestock coughing trend based on the livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area;

[0101] Step 144, based on the coughing tendency of the livestock and the posture of the livestock, perform livestock status detection to obtain a livestock status detection result.

[0102] Specifically, in step 140, the process of performing livestock status detection using the cough intervals of each channel and the livestock posture status to obtain the livestock status detection result includes the following steps:

[0103] Since the coughing area and the number of coughs of livestock in the livestock pen are very important for the judgment of the livestock coughing area, after the coughing interval of each channel is obtained through cough detection, the coughing area can be located and the number of coughing livestock can be judged, and trend judgment can be made based on this.

[0104] Step 141, firstly, the cough intervals of each channel obtained by cough detection may be used to locate the cough area, so as to obtain the cough area of ​​the livestock. Specifically, in the actual test process, it is found that the distribution of most cough intervals in the zero-crossing rate statistical map has significant regionality. Therefore, the distribution characteristics of the cough intervals of each channel in the zero-crossing rate statistical map may be used here to locate the cough area of ​​the livestock in the livestock pen, so as to determine the cough area of ​​the livestock;

[0105] Here, locating the coughing area in the livestock pen not only helps to determine the trend of livestock coughing, but also helps relevant personnel quickly and accurately find the source of the coughing sound, so that they can quickly find the source when the disease occurs and cut off the spread of the disease based on the source.

[0106] Step 142, the audio data of the channel corresponding to the livestock coughing area can be determined, that is, the sound pickup component in the livestock coughing area is determined, and the audio data collected by the sound pickup component is the audio data of the channel corresponding to the livestock coughing area. Then, cough separation can be performed based on the audio data to determine the number of coughing livestock in the livestock coughing area, that is, through cough separation, it is determined whether the cough sound in the audio data of the channel corresponding to the livestock coughing area is emitted / generated by a single livestock or emitted / generated by multiple livestock;

[0107] Here, when performing cough separation, since the coughing habits of livestock are mostly relatively stable, that is, the coughing of livestock is mostly continuous, the coughing duration is mostly within a fixed range, and there is mostly a stable time interval between the cough sounds, therefore, in an embodiment of the present invention, the coughing habits of livestock can be used to perform cough separation on the audio data of the channel corresponding to the livestock coughing area to determine the number of coughing livestock in the livestock coughing area.

[0108] Step 143, the livestock coughing trend can be determined based on the livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area, so as to obtain the livestock coughing trend. The preset time range here can be several consecutive days, several cycles / treatment courses, or several months. The specific time can be set accordingly according to actual conditions. Specifically, the livestock coughing area within the preset time range and the number of livestock coughing in the area are first counted, and then the statistical data are compared at one or more of the regional level, the livestock level under the regional level, and the livestock pen level to determine the livestock coughing trend;

[0109] Here, the livestock coughing trend may be one or more of a regional change trend of the livestock coughing area in the livestock pen within a preset time range, a number change trend of the number of livestock coughs in the livestock coughing area, and an overall change trend of the number of livestock coughs in the livestock pen.

[0110] Step 144, thereafter, the state detection can be performed in combination with the livestock coughing trend and the livestock posture status to obtain the livestock state detection result, that is, the livestock state is detected and determined based on the changing trend of the livestock posture and its duration reflected by the livestock posture status, and the changing situation of the livestock cough symptoms reflected by the livestock coughing trend. Specifically, it can be based on at least one of the regional changing trend of the livestock coughing area in the livestock coughing area, the number changing trend of the number of livestock coughs in the livestock coughing area, and the overall changing trend of the number of livestock coughs in the livestock pen, as well as one or more of the various livestock postures in the livestock posture status, the duration of each livestock posture, and the duration changing trend, to detect whether the livestock state is a warning state, thereby obtaining the livestock state detection result.

[0111] Compared with the traditional scheme that ignores the noise inserted in the cough data, and the positioning of the cough area and the determination of the number of coughs, so that the accuracy and credibility of the detection results are not high, in the embodiment of the present invention, the positioning of the cough area can help to quickly and accurately find the source of the disease, and on this basis, the number of coughing livestock in the corresponding livestock cough area is determined by cough separation, and then the cough trend analysis is performed in combination with the livestock cough area within a certain time range and the number of coughing livestock therein, and livestock status detection is performed in combination with the livestock cough trend and the livestock posture status of posture tracking, which not only realizes accurate and efficient livestock status detection, but also provides key auxiliary information for subsequent manual determination of livestock diseases.

[0112] Based on the above embodiments, Figure 3 is a flow chart of step 141 in the livestock status detection method provided by the present invention, such as Figure 3 As shown, step 141 includes:

[0113] Step 141-1, determining the mean value of the zero-crossing rate of the same cough interval in each channel;

[0114] Step 141-2, based on the zero-crossing rate mean, locate the coughing area to obtain the livestock coughing area; or,

[0115] Step 141-3, selecting a target cough interval from the same cough intervals under each channel, and forming a cough array based on the target cough interval, wherein the target cough interval is the cough interval of the channels corresponding to the first preset number of zero-crossing rate means arranged in descending order;

[0116] Step 141 - 4 , based on the odd-even ratio in the cough array, the cough area is located to obtain the livestock cough area, and the odd-even ratio is determined based on the corresponding channel of each target cough interval.

[0117] Specifically, in step 141, the process of locating the coughing area according to the coughing intervals of each channel, thereby obtaining the coughing area of ​​the livestock, may include the following steps:

[0118] Since the distances between the sound source (the livestock making the sound in the livestock pen) and the sound pickup components of each channel are different, the sound strengths in the audio data collected by the sound pickup components of each channel are also different. The sound pickup components that are farther away from the sound source have weaker sound intensity; conversely, the sound pickup components that are closer to the sound source have stronger sound intensity.

[0119] Furthermore, since the cough intervals in the audio data of each channel have obvious distribution characteristics in the zero crossing rate (ZCR) statistical diagram, in the embodiment of the present invention, the cough area can be located by means of the zero crossing rate mean of the same cough interval under different channels to determine the cough area of ​​the livestock. Figure 4 Schematic diagram of the distribution of cough intervals in the zero-crossing rate statistical diagram provided by the present invention, such as Figure 4 As shown, its distribution has the following characteristics:

[0120] First, the distribution of most cough intervals is significantly regional;

[0121] Second, when the channels were divided into two groups (1357 in one group and 2468 in another), the ZCR performance of cough in these two groups was clearly different;

[0122] Third, when the channels are divided into two groups (1234 in one group and 5678 in another), some coughs are clearly distinguished between the two groups;

[0123] Fourth, when the channels are divided into six groups (13, 35, 57, 24, 46 and 68 are each a group), cough is prominent in one part but not in the others.

[0124] Specifically, the process of locating the cough area using the zero-crossing rate mean may include:

[0125] Step 141-1, first determine the mean zero-crossing rate of the same cough interval under each channel, that is, first determine the same cough interval under different channels, and then calculate the ZCR mean of the cough interval corresponding to each channel, so as to obtain the mean zero-crossing rate of the same cough interval under each channel;

[0126] Step 141-2, the cough area can be directly located by using the mean zero-crossing rate of the same cough interval under each channel to obtain the livestock cough area. Specifically, the size of the mean zero-crossing rate of the same cough interval under different channels can be directly compared to determine the channel corresponding to the maximum zero-crossing rate mean. The area where the sound pickup component corresponding to the channel is located is the livestock cough area, and the cough interval of the channel is the cough segment of the livestock in the livestock cough area.

[0127] Step 141-3, or the target cough interval can be selected from the same cough interval under each channel based on the mean value of the zero-crossing rate of the same cough interval under each channel, specifically, the mean values ​​of the zero-crossing rate are sorted in order from large to small or from small to large, and the first preset number or the last preset number of mean values ​​of the zero-crossing rate are selected, where the preset number can be set according to the actual situation, for example, it can be 3, 4, 5, etc.; and preferably, the preset number is determined to be 4, that is, the largest 4 mean values ​​of the zero-crossing rate are selected from the sequence of the mean values ​​of the zero-crossing rate;

[0128] Next, it is necessary to determine the cough interval of the channel corresponding to each selected zero-crossing rate mean, which is the target cough interval. Then, the cough array of the target cough interval component can be used, that is, the number of channels corresponding to the selected target cough interval is formed into an array, thereby obtaining the cough array;

[0129] Step 141-4, after that, the cough area can be located according to the odd-even ratio in the cough array to obtain the livestock cough area. Specifically, the odd-even situation of the number of channels in the cough array is first determined, and the respective ratios of odd and even numbers are determined, that is, the odd-even ratio in the cough array, and then the odd-even ratio is used for judgment, that is, when the odd channel is larger than the even channel, the even channel is excluded and the odd channel is selected, and the channel corresponding to the maximum zero-crossing rate mean is selected from the odd channel, and the channel corresponds to the area where the sound pickup component is located, that is, the livestock cough area;

[0130] On the contrary, when the even channel is larger than the odd channel, the odd channel is excluded and the even channel is selected, and the channel corresponding to the maximum zero-crossing rate mean is selected from the even channels. This channel corresponds to the area where the sound pickup component is located, namely the livestock coughing area; and when the odd and even numbers are equal, the channel corresponding to the maximum zero-crossing rate mean is directly selected from all channels. This channel corresponds to the area where the sound pickup component is located, namely the livestock coughing area.

[0131] In the embodiment of the present invention, the cough area is located by using the average of the zero-crossing rate of the same cough interval under different channels, which can not only provide data support for the judgment of the cough trend, but also help relevant personnel to accurately locate the source of the disease when the disease occurs, so as to cut off the disease transmission based on the source in time.

[0132] Based on the above embodiments, Figure 5 is a flow chart of step 142 in the livestock status detection method provided by the present invention, such as Figure 5 As shown, step 142 includes:

[0133] Step 142-1, performing zero-crossing rate detection on the audio data of the channel corresponding to the livestock coughing area, and performing segment fusion based on each cough segment obtained by the zero-crossing rate detection to obtain a continuous cough segment;

[0134] Step 142-2, based on the sound interval in the continuous cough segment and / or the cough frequency corresponding to the continuous cough segment, determine the number and type of coughing animals corresponding to the continuous cough segment;

[0135] Step 142-3, when the type of the number of coughing livestock is not a single animal, hierarchical clustering is performed on the continuous coughing segments to obtain livestock cough segments in units of animals, and the segments are combined based on the feature similarity between the audio features of each livestock cough segment to obtain the number of coughing livestock.

[0136] Specifically, in step 142, the process of performing cough separation according to the audio data of the channel corresponding to the livestock coughing area to obtain the number of coughing livestock in the livestock coughing area specifically includes:

[0137] Since the coughing of livestock is mostly continuous, the duration of coughing is mostly within a fixed range, and there is a stable time interval between coughing sounds, in short, the coughing habits of livestock are mostly relatively stable. Therefore, based on the audio data of the corresponding channel of the livestock coughing area, we can use the coughing habits of these livestock to determine whether the coughing sound is emitted / generated by a single livestock or multiple livestock. Specifically:

[0138] Step 142-1, firstly, continuous cough segments need to be identified from the audio data of the corresponding channel. Specifically, zero-crossing rate detection can be performed on the audio data of the channel corresponding to the livestock coughing area to extract the cough segments in the audio data through ZCR detection. Then, the extracted cough segments can be merged to determine the continuous cough segments, that is, the coughing habits of the livestock (including the coughing interval and coughing duration of a single / multiple livestock) are used to merge the extracted cough segments to obtain the continuous cough segments.

[0139] Here, it is worth noting that, in order to ensure the accuracy of the subsequent cough separation process, the continuous cough segment can also be tested in the embodiment of the present invention to verify whether the merged continuous cough segment is a sound segment of a continuous cough. The specific process includes: calculating one or more of the duration of a single sound in the continuous cough segment, the energy of a single sound, the time interval between two sounds, and the cough detection result of the audio frame corresponding to a single sound, so as to determine whether the continuous cough segment is a real sound segment of a continuous cough.

[0140] Step 142-2, then the number of coughing livestock corresponding to the continuous coughing segment can be preliminarily determined, that is, the type of the number of coughing livestock corresponding to the continuous coughing segment can be determined, and the type of the number of coughing livestock can be single or multiple, that is, whether it is emitted by a single livestock or multiple livestock. Specifically, the type of the number of coughing livestock can be determined based on the sound interval in the continuous coughing segment and / or the cough frequency corresponding to the continuous coughing segment, that is, the continuous coughing segment can be separated into single sounds, and the minimum and average values ​​of the time intervals between the sounds can be calculated, that is, the minimum and average values ​​of the sound intervals in the continuous coughing segment. If the minimum value of the sound interval is much smaller than the average value, it can be determined that the type of the number of coughing livestock is multiple; correspondingly, if the minimum value and the average value of the sound interval are slightly different, it can be determined that the type of the number of coughing livestock is single.

[0141] Alternatively, the number of coughs per unit time represented by the continuous cough segment, that is, the cough frequency corresponding to the continuous cough segment, can be calculated. If the cough frequency exceeds the preset threshold, it can be determined that the number and type of coughing livestock corresponding to the continuous cough segment is multiple, otherwise it is a single one.

[0142] Alternatively, the sound intervals in the continuous cough segments and the cough frequencies corresponding to the continuous cough segments can be calculated at the same time, and the coughing livestock number types can be determined based on the two. The preset number threshold here is a pre-set value for determining the coughing livestock number type, which can be set accordingly according to actual needs, actual conditions, etc.

[0143] Step 142-3, after that, the continuous coughing segments of the coughing livestock number type are multiple, so as to separate them into multiple coughing segments of single livestock. Specifically, hierarchical clustering can be performed on the continuous coughing segments to obtain livestock coughing segments in units of livestock, that is, the continuous coughing segments are regarded as coughing segments of two livestock, and hierarchical clustering is used to separate them and merge them into coughing segments of single-valued livestock, so as to obtain livestock coughing segments in units of livestock; after that, cough detection can be performed on each segment in the livestock coughing segment, aiming to eliminate the non-coughing segments therein, so as to achieve the purpose of rejecting the non-coughing segments.

[0144] After that, it is necessary to reorganize the cough segments of each livestock to merge the cough segments of the same livestock together to obtain the final cough segments of each livestock. At the same time, the number of coughing livestock is also determined. Specifically, the feature similarity between the audio features of each livestock cough segment is used to combine the cough segments of each livestock to obtain the number of coughing livestock.

[0145] Specifically, the audio features of each livestock cough segment can be averaged, multiple frames can be averaged into one frame, and then clustering can be started, that is, using improved k-means (cosine distance, Euclidean distance, etc. are used as distance metrics, and the initial centroid is the mean point of each continuous cough segment) to cluster two consecutive cough segments and define a probability value. In this way, a probability value matrix can be obtained, with the diagonal being 0 and the remaining values ​​being the probability values ​​of the corresponding clusters. The larger the probability value, the larger the interval between the two categories, and the less likely they are to be merged.

[0146] Next, it is necessary to determine the row and column where the minimum probability value is located from the probability value matrix and merge them, then calculate the probability value between the merged fragment and the remaining fragments, delete the two merged fragments from the probability value matrix, add the merged fragment, and repeat the cycle until the minimum probability value in the probability value matrix meets the preset threshold, then stop the cycle, and the result obtained at this time is the clustering result, that is, the final coughing fragment of each livestock. At the same time, the number of coughing livestock can also be determined.

[0147] In an embodiment of the present invention, by performing cough separation on the audio data of the channel corresponding to the livestock coughing area, the number of coughing livestock in the livestock pen can be accurately determined, thereby providing data support for the subsequent determination of the livestock coughing trend, and also helping relevant personnel to accurately determine the number of livestock cases and the scope of infection when the disease occurs.

[0148] Based on the above embodiments, Figure 6 is a flow chart of step 120 in the livestock status detection method provided by the present invention, such as Figure 6 As shown, step 120 includes:

[0149] Step 121, performing one-dimensional convolution on the audio data of each channel to obtain a one-dimensional convolution feature of each channel;

[0150] Step 122, extracting audio features of the audio data of each channel, and performing two-dimensional convolution on the audio features to obtain two-dimensional convolution features of each channel;

[0151] Step 123, based on the frequency correlation between the one-dimensional convolution features of each channel, and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused;

[0152] Step 124 , performing cough detection based on the fused features of each channel, and obtaining the cough interval of each channel.

[0153] Specifically, in step 120, the process of performing cough detection using the audio data of each channel to obtain the cough interval of each channel specifically includes the following steps:

[0154] Figure 7 is a schematic diagram of the framework of the cough detection process provided by the present invention, such as Figure 7 As shown, in the embodiment of the present invention, a dual-stream branch method is used when performing cough detection, and the audio data and audio features are processed separately to obtain the features of the two branches, and then cough detection can be performed based on the fusion features of the two branches, and finally the cough interval of each channel is obtained. Specifically:

[0155] Step 121, in the first branch, the audio data can be processed first, that is, two one-dimensional convolution modules are used to perform one-dimensional convolution on the audio data after preliminary noise reduction. Here, the one-dimensional convolution module includes three filters and normalization layers with different lengths and step sizes. Adjusting the length and step size can adjust the frame size of the audio. For example, the audio sampling rate of 1 second is 16000. After two one-dimensional convolution modules (with step sizes of (5, 4, 4) and (4, 2, 1) respectively), it can be obtained One-dimensional convolution feature of the frame. After the audio data of each channel passes through the one-dimensional convolution module, the one-dimensional convolution feature of each channel can be obtained. The size of the one-dimensional convolution feature is T*C, where T is the frame length of the audio and C is the number of channels.

[0156] Step 122, in the second branch, firstly, the audio features of the audio data can be processed. The audio features here are obtained by extracting features from the audio data. They can be any one of Fbank, PCEN, CQT features, log mel features, or a combination of multiple features. The combination method must be a connect fusion that keeps the time axis unchanged, so that the consistency of the features in time sequence can be guaranteed; that is, two two-dimensional convolution modules are used to perform two-dimensional convolution (feature extraction) on the audio features. Here, each two-dimensional convolution module includes three convolution layers, three BN (Batch-Normalization) layers, and a pooling layer along the time series. The pooling layer can keep the time series unchanged. The audio features of each channel can obtain the two-dimensional convolution features of each channel after passing through the two two-dimensional convolution modules. The size of the two-dimensional convolution feature is T*F*C, where F represents the feature dimension.

[0157] Step 123 may be based on the frequency correlation between the one-dimensional convolution features of each channel, and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, to fuse the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel. Specifically, in the first branch, the number of channels C of the one-dimensional convolution features may be divided into M groups to satisfy Each group contains G frequency units, and finally a one-dimensional convolution feature of size T*G*M can be obtained. Then the one-dimensional convolution feature can be input into the frequency attention mechanism to learn the importance of different frequency units to the one-dimensional convolution feature. The feature processed by the frequency attention mechanism is the feature of the first branch.

[0158] At the same time, in the second branch, the two-dimensional convolution feature can be input into the hybrid attention mechanism, which includes the channel attention mechanism and the spatial attention mechanism, to learn the importance of different feature dimensions and different numbers of channels for the two-dimensional convolution feature. The feature processed by the hybrid attention mechanism is the feature of the second branch.

[0159] After that, the features of the two branches can be fused. The fusion process needs to keep the audio frame length T unchanged. The features of the two branches are reshaped to the same size and then directly spliced, and finally the fused features of each channel can be obtained.

[0160] Step 124: After that, cough detection can be performed based on the fused features of each channel, so as to obtain the cough interval of each channel. Specifically, the importance of the fused features in different channels is learned through a channel attention mechanism, and then an MLP (Multilayer Perceptron) is connected to output the cough detection results of different audio frames through a softmax function. The detection result includes the sound type and the type score. The sound class name indicates whether the corresponding audio frame is a cough sound, and the type score is the probability that the audio frame corresponds to the type.

[0161] Based on the above embodiments, Figure 8 is a flow chart of step 123 in the livestock status detection method provided by the present invention, such as Figure 8 As shown, step 123 includes:

[0162] Step 123-1, determining a first attention weight of the one-dimensional convolutional features of each channel based on the frequency correlation between the one-dimensional convolutional features of each channel;

[0163] Step 123-2, determining a second attention weight of the two-dimensional convolutional features of each channel based on the channel correlation and spatial correlation between the two-dimensional convolutional features of each channel;

[0164] Step 123-3, based on the first attention weight and the second attention weight, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused.

[0165] Specifically, in step 123, based on the frequency correlation between the one-dimensional convolution features of each channel, and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused, which specifically includes the following steps:

[0166] Step 123-1, first, the importance of different frequency units to the one-dimensional convolution feature can be learned through the frequency attention mechanism, that is, the frequency correlation between the one-dimensional convolution features of each channel is learned. Here, the process of correlation learning through the frequency attention mechanism is the process of determining the attention weight of each channel in the one-dimensional convolution feature. After this process, the weight of the cough-related channel can be increased, and the weight of the irrelevant channel can be weakened, so that the attention weight of the one-dimensional convolution feature of each channel can be obtained. For the convenience of distinction, this attention weight is called the first attention weight;

[0167] Step 123-2, at the same time, the importance of different feature dimensions and different numbers of channels for the two-dimensional convolution feature can be learned through the hybrid attention mechanism, that is, the channel correlation and spatial correlation between the two-dimensional convolution features of each channel are learned. Here, the process of correlation learning through the hybrid attention mechanism is the process of determining the attention weight of each channel in the two-dimensional convolution feature. After this process, the weights of cough-related channels and related feature dimensions can be increased, and the weights of irrelevant channels and irrelevant feature dimensions can be weakened, so that the second attention weight of the two-dimensional convolution feature of each channel can be obtained. The second attention weight here actually combines the spatial attention weight and channel attention weight of the two-dimensional convolution feature, and is more comprehensive.

[0168] Step 123-3, after which the first attention weight and the second attention weight can be used to fuse the one-dimensional convolution features and the two-dimensional convolution features of each channel to obtain the fused features of each channel. Specifically, the one-dimensional convolution features and the two-dimensional convolution features of each channel are fused based on the first attention weight and the second attention weight. The fusion process needs to keep the frame length T of the audio unchanged, and the two are reshaped to the same size and then directly spliced ​​to finally obtain the fused features of each channel.

[0169] Based on the above embodiment, the livestock posture status includes each livestock posture, the duration of each livestock posture, and the duration change trend of the duration, and each livestock posture includes at least one of a standing posture, a dog sitting posture, a side-lying posture, and a lying posture;

[0170] The livestock coughing trend includes at least one of a regional change trend of a livestock coughing area, a number change trend of the number of coughing livestock in the livestock coughing area, and an overall change trend of the number of coughing livestock in a livestock pen.

[0171] Specifically, the livestock posture data obtained by using the video data in the livestock pen for posture tracking includes various postures of the livestock, that is, various livestock postures, as well as the duration of each livestock posture and the time change trend of the duration; wherein each livestock posture includes at least one of a standing posture, a dog sitting posture, a side-lying posture, and a lying posture.

[0172] Correspondingly, the coughing trend is determined by using the livestock coughing area within the preset time range and the number of coughing livestock in the livestock coughing area, and the obtained livestock coughing trend includes at least one of the regional change trend of the livestock coughing area, the number change trend of the number of coughing livestock in the livestock coughing area, and the overall change trend of the number of coughing livestock in the livestock pen. The following takes three days as an example to illustrate the process of determining the livestock coughing trend:

[0173] Regional change trend: Count the livestock coughing areas for three consecutive days, and determine the regional change trend of the livestock coughing areas through the changes in the number of livestock coughing areas. For example, if the growth rate of the livestock coughing areas remains above 15% for three consecutive days, it is determined that the regional change trend of the livestock coughing areas is rising.

[0174] Number change trend: count the number of coughing livestock in the livestock coughing area for three consecutive days, and determine the number change trend of the number of coughing livestock in the livestock coughing area through the number change of the number of coughing livestock in the livestock coughing area. For example, if the growth rate of the number of coughing livestock in the livestock coughing area remains above 5% for three consecutive days, it is determined that the number change trend of the number of coughing livestock in the livestock coughing area is increasing.

[0175] Overall change trend: Count the number of coughing livestock in the livestock pen for three consecutive days, and determine the overall change trend of the number of coughing livestock in the livestock pen through the change in the number of coughing livestock in the livestock pen; or filter out the duplicate cough intervals of all channels and merge them to obtain the overall cough detection interval, and use the results of regional positioning and cough separation based on the cough detection interval as the number of coughing livestock in the entire livestock pen, and count the change in the number of coughing livestock in three consecutive days, so as to determine the overall change trend of the number of coughing livestock in the livestock pen. For example, if the growth rate of the number of coughing livestock in the livestock pen remains above 10% for three consecutive days, it is determined that the overall change trend is rising.

[0176] Based on the above embodiment, step 144 includes:

[0177] When the duration of the non-standing posture in the livestock posture status is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, determining that the livestock status detection result is a warning state;

[0178] When the duration of the non-standing posture in the livestock posture status is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, the livestock status detection result is determined to be a warning state.

[0179] Specifically, in step 144, the process of performing livestock status detection based on the livestock coughing tendency and livestock posture status to obtain the livestock status detection result includes the following two situations:

[0180] First, when the duration of the non-standing posture in the livestock posture status is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, that is, the duration of the dog sitting posture, the side-lying posture, and the prone posture in the livestock posture status is increasing, and one or more of the livestock coughing area increases, the number of coughing livestock in the livestock coughing area increases, and the number of coughing livestock in the livestock pen increases, it can be determined that the livestock status detection result is a warning state, that is, a warning is required at this time so that relevant personnel can know the livestock status.

[0181] Secondly, when the duration of the non-standing posture in the livestock posture status is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, that is, the duration of the dog sitting posture, the side-lying posture, and the prone posture in the livestock posture status is basically unchanged or is decreasing, and when two of the following conditions are met: an increase in the livestock coughing area, an increase in the number of coughing livestock in the livestock coughing area, and an increase in the number of coughing livestock in the livestock pen, or when two of the above three conditions are met at the same time, it can be determined that the livestock status detection result is a warning state, and a warning is also required at this time.

[0182] Furthermore, after determining that the livestock status detection result is a warning state and performing a livestock warning, if the number of coughing livestock in a certain livestock coughing area shows an upward trend, a preliminary warning needs to be performed on the livestock in the livestock coughing area, that is, the relevant information of the area needs to be provided to relevant personnel so that they can know the livestock status in the area. Correspondingly, if the number of coughing livestock in each livestock coughing area does not show an upward trend, a preliminary warning is performed on the livestock in the livestock coughing area with the largest number of coughing livestock.

[0183] Based on the above embodiments, Fig. 9is a flow chart of step 130 in the livestock status detection method provided by the present invention, such as Fig. 9 As shown, step 130 includes:

[0184] Step 131, performing posture detection based on each video frame in the video data to obtain a posture detection result of each video frame;

[0185] Step 132, based on the posture detection results of each video frame and the video data, posture tracking is performed to obtain the posture status of the livestock.

[0186] Specifically, in step 130, the process of using video data to perform posture tracking to obtain the posture status of livestock specifically includes the following steps:

[0187] Since the symptoms of livestock diseases are mostly manifested not only at the sound level but also at the movement level, for example, respiratory diseases in pigs are often accompanied by changes in posture. Common examples are pigs coughing in a dog-like sitting posture, coughing while lying on the ground, panting while lying on their side, etc. Therefore, after obtaining the video data, it can be used for posture detection, such as detecting whether the pig's posture is a dog-like sitting posture, lying on the ground, lying on its side, standing posture, etc. Since the differences between the various postures of livestock are relatively obvious, conventional posture detection models can be directly used to perform posture detection on them.

[0188] Step 131, firstly, posture detection can be performed using each video frame in the video data to determine the posture detection result of each video frame. Specifically, the video data can be input into a posture detection model. The posture detection model can perform posture detection according to each input video frame to identify the dog's sitting posture, lying posture, side-lying posture, standing posture, etc., and finally obtain the frame-level posture detection result output by the posture detection model, that is, the posture detection result of each video frame;

[0189] Before inputting the video data into the posture detection model, sample livestock images and posture category labels of the sample livestock images can be used to pre-train the posture detection model, that is, the target rectangular frame in the sample livestock image and its corresponding posture category label can be annotated in the form of target detection to form a training data set. Then, based on the training data set, yolov5 is directly used to train a conventional posture detection model. Since the differences between different postures of livestock are obvious, the model training difficulty is small, and there is no need to use some large target detection models, which saves time and energy and promotes the livestock status detection process.

[0190] Step 132, the posture detection results of each video frame and the video data can be used to perform posture tracking, so as to obtain the posture status of the livestock, that is, based on the posture detection results of each video frame, combined with the target tracking algorithm based on IOU (Intersection over Union), posture tracking of different livestock is performed, and when the posture of the livestock changes, the current tracking is terminated, and the livestock ID (Identity document) is kept unchanged to start the next tracking, and finally the various postures of the livestock, the duration of each posture, and the duration change trend, that is, the posture status of the livestock, can be obtained.

[0191] That is, the duration of different postures of livestock can be counted in time units. For example, the duration of the prone posture and side-lying posture of pigs is usually the longest. After a period of statistics, the posture status of livestock in the livestock pen in different time periods during the period can be obtained, which includes each livestock posture, the duration of each livestock posture, and the duration change trend of the duration.

[0192] In the embodiment of the present invention, posture detection is performed with the help of video data, which can provide livestock posture conditions for livestock status detection, thereby making the information of the livestock status detection process more comprehensive, the viewing angle more perfect, and the accuracy of the livestock status detection results obtained by detection higher.

[0193] Fig.10 is the overall framework diagram of the livestock status detection method provided by the present invention, such as Fig.10 As shown, the overall livestock status detection method includes:

[0194] First, video data in the livestock pen and at least two channels of audio data are determined;

[0195] Then, cough detection is performed based on the audio data of each channel to obtain the cough interval of each channel. Specifically, one-dimensional convolution is performed on the audio data of each channel to obtain the one-dimensional convolution feature of each channel; audio features of the audio data of each channel are extracted, and two-dimensional convolution is performed on the audio features to obtain the two-dimensional convolution features of each channel; based on the frequency correlation between the one-dimensional convolution features of each channel, and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused; cough detection is performed based on the fused features of each channel to obtain the cough interval of each channel;

[0196] Among them, based on the frequency correlation between the one-dimensional convolution features of each channel, as well as the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused, specifically including: determining the first attention weight of the one-dimensional convolution features of each channel based on the frequency correlation between the one-dimensional convolution features of each channel; determining the second attention weight of the two-dimensional convolution features of each channel based on the channel correlation and spatial correlation between the two-dimensional convolution features of each channel; based on the first attention weight and the second attention weight, fusing the one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel.

[0197] Subsequently, posture tracking is performed based on the video data to obtain the posture status of the livestock. Specifically, posture detection is performed based on each video frame in the video data to obtain the posture detection result of each video frame; posture tracking is performed based on the posture detection result of each video frame and the video data to obtain the posture status of the livestock;

[0198] Thereafter, based on the cough intervals of each channel and the livestock posture conditions, livestock status detection is performed to obtain livestock status detection results. Specifically, cough area positioning is performed based on the cough intervals of each channel to obtain the livestock cough area; cough separation is performed based on the audio data of the channel corresponding to the livestock cough area to obtain the number of coughing livestock in the livestock cough area; the livestock cough trend is determined based on the livestock cough area within a preset time range and the number of coughing livestock in the livestock cough area; livestock status detection is performed based on the livestock cough trend and the livestock posture conditions to obtain livestock status detection results.

[0199] Among them, the cough area is located based on the cough interval of each channel to obtain the livestock cough area, which specifically includes: determining the mean zero-crossing rate of the same cough interval under each channel; based on the mean zero-crossing rate, the cough area is located to obtain the livestock cough area; or, from the same cough interval under each channel, a target cough interval is selected, and a cough array is formed based on the target cough interval, the target cough interval is the cough interval of the first preset number of zero-crossing rate means corresponding to the channel arranged in order from large to small; based on the odd-even ratio in the cough array, the cough area is located to obtain the livestock cough area, and the odd-even ratio is determined based on the channel corresponding to each target cough interval.

[0200] Based on the audio data of the channel corresponding to the livestock cough area, cough separation is performed to obtain the number of coughing livestock in the livestock cough area, including: performing zero-crossing rate detection on the audio data of the channel corresponding to the livestock cough area, and performing segment fusion based on each cough segment obtained by the zero-crossing rate detection to obtain a continuous cough segment; based on the sound interval in the continuous cough segment, and / or the cough frequency corresponding to the continuous cough segment, determining the type of the number of coughing livestock corresponding to the continuous cough segment; when the type of the number of coughing livestock is not a single animal, hierarchically clustering the continuous cough segment to obtain livestock cough segments in units of animals, and combining the segments based on the feature similarity between the audio features of each livestock cough segment to obtain the number of coughing livestock.

[0201] Here, the livestock posture status includes each livestock posture, the duration of each livestock posture, and the time change trend of the duration. Each livestock posture includes at least one of standing posture, dog sitting posture, side-lying posture, and lying posture; the livestock coughing trend includes at least one of the regional change trend of the livestock coughing area, the number change trend of the number of coughing livestock in the livestock coughing area, and the overall change trend of the number of coughing livestock in the livestock pen.

[0202] Based on the livestock coughing trend and the livestock posture status, livestock status detection is performed to obtain livestock status detection results, specifically including: when the duration of the non-standing posture in the livestock posture status is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, the livestock status detection result is determined to be a warning state; when the duration of the non-standing posture in the livestock posture status is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, the livestock status detection result is determined to be a warning state.

[0203] The method provided by the embodiment of the present invention detects coughs through the audio data of each channel, determines the cough interval of each channel in combination with the cough detection result at the frame level, tracks the posture through the video data, and obtains the posture status of the livestock; combines the cough interval of each channel and the posture status of the livestock to jointly detect the status of the livestock, thereby overcoming the defect of poor detection effect based on single audio data in the traditional scheme, and achieving a double improvement in the accuracy and credibility of the livestock status detection results. In addition, the livestock status detection results can be used for disease prevention of livestock, and can remind relevant personnel to conduct further testing and targeted medication in the early stage of the disease outbreak, so as to reduce the cure rate and infectiousness, timely treat livestock, and greatly reduce the losses of the farm. At the same time, the automated livestock status detection process avoids the subjectivity and uncertainty of manual detection and judgment, and also saves the time and energy required for manual judgment.

[0204] The livestock state detection device provided by the present invention is described below. The livestock state detection device described below and the livestock state detection method described above can be referred to each other.

[0205] Fig.11 Schematic diagram of the structure of the livestock status detection device provided by the present invention. Fig.11 As shown, the device comprises:

[0206] The data determination unit 1110 is used to determine the video data in the livestock pen and the audio data of at least two channels;

[0207] A cough detection unit 1120, configured to perform cough detection based on the audio data of each channel to obtain a cough interval of each channel;

[0208] A posture tracking unit 1130, configured to perform posture tracking based on the video data to obtain a posture status of the livestock;

[0209] The state detection unit 1140 is used to perform livestock state detection based on the coughing intervals of the respective channels and the livestock posture status to obtain a livestock state detection result.

[0210] The livestock status detection device provided by the present invention performs cough detection through audio data of each channel, determines the cough interval of each channel in combination with the cough detection result at the frame level, and performs posture tracking through video data to obtain the livestock posture status; combines the cough interval of each channel and the livestock posture status to jointly perform livestock status detection, thereby overcoming the defect of poor detection effect based on single audio data in the traditional scheme, and achieving a double improvement in the accuracy and credibility of the livestock status detection result. In addition, the livestock status detection result can be used for disease prevention of livestock, and can remind relevant personnel to conduct further detection and targeted medication in the early stage of the disease outbreak, so as to reduce the cure rate and infectiousness, timely treat livestock, and greatly reduce the loss of farms. At the same time, the automated livestock status detection process avoids the subjectivity and uncertainty of manual detection and judgment, and also saves the time and energy required for manual judgment.

[0211] Based on the above embodiment, the state detection unit 1140 is used to:

[0212] The coughing area is located based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock;

[0213] Based on the audio data of the channel corresponding to the livestock coughing area, cough separation is performed to obtain the number of coughing livestock in the livestock coughing area;

[0214] Determining a livestock coughing trend based on a livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area;

[0215] Based on the livestock coughing tendency and the livestock posture condition, livestock status detection is performed to obtain livestock status detection results.

[0216] Based on the above embodiment, the state detection unit 1140 is used to:

[0217] Determine the mean value of the zero-crossing rate of the same cough interval in each channel;

[0218] Based on the zero-crossing rate mean, the coughing area is located to obtain the livestock coughing area;

[0219] Or, a target cough interval is selected from the same cough intervals under each channel, and a cough array is formed based on the target cough interval, wherein the target cough interval is the cough intervals of the channels corresponding to the first preset number of the zero-crossing rate means arranged in order from large to small;

[0220] Based on the odd-even ratio in the cough array, the cough area is located to obtain the livestock cough area, and the odd-even ratio is determined based on the corresponding channel of each target cough interval.

[0221] Based on the above embodiment, the state detection unit 1140 is used to:

[0222] Performing zero-crossing rate detection on the audio data of the channel corresponding to the livestock coughing area, and performing segment fusion based on each cough segment obtained by the zero-crossing rate detection to obtain a continuous cough segment;

[0223] Determine the number and type of coughing animals corresponding to the continuous coughing segments based on the sound intervals in the continuous coughing segments and / or the coughing frequencies corresponding to the continuous coughing segments;

[0224] In the case that the type of the number of coughing livestock is not a single animal, hierarchical clustering is performed on the continuous cough segments to obtain livestock cough segments in units of animals, and the segments are combined based on the feature similarity between the audio features of each livestock cough segment to obtain the number of coughing livestock.

[0225] Based on the above embodiment, the cough detection unit 1120 is used to:

[0226] Performing one-dimensional convolution on the audio data of each channel to obtain one-dimensional convolution features of each channel;

[0227] Extracting audio features of the audio data of each channel, and performing two-dimensional convolution on the audio features to obtain two-dimensional convolution features of each channel;

[0228] Based on the frequency correlation between the one-dimensional convolution features of the channels and the channel correlation and spatial correlation between the two-dimensional convolution features of the channels, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused;

[0229] Cough detection is performed based on the fused features of each channel to obtain the cough intervals of each channel.

[0230] Based on the above embodiment, the cough detection unit 1120 is used to:

[0231] Determine a first attention weight of the one-dimensional convolutional features of each channel based on the frequency correlation between the one-dimensional convolutional features of each channel;

[0232] Determine the second attention weights of the two-dimensional convolution features of each channel based on the channel correlation and spatial correlation between the two-dimensional convolution features of each channel;

[0233] Based on the first attention weight and the second attention weight, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused.

[0234] Based on the above embodiment, the livestock posture status includes various livestock postures, duration of the various livestock postures, and duration change trend of the durations, and the various livestock postures include at least one of a standing posture, a dog sitting posture, a side-lying posture, and a lying posture;

[0235] The livestock coughing trend includes at least one of a regional change trend of the livestock coughing area, a number change trend of the number of coughing livestock in the livestock coughing area, and an overall change trend of the number of coughing livestock in the livestock pen.

[0236] Based on the above embodiment, the state detection unit 1140 is used to:

[0237] When the duration of the non-standing posture in the livestock posture condition is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, determining that the livestock status detection result is a warning state;

[0238] When the duration of the non-standing posture in the livestock posture condition is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, the livestock status detection result is determined to be a warning state.

[0239] Based on the above embodiment, the posture tracking unit 1130 is used for:

[0240] Performing posture detection based on each video frame in the video data to obtain a posture detection result for each video frame;

[0241] Based on the posture detection results of each video frame and the video data, posture tracking is performed to obtain the posture status of the livestock.

[0242] Fig.12 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.12 As shown, the electronic device may include: a processor 1210, a communication interface 1220, a memory 1230 and a communication bus 1240, wherein the processor 1210, the communication interface 1220 and the memory 1230 communicate with each other through the communication bus 1240. The processor 1210 may call the logic instructions in the memory 1230 to execute the livestock state detection method, which includes: determining the video data in the livestock pen and the audio data of at least two channels; performing cough detection based on the audio data of each channel to obtain the cough interval of each channel; performing posture tracking based on the video data to obtain the livestock posture status; performing livestock state detection based on the cough interval of each channel and the livestock posture status to obtain the livestock state detection result.

[0243] In addition, the logic instructions in the above-mentioned memory 1230 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0244] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the livestock status detection method provided by the above-mentioned methods, and the method includes: determining video data in a livestock pen and audio data of at least two channels; performing cough detection based on the audio data of each channel to obtain the cough interval of each channel; performing posture tracking based on the video data to obtain the livestock posture status; performing livestock status detection based on the cough interval of each channel and the livestock posture status to obtain the livestock status detection result.

[0245] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the livestock status detection method provided by the above-mentioned methods, the method comprising: determining video data in a livestock pen and audio data of at least two channels; performing cough detection based on the audio data of each channel to obtain the cough interval of each channel; performing posture tracking based on the video data to obtain the livestock posture status; performing livestock status detection based on the cough interval of each channel and the livestock posture status to obtain the livestock status detection result.

[0246] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0247] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0248] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting livestock status, characterized in that: include: determining video data within the corral, and at least two channels of audio data; Perform cough detection based on audio data of each channel to obtain a cough interval of each channel; Performing posture tracking based on the video data to obtain the posture status of the livestock; Based on the coughing intervals of the channels and the posture of the livestock, livestock status detection is performed to obtain livestock status detection results; The livestock status detection is performed based on the cough intervals of the respective channels and the livestock posture status to obtain the livestock status detection result, including: The coughing area is located based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock; Based on the audio data of the channel corresponding to the livestock coughing area, cough separation is performed to obtain the number of coughing livestock in the livestock coughing area; Determining a livestock coughing trend based on a livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area; Based on the livestock coughing tendency and the livestock posture condition, livestock status detection is performed to obtain livestock status detection results.

2. The livestock status detection method according to claim 1, characterized in that: The coughing area is located based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock, including: Determine the mean value of the zero-crossing rate of the same cough interval in each channel; Based on the zero-crossing rate mean, the coughing area is located to obtain the livestock coughing area; Or, a target cough interval is selected from the same cough intervals under each channel, and a cough array is formed based on the target cough interval, wherein the target cough interval is the cough intervals of the channels corresponding to the first preset number of the zero-crossing rate means arranged in order from large to small; Based on the odd-even ratio in the cough array, the cough area is located to obtain the livestock cough area, and the odd-even ratio is determined based on the corresponding channel of each target cough interval.

3. The livestock status detection method according to claim 1, characterized in that: The method of performing cough separation based on the audio data of the channel corresponding to the livestock coughing area to obtain the number of coughing livestock in the livestock coughing area includes: Performing zero-crossing rate detection on the audio data of the channel corresponding to the livestock coughing area, and performing segment fusion based on each cough segment obtained by the zero-crossing rate detection to obtain a continuous cough segment; Determine the number and type of coughing animals corresponding to the continuous coughing segments based on the sound intervals in the continuous coughing segments and / or the coughing frequencies corresponding to the continuous coughing segments; In the case that the type of the number of coughing livestock is not a single animal, hierarchical clustering is performed on the continuous cough segments to obtain livestock cough segments in units of animals, and the segments are combined based on the feature similarity between the audio features of each livestock cough segment to obtain the number of coughing livestock.

4. The livestock status detection method according to any one of claims 1 to 3, characterized in that: The cough detection is performed based on the audio data of each channel to obtain the cough interval of each channel, including: Performing one-dimensional convolution on the audio data of each channel to obtain one-dimensional convolution features of each channel; Extracting audio features of the audio data of each channel, and performing two-dimensional convolution on the audio features to obtain two-dimensional convolution features of each channel; Based on the frequency correlation between the one-dimensional convolution features of the channels and the channel correlation and spatial correlation between the two-dimensional convolution features of the channels, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused; Cough detection is performed based on the fused features of each channel to obtain the cough intervals of each channel.

5. The livestock status detection method according to claim 4, characterized in that: The one-dimensional convolution features of each channel and the two-dimensional convolution features of each channel are fused based on the frequency correlation between the one-dimensional convolution features of each channel and the channel correlation and spatial correlation between the two-dimensional convolution features of each channel, including: Determine a first attention weight of the one-dimensional convolutional features of each channel based on the frequency correlation between the one-dimensional convolutional features of each channel; Determine the second attention weights of the two-dimensional convolution features of each channel based on the channel correlation and spatial correlation between the two-dimensional convolution features of each channel; Based on the first attention weight and the second attention weight, the one-dimensional convolution features of the channels and the two-dimensional convolution features of the channels are fused.

6. The livestock status detection method according to any one of claims 1 to 3, characterized in that: The livestock posture conditions include various livestock postures, duration of various livestock postures, and duration change trends of the durations, and the various livestock postures include at least one of a standing posture, a dog-sitting posture, a side-lying posture, and a lying posture; The livestock coughing trend includes at least one of a regional change trend of the livestock coughing area, a number change trend of the number of coughing livestock in the livestock coughing area, and an overall change trend of the number of coughing livestock in the livestock pen.

7. The livestock status detection method according to claim 6, characterized in that: The livestock status detection is performed based on the livestock coughing trend and the livestock posture status to obtain the livestock status detection result, including: When the duration of the non-standing posture in the livestock posture condition is increasing, and at least one of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend is increasing, determining that the livestock status detection result is a warning state; When the duration of the non-standing posture in the livestock posture condition is not increasing, and at least two of the regional change trend, the number change trend, and the overall change trend in the livestock coughing trend are increasing, the livestock status detection result is determined to be a warning state.

8. The livestock status detection method according to any one of claims 1 to 3, characterized in that: The step of performing posture tracking based on the video data to obtain the posture status of the livestock includes: Performing posture detection based on each video frame in the video data to obtain a posture detection result for each video frame; Based on the posture detection results of each video frame and the video data, posture tracking is performed to obtain the posture status of the livestock.

9. A livestock status detection device, characterized in that: include: A data determination unit, used to determine video data in the livestock pen and audio data of at least two channels; a cough detection unit, configured to perform cough detection based on audio data of each channel to obtain a cough interval of each channel; A posture tracking unit, used for performing posture tracking based on the video data to obtain the posture status of the livestock; A state detection unit, configured to perform livestock state detection based on the cough intervals of the respective channels and the livestock posture status, and obtain a livestock state detection result; The state detection unit is used for: The coughing area is located based on the coughing intervals of each channel to obtain the coughing area of ​​the livestock; Based on the audio data of the channel corresponding to the livestock coughing area, cough separation is performed to obtain the number of coughing livestock in the livestock coughing area; Determining a livestock coughing trend based on a livestock coughing area within a preset time range and the number of coughing livestock in the livestock coughing area; Based on the livestock coughing tendency and the livestock posture condition, livestock status detection is performed to obtain livestock status detection results.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the livestock status detection method according to any one of claims 1 to 8 is implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the livestock status detection method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Health monitoring method and device, and computer-readable storage medium

    CN109602421A

  • Monitoring and early warning system based on multi-source big data animal breeding data mining

    CN114463701A