Cattle type state judgment method and device, computer equipment and medium
Through the multimodal LSTM model, the problem of low prediction accuracy of complex diseases of cattle aura in the prior art is solved, and earlier and more accurate disease identification and management is achieved.
Patent Information
- Application Number
- CN202510516211.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is less accurate when predicting multiple diseases with complex behaviors of cattle, making it difficult to effectively identify the combined manifestations of multiple diseases.
The multimodal LSTM model is used to fuse the behavior, physiology and environmental data of cattle, and the behavioral indicators are obtained through the YOLO algorithm, and combined with the pre-trained neural network model to predict the disease probability.
It improves the accuracy of predicting complex diseases of aura behavior, can identify the combined manifestations of multiple diseases earlier and more accurately, and provides scientific and accurate health management solutions.
Smart Images

Figure CN120408375A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of farming and animal husbandry, and particularly relates to a method and device for judging the state of cattle, a computer device, and a storage medium. Background Art
[0002] With the rapid development of digital technologies such as big data, artificial intelligence, and the Internet of Things, the livestock farming industry is gradually transforming from traditional manual operations and extensive management methods to modern and intelligent farming methods. The application of intelligent technologies not only improves farming efficiency but also promotes a fundamental change in the production mode of the livestock industry. In particular, intelligent monitoring based on sensor and computer vision technologies has been widely applied in the livestock farming industry. These technologies can provide precise support for important links such as disease prevention, reasonable feeding, and breeding by real-time monitoring of the health, behavior, and environmental data of livestock, thereby effectively improving production efficiency and quality.
[0003] The study of animal behavior helps to deeply understand the physiological and health status of animals in different environments. Research shows that there is a close connection between changes in animal behavior and their health status. Monitoring the health status of livestock is a cumbersome and labor-intensive task, usually completed manually. With the rapid development of Internet of Things technology and artificial intelligence technology, intelligent monitoring technology has gradually been applied in the livestock industry.
[0004] In the prior art, physiological data of cattle are obtained by using sensors, such as temperature sensors, motion sensors, sound sensors, pressure sensors, position sensors, etc. By real-time monitoring of the physiological data or environmental data of livestock, the behavior characteristics and health status of cattle are judged. Specifically, it includes: the movement data of cattle obtained by a motion sensor and the mounting data obtained by a pressure sensor can detect the estrus situation of cattle; the acceleration sensor in the reins can identify the feeding behavior of cattle; the acceleration sensor on the legs can identify the limping behavior of cattle.
[0005] Although some prior art studies have discussed behavior-driven disease prediction methods, they all focus on diseases with obvious independent behavior characteristics such as limping. For multiple diseases with complex precursor behaviors, and in many cases, cattle are not only suffering from one disease but may have multiple concurrent diseases, resulting in more complex behaviors. Due to the complex cattle behaviors involved and diverse pathogenic factors, the prediction results of the prior art for such complex diseases have extremely large errors. Summary of the Invention
[0006] In order to solve the problem of low prediction probability for diseases with complex precursor behaviors, the present invention provides a method and device for judging the state of cattle, a computer device, and a storage medium.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] First, a method for judging the state of cattle is provided, and the method includes:
[0009] Obtain the physiological data of the target cattle and the environmental data of the environment where it is located, generate a physiological index matrix and an environmental index matrix of the target cattle according to the physiological data and the environmental data, and obtain the behavior index matrix of the target cattle at time t based on the behavior recognition model of the YOLO algorithm; the behavior index matrix includes indexes of the walking state, rest state, and feeding state of the target cattle;
[0010] Construct a multi-modal LSTM model, respectively process the physiological index matrix, the environmental index matrix, and the behavior index matrix, and fuse the three processed feature matrices to obtain a fused feature matrix;
[0011] Input the fused feature matrix into a pre-trained neural network prediction model to obtain a state probability matrix corresponding to various disease probabilities of the target cattle.
[0012] Optionally, the obtaining of the physiological data of the target cattle and the environmental data of the environment where it is located, and the generating of the physiological index matrix and the environmental index matrix of the target cattle according to the physiological data and the environmental data include:
[0013] Use wearable sensors to collect the physiological indexes of the target cattle to form a cattle physiological index matrix at time t; the physiological indexes include heart rate, body temperature, and respiratory rate;
[0014] Based on the environmental index sensor, record the environmental index matrix of the cowshed at time t; the environmental index sensor includes temperature and humidity sensors and ammonia concentration sensors.
[0015] Optionally, the obtaining of the behavior index matrix of the target cattle at time t based on the behavior recognition model of the YOLO algorithm includes:
[0016] Collect cattle video data, and annotate each frame of the image to obtain an annotated image frame; the annotation includes different behavior categories of the cattle and the corresponding bounding boxes;
[0017] Preprocess and perform data augmentation on the annotated image frames to obtain sample image frames;
[0018] Train the YOLO algorithm based on the sample image frames to obtain a behavior recognition model;
[0019] Input the real-time monitoring video stream of the target cattle into the behavior recognition model to obtain the behavior index matrix of the target cattle.
[0020] Optionally, the construction of the multi-modal LSTM model for separately processing the behavioral data, physiological data, and environmental data includes:
[0021] Assign an independent LSTM module to each modality data to establish an independent time series model; the independent time series model includes LSTM1, LSTM2, and LSTM3;
[0022] Among them, LSTM1 is used to process behavioral data and establish a bovine behavior time series model; LSTM2 is used to process physiological data and establish a bovine physiological time series model; LSTM3 is used to process environmental data and establish a cowshed environment time series model.
[0023] Optionally, the fusion of the three processed data features to obtain a fusion feature matrix includes:
[0024] Introduce an attention mechanism to dynamically allocate modality weights to the outputs of the LSTM modules corresponding to different modality data;
[0025] Concatenate the outputs of multiple LSTM modules according to the modality weights to obtain a fusion feature matrix.
[0026] Optionally, input the fusion feature matrix into a pre-trained neural network prediction model to obtain a state probability matrix of the target bovine species corresponding to various disease probabilities, including:
[0027] Establish a bovine electronic medical record dataset, including bovine behavior status, bovine physiological indicators, cowshed environment indicators, and bovine health status;
[0028] Construct data samples based on the bovine electronic medical record dataset; the data samples include a sample physiological indicator matrix, a sample environment indicator matrix, a sample behavior indicator matrix, and a sample state probability matrix of the bovine; the sample state probability matrix includes different disease probabilities of the bovine corresponding to various diseases;
[0029] Train a pre-constructed neural network prediction model through the data samples to obtain a pre-trained neural network prediction model;
[0030] Input the fusion feature matrix into the pre-trained neural network prediction model to obtain a state probability matrix of the corresponding bovine in the target bovine species.
[0031] Secondly, a bovine species state judgment device is provided, and the device includes:
[0032] An acquisition module is used to acquire the physiological data of the target cattle and the environmental data of the location environment, generate a physiological index matrix and an environmental index matrix of the target cattle according to the physiological data and environmental data, and obtain a behavior index matrix of the target cattle at time t based on a behavior recognition model of the YOLO algorithm; the behavior index matrix includes indexes of the walking state, rest state and eating state of the target cattle.
[0033] A construction module is used to construct a multi-modal LSTM model, respectively process the physiological index matrix, environmental index matrix and behavior index matrix, and fuse the three processed feature matrices to obtain a fused feature matrix.
[0034] A prediction module is used to input the fused feature matrix into a pre-trained neural network prediction model to obtain a state probability matrix of the target cattle corresponding to the probabilities of multiple diseases.
[0035] In addition, a computer-readable storage medium is provided. The storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for judging the state of cattle is implemented.
[0036] Finally, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned method for judging the state of cattle is implemented.
[0037] The method for judging the state of cattle provided by the present invention has the following beneficial effects:
[0038] Firstly, multi-modal data is acquired. Among them, the behavior data can reflect the abnormal behavior patterns of cattle, the physiological data can directly indicate the physical condition of cattle, and the environmental data provides external influencing factors, which can comprehensively capture the health status information of cattle; secondly, the multi-modal LSTM model processes different modal data respectively, and integrates the three data features into a fused feature matrix through feature fusion technology. Since diseases with complex premonitory behaviors often show combinations of multiple abnormal behaviors, and these behaviors are closely related to the environment and physiological state, and this fusion method can make full use of the complementarity of each modal data and avoid the limitations of single-modal data. The multi-modal LSTM model can capture these complex behavior patterns and their dynamic changes through time series analysis, so as to identify disease precursors earlier and more accurately and improve the accuracy of disease prediction. In this way, through the application of multi-modal data fusion and deep learning models, the problem of low prediction accuracy for diseases with complex premonitory behaviors can be effectively solved, providing a scientific and accurate solution for the health management of cattle. Description of the Drawings
[0039] To more clearly illustrate the embodiments of the present invention and their design solutions, the accompanying drawings required for this embodiment will be briefly introduced below. The accompanying drawings in the following description are only partial embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0040] Figure 1 It is a schematic flowchart of a method for judging the state of cattle provided by the present invention according to an exemplary embodiment.
[0041] Figure 2 It is a schematic flowchart of an algorithm for predicting the state of cattle provided by the present invention according to an exemplary embodiment.
[0042] Figure 3 It is a block diagram of a device for judging the state of cattle provided by the present invention according to an exemplary embodiment. Detailed implementation manners
[0043] In order to enable those skilled in the art to better understand the technical solutions of the present invention and be able to implement them, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.
[0044] First of all, artificial intelligence has shown great potential in disease prevention. By installing sensors and cameras and combining computer vision technology, key data such as the behavior changes and body temperature fluctuations of livestock can be captured in real time, and potential health problems or disease precursors can be identified in advance, avoiding the blindness and lag of relying on manual inspections in traditional breeding models. Such an early warning system can help farms take effective prevention and control measures before the spread of diseases, greatly reducing the losses caused by disease transmission, reducing treatment costs, and improving the overall breeding efficiency. In addition, the application of intelligent technology can also optimize feeding management and feeding strategies. By accurately monitoring data such as the growth and development of each livestock and feed consumption, breeders can adjust the feeding plan according to the specific needs of each animal to achieve personalized and precise management. This not only improves the feed utilization rate, reduces resource waste, but also promotes the healthy growth of livestock, thereby increasing the overall output of the livestock industry. In terms of breeding, intelligent monitoring technology also plays an important role. By real-time monitoring of physiological indicators such as the behavior and body temperature of breeding livestock and combining big data analysis, the breeding plan can be optimized, the breeding efficiency of breeding livestock can be improved, and then the breeding efficiency of high-quality livestock can be increased. Based on the analysis platform of artificial intelligence, it is also possible to guide more scientific breeding work through genetic data analysis, promote the breeding of excellent varieties, and promote the sustainable development of the livestock industry.
[0045] In summary, with the continuous penetration and innovation of intelligent technologies, the livestock and poultry breeding industry is developing towards a more refined and intelligent direction. The wide application of these technologies not only improves production efficiency and economic benefits, but also brings profound changes to the industry in aspects such as disease prevention and control, resource utilization, and animal welfare, laying a solid foundation for promoting the high-quality development of China's livestock industry.
[0046] The following will, in conjunction with the accompanying drawings, detail the technical solutions provided by each embodiment of the present invention.
[0047] First, the present invention provides a method for judging the state of cattle, specifically as Figure 1 shown, including the following steps:
[0048] S101. Obtain the physiological index matrix, environmental index matrix, and behavior index matrix of the target cattle.
[0049] Specifically, obtain the physiological data of the target cattle and the environmental data of the location environment, generate the physiological index matrix and environmental index matrix of the target cattle according to the physiological data and environmental data, and based on the behavior recognition model of the YOLO algorithm, obtain the behavior index matrix of the target cattle at time t; this behavior index matrix includes the indexes of the walking state, resting state, and feeding state of the target cattle.
[0050] In this step, it involves obtaining multi-modal data of the target cattle, including behavior data, physiological data, and environmental data. First, based on the behavior recognition model of the YOLO algorithm, obtain the cattle behavior index matrix B(t)=[b1(t), b2(t), b3(t)] at time t, where b1(t) represents the walking state of the cattle, b2(t) represents the resting state of the cattle, b3(t) represents the feeding state of the cattle, and b1(t), b2(t), b3(t) are all 0-1 variables.
[0051] Secondly, use wearable sensors to collect physiological indexes such as heart rate, body temperature, and respiratory rate to form the cattle physiological index matrix H(t)=[j1(t), j2(t), h3(t)] at time t, where h1(t) represents the cattle heart rate data, h1(t) represents the cattle body temperature data, h1(t) represents the cattle respiratory rate, and h1(t), h2(t), h3(t) are all continuous variables.
[0052] Deploy environmental index sensors to record the cattle shed environmental index matrix E(t)=[e1(t), e2(t), e3(t)] at time t, where this environmental index sensor includes sensors such as temperature and humidity and ammonia concentration, e1(t) represents the temperature of the cattle shed, e2(t) represents the humidity of the cattle shed, e3(t) represents the ammonia concentration of the cattle shed, and e1(t), e2(t), e3(t) are all continuous variables.
[0053] Among them, for the behavior recognition model based on the YOLO algorithm, first collect the video data of cattle, and label each frame of the image to obtain the labeled image frames; the labeling includes different behavior categories of cattle and the corresponding bounding boxes; preprocess and perform data augmentation on the labeled image frames to obtain the sample image frames; train the YOLO algorithm based on the sample image frames to obtain the behavior recognition model; input the real-time monitoring video stream of the target cattle category into the behavior recognition model to obtain the behavior index matrix of the target cattle category.
[0054] Exemplarily, capture the cattle images in real time through a camera, use the YOLO algorithm for image processing and behavior recognition, and obtain the behavior data.
[0055] 1. Data annotation: In the data annotation stage, first collect the video data of cattle, and manually annotate each frame of the image, including different behavior categories of cattle (walking, eating, resting, etc.) and the corresponding bounding boxes.
[0056] 2. Data preprocessing.
[0057] Image cropping and scaling: Ensure that all images meet the YOLO input requirements (usually 416x416 or 608x608 pixels).
[0058] Data augmentation: Increase the diversity of training data through methods such as random rotation, mirror flipping, and hue adjustment to improve the robustness of the model.
[0059] 3. Model training.
[0060] Use the labeled cattle behavior data (such as walking, eating, resting, etc.) to train the YOLO algorithm to obtain the behavior recognition model.
[0061] 4. Behavior detection
[0062] After the model training is completed, use the inference engine to process the real-time video stream to identify the cattle behavior in real time.
[0063] S102. Construct a multi-modal LSTM model to process the physiological index matrix, environmental index matrix, and behavior index matrix respectively, and fuse the three processed feature matrices to obtain the fused feature matrix.
[0064] Specifically, allocate an independent LSTM module for each modal data to establish an independent time series model; the independent time series model includes LSTM1, LSTM2, and LSTM3; among them, LSTM1 is used to process the behavior data to establish the cattle behavior time series model; LSTM2 is used to process the physiological data to establish the cattle physiological time series model; LSTM3 is used to process the environmental data to establish the cattle shed environment time series model.
[0065] For example, based on the behavior modality, physiological modality, and environmental modality, a multi-modal LSTM model is established. An independent LSTM module is assigned to each modality to establish an independent time series model. LSTM1 processes behavioral data to establish a bovine behavior time series model; LSTM2 processes physiological data to establish a bovine physiological time series model; LSTM3 processes environmental data to establish a cowshed environment time series model. And the outputs of the 3 LSTMs are concatenated into a fused feature matrix.
[0066] In addition, an attention mechanism can be added to dynamically assign modality weights to the outputs of the LSTM modules corresponding to different modality data; the outputs of multiple LSTM modules are concatenated according to the modality weights to obtain a fused feature matrix.
[0067] Another example is that in the bovine disease prediction method based on multi-modal feature fusion, in order to more effectively integrate information from different modalities (behavior modality, physiological modality, environmental modality), the present invention introduces an attention mechanism. This mechanism can dynamically assign modality weights to the outputs of each LSTM module according to the importance of different modality data in the prediction task.
[0068] The steps are detailed as follows:
[0069] Output of the multi-modal LSTM module:
[0070] First, the data of the behavior modality, physiological modality, and environmental modality are respectively processed by their respective independent LSTM modules, and the output of each module represents the feature representation of that modality in the time series.
[0071] Calculation of attention weights:
[0072] Next, the present invention calculates attention weights for the outputs of each LSTM module. This step usually involves one or more neural network layers (such as fully connected layers) to extract key information from the outputs of the LSTM modules and calculate weights based on this information.
[0073] The specific way of weight calculation can be diverse, including but not limited to the application of the softmax function to ensure that the sum of the weights of all modalities is 1, thereby realizing the normalization of the weights.
[0074] Dynamic assignment of modality weights:
[0075] Through the weights calculated by the attention mechanism, the present invention dynamically assigns modality weights to the outputs of each LSTM module. This means that in the prediction task, if the data of a certain modality is more important for the prediction result, then the output of the LSTM module of that modality will be assigned a higher weight.
[0076] Generation of the fused feature matrix:
[0077] Finally, according to the calculated modal weights, the present invention performs weighted splicing on the outputs of multiple LSTM modules to obtain a fused feature matrix. This matrix synthesizes information from different modalities and provides a more comprehensive and accurate feature representation for subsequent disease prediction.
[0078] By introducing an attention mechanism, the method of the present invention can handle multi-modal data more flexibly, improving the accuracy of disease prediction. At the same time, this way of dynamically allocating modal weights also enables the method of the present invention to adapt to different data sets and prediction tasks, having stronger generalization ability.
[0079] S103: Input the fused feature matrix into a pre-trained neural network prediction model to obtain a state probability matrix of the target cattle corresponding to the probabilities of multiple diseases.
[0080] Among them, for the pre-trained neural network prediction model, first, a cattle electronic medical record data set needs to be established, including cattle behavior status, cattle physiological indicators, cattle shed environmental indicators, and cattle health status; construct data samples based on the cattle electronic medical record data set; the data sample includes a sample physiological index matrix, a sample environmental index matrix, a sample behavior index matrix, and a sample state probability matrix of the cattle; the sample state probability matrix includes different disease probabilities of the cattle corresponding to multiple diseases; train the pre-constructed neural network prediction model through the data sample to obtain a pre-trained neural network prediction model; input the fused feature matrix into the pre-trained neural network prediction model to obtain a state probability matrix of the corresponding cattle in the target cattle category.
[0081] In one embodiment, for typical diseases with complex cattle behavior - mastitis, bovine pneumonic plague, foot - and - mouth disease, ruminant ketosis, mad cow disease, a disease prediction model is constructed. Establish a cattle electronic medical record data set, including cattle behavior status, cattle physiological indicators, cattle shed environmental indicators, and cattle health status. The cattle behavior status, cattle physiological indicators, and cattle shed environmental indicators are the same as the previous data content. The state probability matrix D(t) of the cattle = [d1(t), d2(t), d3(t), d4(t), d5(t)], where d1(t), d2(t), d3(t), d4(t), d5(t) are 0 - 1 variables corresponding to mastitis, bovine pneumonic plague, foot - and - mouth disease, ruminant ketosis, and mad cow disease respectively. Taking 1 indicates suffering from this disease, and vice versa indicates not suffering from this disease.
[0082] Train the neural network prediction model, with the input being cattle behavior status, cattle physiological indicators, and cattle shed environmental indicators, and the output being the state probability matrix of the cattle.
[0083] After the model training is completed, the neural network structure is used as the fully connected layer of the method of the present invention. The fused feature matrix formed by concatenating the outputs of 3 LSTMs is input into the fully connected layer. After prediction by the fully connected layer, the state probability matrix of the cattle D'(t)=[d′1(t),d′2(t),d′3(t),d′4(t),d′5(t)] is obtained, where d′1(t), d′2(t), d′3(t), d′4(t), d′5(t) respectively represent the probabilities of the cattle suffering from mastitis, bovine pneumonic plague, foot-and-mouth disease, ruminant ketosis, and mad cow disease. In addition, other classifier structures can be used to replace this fully connected layer, such as decision trees, support vector machines, etc.
[0084] By adopting the above method, multi-modal data is firstly obtained, where the behavior data can reflect the abnormal behavior patterns of the cattle, the physiological data can directly indicate the physical condition of the cattle, and the environmental data provides external influencing factors and can comprehensively capture the state information of the cattle; secondly, the multi-modal LSTM model processes different-modal data respectively, and integrates the three data features into a fused feature matrix through the feature fusion technology. Since diseases with complex precursor behaviors often show combinations of multiple abnormal behaviors, and these behaviors are closely related to the environment and physiological state, and this fusion method can make full use of the complementarity of each-modal data and avoid the limitations of single-modal data. The multi-modal LSTM model can capture these complex behavior patterns and their dynamic changes through time series analysis, so as to identify disease precursors earlier and more accurately and improve the accuracy of disease prediction. In this way, through the application of multi-modal data fusion and deep learning models, the problem of low prediction probability for diseases with complex precursor behaviors can be effectively solved, providing a scientific and accurate solution for the health management of cattle.
[0085] Secondly, the present invention also provides a cattle state judgment device, as Figure 3 shown, including:
[0086] An acquisition module 301, configured to acquire the physiological data of the target cattle and the environmental data of the environment where the target cattle is located, generate a physiological index matrix and an environmental index matrix of the target cattle according to the physiological data and the environmental data, and acquire a behavior index matrix of the target cattle at time t based on the behavior recognition model of the YOLO algorithm; the behavior index matrix includes indexes of the walking state, rest state, and eating state of the target cattle.
[0087] A construction module 302, configured to construct a multi-modal LSTM model, respectively process the physiological index matrix, the environmental index matrix, and the behavior index matrix, and fuse the three processed feature matrices to obtain a fused feature matrix.
[0088] A prediction module 303, configured to input the fused feature matrix into a pre-trained neural network prediction model to obtain a state probability matrix of the target cattle corresponding to the probabilities of multiple diseases.
[0089] By using the above device, multi-modal data is first obtained. Among them, the behavior data can reflect the abnormal behavior patterns of cattle, the physiological data can directly indicate the physical condition of cattle, and the environmental data provides external influencing factors, which can comprehensively capture the state information of cattle. Secondly, the multi-modal LSTM model processes data of different modalities respectively, and integrates the features of the three types of data into a fused feature matrix through feature fusion technology. Since diseases with complex premonitory behaviors often manifest as combinations of multiple abnormal behaviors, and these behaviors are closely related to the environment and physiological state, and this fusion method can make full use of the complementarity of data of each modality and avoid the limitations of single-modal data. The multi-modal LSTM model can capture these complex behavior patterns and their dynamic changes through time series analysis, so as to identify disease premonitions earlier and more accurately, and improve the accuracy of disease prediction. In this way, through the application of multi-modal data fusion and deep learning models, the problem of low prediction probability for diseases with complex premonitory behaviors can be effectively solved, providing a scientific and accurate solution for cattle health management.
[0090] The present invention also provides a computer-readable storage medium, which stores a computer program, and the computer program can be used to execute the steps of the cattle state judgment method provided above. Figure 1 Steps of the cattle state judgment method provided above.
[0091] The present invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the steps of the cattle state judgment method provided above. Figure 1 Steps of the cattle state judgment method provided above.
[0092] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0093] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.
[0094] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.
[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.
[0096] It should be noted that the above-described specific embodiments can enable those skilled in the art to understand the present invention more comprehensively, but do not limit the present invention in any way. Therefore, although this specification has described the present invention in detail, those skilled in the art should understand that the present invention can still be modified or equivalently replaced; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered by the protection scope of the patent of the present invention. Any reference signs in the claims should not be regarded as limiting the claimed claims.
Claims
1. A method for judging the state of cattle, characterized in that, The method includes: Obtain the physiological data of the target cattle and the environmental data of the location environment, generate the physiological index matrix and environmental index matrix of the target cattle according to the physiological data and environmental data, and obtain the behavior index matrix of the target cattle at time t based on the behavior recognition model of the YOLO algorithm; the behavior index matrix includes the indexes of the walking state, rest state and feeding state of the target cattle. Construct a multi-modal LSTM model to process the physiological index matrix, environmental index matrix and behavior index matrix respectively, and fuse the three processed feature matrices to obtain a fused feature matrix. Input the fused feature matrix into a pre-trained neural network prediction model to obtain the state probability matrix of the target cattle corresponding to the probabilities of various diseases.
2. The bovine state determination method according to claim 1, characterized in that The obtaining of the physiological data of the target cattle and the environmental data of the location environment, and the generating of the physiological index matrix and environmental index matrix of the target cattle according to the physiological data and environmental data include: Use wearable sensors to collect the physiological indexes of the target cattle to form the cattle physiological index matrix at time t; the physiological indexes include heart rate, body temperature and respiratory rate. Based on the environmental index sensors, record the environmental index matrix of the cowshed at time t; the environmental index sensors include temperature and humidity sensors and ammonia concentration sensors.
3. A method for judging the state of cattle according to claim 2, characterized in that The obtaining of the behavior index matrix of the target cattle at time t based on the behavior recognition model of the YOLO algorithm includes: Collect cattle video data and annotate each frame of the image to obtain the annotated image frames; the annotation includes different behavior categories of cows and their corresponding bounding boxes. Preprocess and perform data augmentation on the annotated image frames to obtain sample image frames. Train the YOLO algorithm based on the sample image frames to obtain a behavior recognition model. Input the real-time monitoring video stream of the target cattle into the behavior recognition model to obtain the behavior index matrix of the target cattle.
4. A method for judging the state of cattle according to claim 1, characterized in that The constructing of the multi-modal LSTM model to process the behavior data, physiological data and environmental data respectively includes: Allocate an independent LSTM module for each modal data to establish an independent time series model; the independent time series model includes LSTM1, LSTM2 and LSTM3. Among them, LSTM1 is used to process the behavior data to establish a cattle behavior time series model; LSTM2 is used to process the physiological data to establish a cattle physiological time series model; LSTM3 is used to process the environmental data to establish a cowshed environment time series model.
5. A method for judging the state of cattle according to claim 4, characterized in that, The fusing of the three processed data features to obtain a fused feature matrix includes: Add an attention mechanism to dynamically allocate modal weights to the outputs of the LSTM modules corresponding to different modal data. Stitch the outputs of multiple LSTM modules according to the modal weights to obtain a fused feature matrix.
6. The bovine state determination method according to claim 1, characterized in that, The inputting of the fused feature matrix into a pre-trained neural network prediction model to obtain the state probability matrix of the target cattle corresponding to the probabilities of various diseases includes: Establish a cattle electronic medical record dataset, including cattle behavior status, cattle physiological indexes, cowshed environmental indexes and cattle health status. Construct a data sample based on the bovine electronic medical record dataset; the data sample includes a sample physiological index matrix, a sample environmental index matrix, a sample behavior index matrix, and a sample state probability matrix of the bovine; the sample state probability matrix includes different disease probabilities of the bovine corresponding to multiple diseases; Train a pre-constructed neural network prediction model with the data sample to obtain a pre-trained neural network prediction model; Input the fused feature matrix into the pre-trained neural network prediction model to obtain the state probability matrix of the corresponding bovine in the target bovine category.
7. A bovine state judgment device, characterized in that, The device includes: An acquisition module, configured to acquire the physiological data of the target bovine category and the environmental data of the environment where it is located, generate the physiological index matrix and the environmental index matrix of the target bovine category according to the physiological data and the environmental data, and based on the behavior recognition model of the YOLO algorithm, acquire the behavior index matrix of the target bovine category at time t; the behavior index matrix includes the indexes of the walking state, rest state, and eating state of the target bovine category; A construction module, configured to construct a multi-modal LSTM model, respectively process the physiological index matrix, the environmental index matrix, and the behavior index matrix, and fuse the three processed feature matrices to obtain a fused feature matrix; A prediction module, configured to input the fused feature matrix into the pre-trained neural network prediction model to obtain the state probability matrix of the target bovine category corresponding to multiple disease probabilities.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 6 above is implemented.
9. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in any one of claims 1 to 6 above is implemented.
Citation Information
Cited By
Pasture environment parameter and beef cattle health association modeling method and system
CN121169612A