A machine vision-based system for identifying abnormal behavior and providing early warning of health in cattle and sheep.
By adopting a four-layer architecture design based on machine vision, non-contact video monitoring and automated health early warning in cattle and sheep farming have been realized, solving the problems of lagging manual inspection and strong stress response of contact monitoring, and improving the accuracy and efficiency of health management.
Patent Information
- Application Number
- CN202611111435.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-11-17
AI Technical Summary
Existing cattle and sheep farming practices suffer from problems such as delayed detection by manual inspections, high stress levels of contact-based monitoring equipment, limited identification dimensions of intelligent solutions, and a disconnect between early warning and on-site handling, making it difficult to achieve efficient health management.
The system adopts a four-layer architecture based on machine vision, including an image acquisition layer, an edge computing layer, a platform service layer, and an application interaction layer. It constructs an all-weather automated early warning system through non-contact video monitoring, individual tracking and behavioral feature extraction, health risk fusion reasoning, and on-site mobile response.
It enables real-time anomaly identification without the need for wearing sensors, reduces deployment and maintenance costs, improves the accuracy of health warnings and management efficiency, and forms a complete closed loop from monitoring to response.
Smart Images

Figure CN123100522A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of early warning system technology, and in particular to a machine vision-based system for recognizing abnormal behavior and providing health early warning for cattle and sheep. Background Technology
[0002] As my country's cattle and sheep farming industry rapidly transforms towards large-scale and intensive operations, the density of individual farms continues to increase, making herd health management increasingly challenging. Traditional farming methods rely on manual inspections by farmers to detect abnormal individuals. However, this approach is constrained by the experience of the farmers, the frequency of inspections, and blind spots in observation, resulting in problems such as delayed detection, high missed detection rates, and inconsistent judgment standards. In the early stages of health damage, cattle and sheep often exhibit changes in behavioral patterns. By the time obvious clinical symptoms appear, the optimal intervention window has been missed, making them susceptible to disease spread and causing economic losses.
[0003] Among existing livestock health monitoring technologies, contact-based solutions, represented by wearable sensing devices, can acquire continuous data, but suffer from drawbacks such as high purchase costs, cumbersome maintenance, and a tendency to cause stress in animals, making large-scale deployment difficult. Non-contact solutions mostly remain at the level of ordinary video surveillance, only suitable for post-event traceability and lacking automated behavioral analysis and proactive early warning capabilities. Some studies have attempted to apply deep learning to livestock behavior recognition, but these generally suffer from problems such as limited recognition dimensions and a lack of systematic health reasoning, failing to transform behavioral characteristics into health risk assessments with practical reference value.
[0004] Meanwhile, cattle and sheep behavior is influenced by multiple factors such as breed, age, and season. A single fixed threshold judgment model has a high false alarm rate and lacks uncertainty reasoning and individual adaptive calibration mechanisms. Although dynamic uncertain causal graph technology has demonstrated its advantages in multi-source information fusion reasoning in the field of medical diagnosis, it has not yet been integrated with the front-end visual acquisition link in the field of livestock health early warning. Furthermore, existing intelligent farming systems mostly rely on fixed terminal deployments and lack mobile terminals adapted for on-site inspections, leading to a disconnect between early warning and response, hindering further improvements in management efficiency. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems by providing a machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep. Based on the four-layer architecture of this invention, non-contact, all-weather video monitoring is achieved through an image acquisition layer; individual tracking and front-end extraction of behavioral features are completed through an edge computing layer; health risk inference and file linkage management are achieved through a platform service layer; and on-site mobile handling and centralized back-end management are supported through an application interaction layer. This solves the problems of delayed detection by manual inspections, high responsiveness of contact monitoring equipment, and the limited identification dimensions and disconnect between early warning and on-site handling in existing intelligent solutions.
[0006] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: According to one aspect of the present invention, a machine vision-based system for identifying abnormal behavior and providing health warnings for cattle and sheep is provided, comprising an image acquisition layer, an edge computing layer, a platform service layer, and an application interaction layer, wherein the image acquisition layer includes a camera unit group for acquiring video image data of cattle and sheep herds. The edge computing layer includes an individual tracking and recognition module and a behavior feature extraction module. The individual tracking and recognition module receives video streams to perform individual detection, localization, and identity tracking. The behavior feature extraction module extracts multi-dimensional behavior feature parameters from the tracked individuals. The platform service layer includes a health reasoning and early warning module and a health record management module. The health reasoning and early warning module performs health risk fusion reasoning based on behavioral characteristic data. The health record management module stores an individual's full-cycle health records. The application interaction layer includes a mobile terminal module and a back-end management module, which are used for on-site early warning and response and centralized system management, respectively.
[0007] Preferably, the camera unit group includes multiple camera units, which are arranged inside the space enclosed by multiple enclosure walls. A ceiling mounting beam is provided at the top of each enclosure wall, and the multiple camera units are fixed to the bottom end of the ceiling mounting beam and arranged downwards. The internal ground enclosed by the multiple enclosure walls is divided into an activity area, a feeding trough, and a resting area. The feeding trough is located at the side end of the enclosure wall, the activity area is located in the middle of the internal ground, and side walls are provided at the side ends of the space enclosed by the multiple enclosure walls. The resting area is located at the side end of the side wall, and the monitoring range of the camera units covers all of the above areas.
[0008] Preferably, the edge computing layer further includes a video access unit, an abnormal event generation unit, a local storage unit, and a data upload unit. The video access unit receives video stream data from each camera unit. The abnormal event generation unit generates abnormal event records based on the deviation of behavioral characteristics from the baseline. The local storage unit caches behavioral feature data and video clips from abnormal time periods. The data upload unit uploads structured feature and event data to the platform service layer.
[0009] Preferably, the individual tracking and identification module sequentially executes the processing flow of target detection and segmentation, physical feature extraction, identity matching, new individual registration, and multi-target continuous tracking, assigning a unique identity to each cow or sheep and maintaining tracking continuity across frames and cameras.
[0010] Preferably, the behavior feature extraction module constructs a behavior feature system, which includes five dimensions: movement features, posture features, feeding and drinking features, social features, and rumination features. These correspond to quantitative parameters such as speed, activity level, trajectory, frequency of lying down / standing ratio conversion, curvature, feeding and drinking duration and frequency, group distance, isolation duration, and rumination duration and chewing frequency.
[0011] Preferably, the health reasoning and early warning module has a built-in DUCG reasoning engine. After receiving abnormal feature input, it calculates the probability values of digestive risk, exercise risk and respiratory risk respectively. The risk level judgment module then outputs health risk assessment results at three levels: normal level, observation level and early warning level.
[0012] Preferably, the health reasoning and early warning module and the health record management module have a two-way linkage relationship. The health reasoning and early warning module writes the generated early warning results into the health record management module for archiving. During the reasoning and calculation process, the health reasoning and early warning module retrieves historical record data from the health record management module as a reasoning reference.
[0013] Preferably, the mobile terminal module is built on an IP68 rugged terminal hardware platform and includes a basic service layer and an application function layer. The basic service layer is equipped with an offline caching mechanism and a data synchronization mechanism. The application function layer is set up with warning reception, file query, video retrieval, review and entry, and processing upload function nodes in sequence according to the handling process.
[0014] Preferably, the backend management module provides functions such as group health statistical analysis, equipment operation status monitoring, behavioral health knowledge base maintenance, early warning threshold parameter configuration, and account permission management, and supports filtering and viewing health status data by enclosure, breed, and age.
[0015] Preferably, the operation of the system includes the following steps: S1. Baseline learning: Collect behavioral data of cattle and sheep under normal conditions and establish baselines for individual behavioral parameters. S2. Daily monitoring: Continuously collect video footage and perform individual tracking, identification, and behavioral feature extraction. S3. Anomaly detection: Compare real-time behavioral characteristics with the individual baseline. If no anomaly is detected, return to step S2. If an anomaly is detected, proceed to the next step. S4, DUCG inference, inputs the set of abnormal features into the DUCG inference engine to calculate the probability values of multiple health risks; S5. Risk level determination: Determine the health risk level based on the comprehensive reasoning results. If the risk level is determined to be normal, return to step S2. If the risk level is determined to be warning, proceed to the next step. S6. Warning push: Send warning notifications to mobile terminals and simultaneously retrieve the corresponding individual's health records and abnormal video clips. S7. On-site verification: Management personnel conduct on-site verification and enter the verification results and handling measures into the system; S8. File update: Write the warning record and handling results into the corresponding individual's electronic health record; S9. Knowledge base optimization: Feed back the verified and labeled data to the behavioral health knowledge base to complete the model iteration optimization. After the optimization is completed, return to step S2 to continue running.
[0016] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: 1. This invention achieves non-contact video acquisition through the camera unit group of the image acquisition layer, eliminating the need to put sensors on cattle and sheep, thus avoiding animal stress. Combined with the individual tracking and recognition module and behavior feature extraction module of the edge computing layer, real-time analysis is completed at the front end, which reduces deployment and maintenance costs, reduces data backhaul bandwidth usage, and ensures the response speed of anomaly identification.
[0017] 2. This invention forms a two-way linkage between the health reasoning and early warning module of the platform service layer and the health record management module. It performs health risk fusion reasoning based on multi-dimensional behavioral characteristics and simultaneously retains the individual's full-cycle health records, which not only improves the accuracy of health early warning judgments but also ensures the integrity and traceability of health data.
[0018] 3. This invention constructs a dual-terminal interaction mode by using a mobile terminal module and a back-end management module in the application interaction layer. The mobile terminal is adapted to the needs of on-site inspection and handling, while the back-end management supports global statistical analysis and system configuration, realizing a complete closed loop from anomaly monitoring to on-site handling and then to centralized management, effectively improving the health management efficiency of cattle and sheep farming. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the camera unit deployment of the present invention; Figure 2 This is a schematic diagram of the overall system architecture of the present invention; Figure 3 This is a structural block diagram of the edge computing module of the present invention; Figure 4 This is a flowchart of the individual tracking and identification process of the present invention; Figure 5 This is a schematic diagram illustrating the behavioral feature dimensions of the present invention; Figure 6 This is a block diagram of the health reasoning and early warning logic of the present invention; Figure 7 This is a schematic diagram of the structure of the rugged mobile terminal of the present invention; Figure 8 This is a flowchart of the overall system operation method of the present invention.
[0020] In the attached diagram: 1. Enclosure wall; 2. Ceiling beam; 3. Camera unit; 4. Activity area; 5. Feeding trough; 6. Resting area; 7. Side wall. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments. However, it should be noted that many details listed in the specification are merely to provide the reader with a thorough understanding of one or more aspects of the invention, and these aspects of the invention can be achieved even without these specific details.
[0022] Please see Figures 1 to 8 This invention provides a machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep. The technical solution is as follows: This embodiment of a machine vision-based system for identifying abnormal behavior and health warning of cattle and sheep includes an image acquisition layer, an edge computing layer, a platform service layer, and an application interaction layer. The image acquisition layer includes three sets of camera units for acquiring video image data of cattle and sheep groups. The edge computing layer includes an individual tracking and recognition module and a behavior feature extraction module. The individual tracking and recognition module receives video streams to detect, locate, and track individuals, while the behavior feature extraction module extracts multi-dimensional behavior feature parameters from the tracked individuals. The platform service layer includes a health reasoning and early warning module and a health record management module. The health reasoning and early warning module performs health risk fusion reasoning based on behavioral characteristic data, while the health record management module stores an individual's full-cycle health records. The application interaction layer includes a mobile terminal module and a back-end management module, which are used for on-site early warning and response and centralized system management, respectively.
[0023] It is worth noting that, in order to achieve full-area video coverage without blind spots in the enclosures, the camera unit group 3 specifically includes multiple camera units 3, which are set inside the space enclosed by multiple enclosure walls 1. The top of the multiple enclosure walls 1 is equipped with a ceiling mounting beam 2, and the multiple camera units 3 are fixed to the bottom of the ceiling mounting beam 2 and arranged downwards. The internal ground enclosed by the multiple enclosure walls 1 is divided into an activity area 4, a feeding trough 5, and a resting area 6. The feeding trough 5 is located at the side of the enclosure wall 1, the activity area 4 is located in the middle of the internal ground, the side wall 7 is set at the side of the space enclosed by the multiple enclosure walls 1, and the resting area 6 is located at the side of the side wall 7. The monitoring range of the camera unit 3 covers all of the above areas.
[0024] Next, in order to achieve real-time processing and lightweight uploading of video data at the front end, the edge computing layer specifically includes a video access unit, an abnormal event generation unit, a local storage unit, and a data upload unit. The video access unit receives video stream data from each camera unit 3, the abnormal event generation unit generates abnormal event records based on the deviation of behavioral characteristics from the baseline, the local storage unit caches behavioral feature data and video clips during abnormal periods, and the data upload unit uploads the structured feature and event data to the platform service layer.
[0025] Meanwhile, in order to achieve accurate identification and continuous tracking of individual cattle and sheep across regions, the individual tracking and identification module sequentially executes the processing flow of target detection and segmentation, physical feature extraction, identity matching, new individual registration, and multi-target continuous tracking, assigning a unique identity to each cattle and sheep and maintaining tracking continuity across frames and cameras.
[0026] Furthermore, in order to comprehensively quantify the multi-dimensional behavioral states of cattle and sheep and capture abnormal changes, the behavioral feature extraction module specifically constructs a behavioral feature system, which includes five dimensions: movement features, posture features, feeding and drinking features, social features, and rumination features. These correspond to quantitative parameters such as speed, activity level, trajectory, lying-standing ratio, frequency of conversion, curvature, feeding and drinking duration and frequency, group distance, isolation duration, and rumination duration and chewing frequency.
[0027] It is worth noting that, in order to achieve health risk classification and determination based on multi-feature fusion, the health reasoning and early warning module has a built-in DUCG reasoning engine. After receiving abnormal feature input, it calculates the probability values of digestive risk, exercise risk and respiratory risk respectively. The risk level determination module then outputs health risk assessment results at three levels: normal level, observation level and early warning level.
[0028] It is worth noting that, in order to achieve the linkage between the early warning results and historical archive data, the health reasoning early warning module and the health record management module have a two-way linkage relationship. The health reasoning early warning module writes the generated early warning results into the health record management module for archiving, and the health reasoning early warning module retrieves historical archive data from the health record management module as a reference for reasoning during the reasoning calculation process.
[0029] It is worth noting that, in order to adapt to the complex environment of the farm and support the complete disposal process, the mobile terminal module is built on the IP68 rugged terminal hardware platform, which includes a basic service layer and an application function layer. The basic service layer is equipped with an offline caching mechanism and a data synchronization mechanism. The application function layer is set up with alarm receiving, file query, video retrieval, review and entry and disposal upload function nodes in sequence according to the disposal process.
[0030] It is worth noting that, in order to achieve overall health control and system operation and maintenance management of the farm, the back-end management module provides functions such as population health statistical analysis, equipment operation status monitoring, behavioral health knowledge base maintenance, early warning threshold parameter configuration, and account permission management. It supports filtering and viewing health status data by pen, breed, and age.
[0031] Finally, in order to achieve closed-loop system operation and continuous iterative optimization of the model, the specific operation of the system includes the following steps: S1. Baseline learning: Collect behavioral data of cattle and sheep under normal conditions and establish baselines for individual behavioral parameters. S2. Daily monitoring: Continuously collect video footage and perform individual tracking, identification, and behavioral feature extraction. S3. Anomaly detection: Compare real-time behavioral characteristics with the individual baseline. If no anomaly is detected, return to step S2. If an anomaly is detected, proceed to the next step. S4, DUCG inference, inputs the set of abnormal features into the DUCG inference engine to calculate the probability values of multiple health risks; S5. Risk level determination: Determine the health risk level based on the comprehensive reasoning results. If the risk level is determined to be normal, return to step S2. If the risk level is determined to be warning, proceed to the next step. S6. Warning push: Send warning notifications to mobile terminals and simultaneously retrieve the corresponding individual's health records and abnormal video clips. S7. On-site verification: Management personnel conduct on-site verification and enter the verification results and handling measures into the system; S8. File update: Write the warning record and handling results into the corresponding individual's electronic health record; S9. Knowledge base optimization: Feed back the verified and labeled data to the behavioral health knowledge base to complete the model iteration optimization. After the optimization is completed, return to step S2 to continue running.
[0032] The specific working principles and implementation details of the above-mentioned modules are further explained below: The image acquisition layer consists of three camera units, each equipped with a wide-angle lens and infrared illumination, supporting 24 / 7 video acquisition. During the day, it uses visible light mode, automatically switching to infrared mode at night and in low-light conditions to ensure image acquisition quality under varying lighting conditions. Each camera unit has a resolution of at least two megapixels and a frame rate of at least fifteen frames per second to meet the temporal resolution requirements of behavioral analysis. Each camera unit connects to the edge computing node via a wired or wireless local area network for real-time video streaming.
[0033] The edge computing layer is deployed in edge computing hosts at the farm site. A single edge computing host can simultaneously process video streams from multiple camera units 3. The individual tracking and recognition module adopts a lightweight instance segmentation network architecture to detect, locate, and extract the contours of individual cattle and sheep in the video frames, generating a mask region and centroid coordinates for each individual. Combined with a multi-target tracking algorithm, a unique identifier is assigned to each detected individual, enabling continuous tracking across frames. This module has a built-in body feature comparison mechanism, which matches individual identities through visual dimensions such as back contour morphology, body proportions, and angular features, ensuring that the identity of the same cattle or sheep remains consistent when moving between different camera unit 3 coverage areas. For newly joined individuals, the system automatically registers and establishes an initial observation profile.
[0034] The behavioral feature extraction module, based on individual tracking, performs multi-dimensional temporal behavioral analysis on each cattle and sheep, extracting five categories of quantitative feature parameters. The movement feature dimension includes average movement speed, total activity per unit time, movement trajectory complexity, and the proportion of vigorous movement. The posture feature dimension includes the percentage of time spent standing, the percentage of time spent lying down, the frequency of lying-standing transitions, spinal curvature, and head swaying frequency. The feeding and drinking feature dimension includes feeding duration, feeding frequency, drinking duration, and the distribution of time spent in feeding areas. The social feature dimension includes the distance between the individual and the group center, the number of neighboring individuals, the duration of solitary stay, and the degree of group following. The rumination feature dimension includes total rumination duration, rumination frequency, the duration of a single rumination, and chewing frequency.
[0035] The behavioral feature extraction module is equipped with an adaptive baseline calibration mechanism to establish an independent behavioral parameter baseline for each cattle and sheep. The system learns the distribution of various behavioral parameters under normal conditions through continuous observation, and dynamically adjusts the baseline reference range by considering factors such as breed attributes, growth stage, seasonal temperature, and diurnal rhythm, avoiding misjudgments caused by using a uniform fixed threshold. When real-time behavioral parameters deviate from the individual baseline by a set amount, it is marked as an abnormal behavioral feature event, and the abnormality type, degree of deviation, and duration are recorded.
[0036] The platform service layer is deployed on the server side, which can be either local data center deployment or public cloud deployment. The health inference and early warning module incorporates a bovine and sheep behavioral health knowledge base and a dynamic uncertain causal inference engine. The Dynamic Uncertain Causal Graph (DUCG) is a well-known algorithm for multi-source uncertain information fusion inference, capable of calculating the probability of various health risks by comprehensively considering multiple abnormal behavioral features. The knowledge base is constructed based on the correspondence between common bovine and sheep health problems and their behavioral representations, covering behavioral feature combinations of various health risks such as digestive system abnormalities, musculoskeletal system abnormalities, respiratory system abnormalities, febrile diseases, and stress responses. The inference engine receives the abnormal feature set uploaded by the behavioral feature extraction module, uses the DUCG algorithm for multi-evidence fusion inference, calculates the probability of various health risks, and comprehensively outputs the individual health risk level. The health risk level is divided into three levels: normal, observation, and warning.
[0037] The health record management module establishes a full-lifecycle electronic health record for each cattle and sheep. The record includes basic individual information, behavioral baseline data, historical behavioral trend curves, all warning records, on-site verification records, and treatment results. The system supports retrieving individual behavioral change curves by time dimension and supports the associated storage and playback of video clips from abnormal periods, providing complete behavioral data support for veterinary on-site diagnosis. On-site treatment results can be back-entered into the system for continuous optimization and iteration of the knowledge base. A two-way data linkage is established between the health inference and warning module and the health record management module; warning results are written to the record in real time, and historical record data is retrieved as a reference during inference calculations.
[0038] The mobile terminal module of the application interaction layer adopts an IP68-rated rugged smart terminal, adaptable to the complex operating environment of farms, including dust, humidity, and occasional collisions. The terminal has a built-in dedicated application that supports receiving real-time alerts, viewing individual health records, retrieving on-site video footage, and entering verification results and handling records. When farm workers carry the terminal for inspections in the pens, they can directly view the health status of nearby cattle and sheep and immediately go to the site to verify any alerts received. The terminal supports uploading supplementary records by taking photos on-site, and supports offline data caching and automatic synchronization after network recovery, adapting to the actual situation of unstable network signals in farms.
[0039] The backend management module provides system management and data analysis functions for farm managers and technicians. The group overview page displays visualized data such as the overall health level distribution of cattle and sheep, early warning trend line graphs, and comparisons of abnormality rates in different areas, supporting filtering by pen, breed, and age group. The equipment management function allows viewing the online status and operating parameters of each camera unit and edge node, and supports remote configuration of parameters such as acquisition frame rate and early warning sensitivity. The knowledge base management function allows professionals to maintain and adjust the rules and weights of the behavioral health knowledge base, and supports importing behavioral characteristic models of new breeds. System settings include account permission management, early warning recipient configuration, custom early warning rules, data backup, and log auditing.
[0040] Example 1: This example is an application scenario for a single-building beef cattle fattening farm.
[0041] The enclosure walls 1 form a single fattening cattle shed space, housing eighty fattening beef cattle. Roof beams 2 are installed longitudinally along the shed, housing four camera units 3, covering the feeding area, central activity area, resting area, and passageway area respectively. The monitoring ranges of the four camera units 3 overlap, achieving complete coverage of the shed without blind spots.
[0042] The edge computing hosts are deployed in the terminal equipment room of the cattle pens, with each host processing four video streams simultaneously. After the system goes live, it first enters a ten-day baseline learning period. The individual tracking and identification module completes the registration of all eighty cattle, while the behavioral feature extraction module collects daily movement, posture, feeding, rumination, and other behavioral data for each animal to establish an individual baseline. After the baseline learning is completed, the system switches to daily monitoring mode.
[0043] During daily operation, the edge computing layer processes video streams in real time, continuously tracking the location and behavioral status of each beef cattle. When a beef cattle exhibits multiple abnormal behaviors, such as a significant increase in the frequency of lying down and standing up, a significant decrease in rumination time, and a decrease in feeding frequency, the abnormal event generation unit generates an abnormal record and uploads it to the platform service layer. The health inference and early warning module calls the DUCG inference engine for comprehensive analysis, combining it with the cattle's historical data, and determines it to be at the digestive system risk warning level. It then pushes an early warning message to the mobile terminal of the on-duty feeder, including the cattle's number, location, a summary of the abnormal behavior, and suggested inspection directions.
[0044] The zookeeper, carrying a mobile terminal for disease prevention and control, went to the corresponding pen to check and confirmed that the cow was showing signs of decreased appetite and a slightly elevated body temperature. The results and initial treatment measures were then entered into the system. The treatment record was simultaneously updated to the cow's electronic health record, and relevant data was fed back into the knowledge base for subsequent model optimization. The entire process, from the occurrence of behavioral abnormalities to the completion of on-site treatment, was significantly shorter than the traditional manual inspection method, effectively avoiding delays in diagnosis.
[0045] Example 2: This example is a scenario of centralized management of multiple pens in a large-scale sheep breeding park.
[0046] The park has a total of twelve sheep pens. Each pen is divided into independent feeding spaces by the pen wall 1 and side walls 7, and each pen houses 150 breeding ewes. Three camera units 3 are installed on the roof beams 2 of each pen, covering the feeding trough area 5, the central activity area 4, and the resting area 6, respectively, forming a complete monitoring coverage.
[0047] The park's central computer room deploys a centralized platform service layer, while each enclosure deploys edge computing nodes. All nodes are connected to the central platform via the park's local area network. The backend management module centrally manages all twelve enclosures' camera units 3 and edge nodes, supporting an overall health status overview and individual enclosure statistical analysis.
[0048] During daily operation, each edge node independently tracks and extracts behavioral characteristics of the sheep in its own pen, and the structured data is aggregated to the central platform for health inference and record management. The platform service layer monitors the health status of more than 1,800 sheep in the entire farm in parallel, generating hourly health status statistical reports for each pen. When multiple sheep in a pen simultaneously exhibit abnormal characteristics such as decreased activity levels and increased group spacing, the system not only generates individual warnings but also automatically triggers group health risk alerts, reminding managers to pay attention to the overall health status and environmental parameters of that pen.
[0049] The park's veterinarians can view the overall early warning distribution trend through the back-end management module, and comprehensively judge whether there is a group health risk by combining the abnormal characteristics of the population, and coordinate the arrangement of patrols and prevention and control measures. Mobile terminal modules are distributed to the keepers of each pen, enabling tiered early warning and tiered response. Ordinary abnormalities are verified on-site by the keepers, while high-risk warnings are simultaneously pushed to the veterinarian's terminal, forming a hierarchical management system. Through centralized management of multiple pens and population risk analysis, the overall health prevention and control capabilities of the large-scale breeding park have been effectively improved.
[0050] Combination Figures 1-8 The specific usage process of the machine vision-based abnormal behavior recognition and health early warning system for cattle and sheep in this embodiment is as follows: 1. System Deployment and Baseline Learning. The user plans the installation locations of camera units 3 based on the pen layout and the activity range of the cattle and sheep. Camera units 3 are fixed below the ceiling beam 2, and the tilt angle is adjusted to ensure that the feeding trough 5, activity area 4, and resting area 6 are all within the monitoring coverage area, and that adjacent camera units 3 have overlapping areas. Each camera unit 3 is connected to the edge computing host via a local area network, and the edge computing host connects to the platform service layer to complete system integration. Before the system officially goes into operation, it first enters the baseline learning phase, the duration of which is determined according to the population size, typically seven to fourteen days. During the baseline learning period, the individual tracking and identification module completes the identity registration of all cattle and sheep in the farm, assigning a unique identification identifier to each animal. The behavioral feature extraction module continuously collects daily behavioral data for each animal, including five dimensions of parameters: movement speed, standing / lying rhythm, feeding duration, rumination pattern, and social distance. Statistics are compiled to form the normal distribution range of each parameter, establishing an independent behavioral baseline for each animal. During the baseline establishment process, the system is classified and calibrated in conjunction with factors such as breed, age, and seasonal temperature to ensure that the baseline accurately reflects the normal state of the individual.
[0051] 2. Daily Automatic Monitoring and Operation. After baseline learning is completed, the system enters daily monitoring mode. The three camera units in the image acquisition layer continuously capture video footage around the clock, automatically activating infrared illumination in low-light environments to ensure image clarity. The edge computing layer pulls video streams from various sources in real time, and the individual tracking and recognition module detects individual cattle and sheep in the footage frame by frame, generating mask contours and centroid coordinates. A multi-target tracking algorithm maintains identity continuity. When cattle or sheep move from the coverage area of one camera unit 3 to the coverage area of another, the system completes cross-camera identity relay through physical feature comparison, ensuring uninterrupted observation data. The behavior feature extraction module statistically analyzes various behavioral parameters for each individual at fixed time windows, comparing real-time statistics with the individual baseline to calculate the degree of deviation. When no anomalies are detected, the system continues to run silently, only periodically uploading and archiving routine behavior data. When abnormal features are detected, an anomaly event record is generated and uploaded to the platform service layer in real time.
[0052] 3. Tiered Early Warning Response and On-site Handling. Upon receiving an abnormal event, the platform service layer's health inference early warning module retrieves the corresponding individual's historical data and combines it with the current abnormal characteristic set, inputting it into the DUCG inference engine for comprehensive calculation. It assesses the probability of various health risks, including those to the digestive, musculoskeletal, and respiratory systems, ultimately determining the health risk level. If determined to be at the normal level, no additional actions are triggered, and the system maintains routine monitoring. If determined to be at the observation level, the system adds the individual to the key observation list in the backend management module and highlights it, pushes a lightweight alert message to the inspection personnel, and automatically increases the sampling frequency of the individual's behavioral characteristics to strengthen monitoring density and continuously track changes in abnormal behavior. If the abnormal characteristics persist or worsen, it automatically escalates to the early warning level. If determined to be at the early warning level, the system immediately pushes an early warning notification to the designated caretaker's IP68 three-proof mobile terminal. The notification includes the individual's ID, location in the enclosure, a summary of the abnormal behavior, a risk type alert, and suggested handling directions. Keepers carry mobile devices to the corresponding enclosures for on-site verification. They use the devices to retrieve the individual's historical behavioral trend curves and video clips from abnormal periods to aid in the judgment. After the verification is completed, the verification results and on-site handling measures are entered into the device, which is then automatically synchronized to the platform service layer.
[0053] 4. File Updates and Continuous System Optimization. After on-site verification, the health record management module automatically incorporates the warning record, abnormal behavior details, video clips, verification results, and handling measures into the corresponding individual's electronic health record, forming a complete health event record chain. Individual health records support backtracking queries by time dimension, providing behavioral data support for veterinary clinical diagnosis. During system operation, all warning results confirmed by manual verification are periodically summarized as labeled data and fed back to the behavioral health knowledge base for model iteration training, gradually improving the risk judgment accuracy of the DUCG inference engine over time. The backend management module regularly generates daily, weekly, and monthly health statistics reports. Managers can view data such as the overall health level distribution, warning occurrence trends, and abnormal occurrence rates in each pen through the backend, thereby optimizing feeding management strategies. The system as a whole forms a complete closed loop from monitoring, warning, handling to optimization, continuously improving its adaptability and accuracy during operation.
[0054] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A machine vision-based system for identifying abnormal behavior and providing health early warning in cattle and sheep, characterized in that, It includes an image acquisition layer, an edge computing layer, a platform service layer and an application interaction layer. The image acquisition layer includes a camera unit (3) group for acquiring video image data of cattle and sheep groups. The edge computing layer includes an individual tracking and recognition module and a behavior feature extraction module. The individual tracking and recognition module receives video streams to perform individual detection, localization, and identity tracking. The behavior feature extraction module extracts multi-dimensional behavior feature parameters from the tracked individuals. The platform service layer includes a health reasoning and early warning module and a health record management module. The health reasoning and early warning module performs health risk fusion reasoning based on behavioral characteristic data. The health record management module stores an individual's full-cycle health records. The application interaction layer includes a mobile terminal module and a backend management module, which are used for on-site early warning and response and centralized system management, respectively.
2. The machine vision-based abnormal behavior recognition and health early warning system for cattle and sheep according to claim 1, characterized in that, The camera unit (3) group includes multiple camera units (3), which are set inside the space enclosed by multiple enclosure walls (1). The top of the multiple enclosure walls (1) is provided with a ceiling mounting beam (2), and the multiple camera units (3) are fixed to the bottom end of the ceiling mounting beam (2) and arranged downwards. The internal ground enclosed by the multiple enclosure walls (1) is divided into an activity area (4), a feeding trough (5), and a resting area (6). The feeding trough (5) is set on the side of the enclosure wall (1), the activity area (4) is located in the middle of the internal ground, the side of the space enclosed by the multiple enclosure walls (1) is provided with a side wall (7), and the resting area (6) is set on the side of the side wall (7). The monitoring range of the camera unit (3) covers all the above areas.
3. The machine vision-based abnormal behavior recognition and health early warning system for cattle and sheep according to claim 2, characterized in that, The edge computing layer also includes a video access unit, an abnormal event generation unit, a local storage unit, and a data upload unit. The video access unit receives video stream data from each camera unit (3). The abnormal event generation unit generates abnormal event records based on the deviation of behavioral characteristics from the baseline. The local storage unit caches behavioral feature data and video clips during abnormal periods. The data upload unit uploads structured feature and event data to the platform service layer.
4. A machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep according to claim 3, characterized in that, The individual tracking and identification module sequentially executes the processing flow of target detection and segmentation, physical feature extraction, identity matching, new individual registration, and multi-target continuous tracking, assigning a unique identity to each cow or sheep and maintaining tracking continuity across frames and cameras.
5. A machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep according to claim 4, characterized in that, The behavioral feature extraction module constructs a behavioral feature system, which includes five dimensions: movement features, posture features, feeding and drinking features, social features, and rumination features. These correspond to quantitative parameters such as speed, activity level, trajectory, frequency of lying down / standing ratio conversion, curvature, feeding and drinking duration and frequency, group distance, isolation duration, and rumination duration and chewing frequency.
6. A machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep according to claim 5, characterized in that, The health reasoning and early warning module has a built-in DUCG reasoning engine. After receiving abnormal feature input, it calculates the probability values of digestive risk, exercise risk and respiratory risk respectively. The risk level judgment module outputs health risk assessment results at three levels: normal level, observation level and early warning level.
7. A machine vision-based system for identifying abnormal behavior and providing early warning of health in cattle and sheep according to claim 6, characterized in that, The health reasoning and early warning module and the health record management module have a two-way linkage relationship. The health reasoning and early warning module writes the generated early warning results into the health record management module for archiving. During the reasoning and calculation process, the health reasoning and early warning module retrieves historical record data from the health record management module as a reference for reasoning.
8. A machine vision-based system for identifying abnormal behavior and providing early warning of health in cattle and sheep according to claim 7, characterized in that, The mobile terminal module is built on an IP68 rugged terminal hardware platform and includes a basic service layer and an application function layer. The basic service layer is equipped with an offline caching mechanism and a data synchronization mechanism. The application function layer is set up with warning reception, file query, video retrieval, review and entry, and processing upload function nodes in sequence according to the handling process.
9. A machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep according to claim 8, characterized in that, The backend management module provides functions such as group health statistical analysis, equipment operation status monitoring, behavioral health knowledge base maintenance, early warning threshold parameter configuration, and account permission management. It supports filtering and viewing health status data by enclosure, breed, and age.
10. A machine vision-based system for identifying abnormal behavior and providing health early warning for cattle and sheep according to claim 9, characterized in that, The operation of the system includes the following steps: S1. Baseline learning: Collect behavioral data of cattle and sheep under normal conditions and establish baselines for individual behavioral parameters. S2. Daily monitoring: Continuously collect video footage and perform individual tracking, identification, and behavioral feature extraction. S3. Anomaly detection: Compare real-time behavioral characteristics with the individual baseline. If no anomaly is detected, return to step S2. If an anomaly is detected, proceed to the next step. S4, DUCG inference, inputs the set of abnormal features into the DUCG inference engine to calculate the probability values of multiple health risks; S5. Risk level determination: Based on the comprehensive reasoning results, determine the health risk level. If it is determined to be normal, return to step S2. If it is determined to be observation level, generate an observation prompt and return to step S2 to strengthen monitoring. If it is determined to be warning level, proceed to the next step. S6. Warning push: Send warning notifications to mobile terminals and simultaneously retrieve the corresponding individual's health records and abnormal video clips. S7. On-site verification: Management personnel conduct on-site verification and enter the verification results and handling measures into the system; S8. File update: Write the warning record and handling results into the corresponding individual's electronic health record; S9. Knowledge base optimization: Feed back the verified and labeled data to the behavioral health knowledge base to complete the model iteration optimization. After optimization, return to step S2 to continue running.
