System and method for cow health early warning
By collecting and analyzing channel and regional visual sensor data in large dairy farms, combining it with environmental parameters, identifying individual cows and creating behavior logs, the problem of difficulty in identifying and tracking individuals in a group environment is solved, and the automation and accuracy of early health warnings are achieved.
Patent Information
- Application Number
- CN202510793587.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In large-scale dairy farm environments, non-contact sensors have difficulty accurately identifying and tracking individual cows in a group environment, resulting in inaccurate data association and difficulty in achieving early and accurate health warnings.
By acquiring channel and regional visual sensor data through the acquisition module, using image processing and deep learning to identify individuals, combining environmental parameters and management event data, establishing behavior logs and time series databases, and using rule analysis models to identify behavioral patterns of health problems, early warning can be achieved.
It achieves accurate identification and behavior recording of individual dairy cows, integrates environmental parameters and management event data, improves the automation and accuracy of health warnings, reduces false alarms, and enables early identification of health problems.
Smart Images

Figure CN120672136A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of animal husbandry health monitoring, and in particular to a system and method for early warning of dairy cow health. Background Art
[0002] In large-scale dairy farming environments, continuous health monitoring and early warning of large numbers of cows are crucial for maintaining herd health and improving production efficiency. Traditional health monitoring methods often rely on manual observation or periodic veterinary inspections, which are inefficient and difficult to detect abnormalities early and consistently. In recent years, automated and intelligent monitoring systems have been gradually introduced into dairy farms, with sensor-based technology being a key tool.
[0003] Existing sensor monitoring solutions often utilize non-contact sensors, which continuously collect data on cow activity, physiological characteristics, and environmental data. However, non-contact monitoring presents new technical challenges in large-scale, group environments. Because sensors are deployed in a shared space rather than on individual cows, the system must accurately identify and continuously track each cow within a large group, and correctly associate the collected, distributed data with specific individuals. For example, when multiple cows feed simultaneously in a feeding alley, the vision system must distinguish between each individual and record their feeding behavior data. As cows pass through the alley, the system must quickly and accurately identify them. In resting areas of the barn, multiple cows may lie down or stand simultaneously, making accurate distinction and tracking of individual behavior equally challenging. This is one of the core challenges facing non-contact monitoring. Without accurate individual identification and data association, all subsequent health analysis becomes futile.
[0004] Therefore, in large-scale dairy farm environments, how to overcome the difficulties of individual identification and tracking in group environments based on local, event-based multimodal data collected by non-contact sensors in specific areas, effectively deal with data quality issues and environmental / management interference, integrate and analyze the correlation between cross-regional multimodal data, and identify complex behavioral patterns or abnormal combinations of physiological manifestations that indicate early health problems, and ultimately achieve early, accurate, and low-false alarm warnings for the health status of individual dairy cows, are key technical issues that need to be urgently addressed in current non-contact intelligent farm monitoring systems. Summary of the Invention
[0005] In view of the above-mentioned shortcomings of the existing technology, the present application provides a system and method for early warning of dairy cow health, which has the advantages of realizing automated monitoring, non-contact data collection, individual identification, individual behavior recording, integrating environmental parameters and management event data, analyzing based on behavior and environmental management data, identifying behavioral patterns indicating health problems, and achieving the beneficial effect of early health warning.
[0006] In a first aspect, a system for early warning of dairy cow health is provided, which is used in large-scale dairy farms to provide individual health warnings based on cow activity data collected by non-contact sensors. The system comprises: Acquisition module: acquires channel sensor data and regional vision sensor data; Identification module: uses the individual body image in the channel sensor data to identify the individual, records the time stamp of the individual passing through the channel, and uses the regional visual sensor data to detect and identify the individual in the area to obtain the identification result; Behavior recording module: Based on the time stamp of the individual passing through the channel and the recognition result, it establishes the regional time activity record of the individual in different areas to form an individual behavior log; Environmental parameter integration module: receives environmental sensor data and pasture management operation data, and establishes a time series database of environmental parameters and management events; Health warning module: Based on individual behavior logs, it extracts individual behavioral feature statistics within a specific time window, combines environmental parameters with a time series database of management events, and uses a preset rule base to perform rule analysis to identify behavioral pattern combinations that indicate health problems and achieve early health warnings.
[0007] Beneficial effects: The system and method for dairy cow health early warning proposed in this application collects dairy cow activity data, environmental parameters and management operation data, performs individual identification and behavior recording, analyzes behavior patterns in combination with environmental management data, and identifies health problems. It has the characteristics of realizing automated monitoring, contactless data collection, individual identification, individual behavior recording, integrating environmental parameters and management event data, performing analysis based on behavior and environmental management data, identifying behavior patterns indicating health problems, and realizing early health warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is an architectural diagram of a system for early warning of dairy cow health proposed in this application.
[0009] Figure 2 This is a structural diagram of a system for early warning of dairy cow health proposed in this application.
[0010] Figure 3 This is a flow chart of a method for early warning of dairy cow health proposed in this application.
[0011] Explanation of reference numerals: 101, acquisition module; 102, identification module; 103, behavior recording module; 104, environmental parameter integration module; 105, health warning module. DETAILED DESCRIPTION
[0012] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and marked in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work fall within the scope of protection of the present application.
[0013] It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0014] Please refer to Figure 1 、 Figure 2 A system for early warning of dairy cow health, used in large-scale dairy farms, provides individual health warnings based on cow activity data collected by non-contact sensors. The system includes: Acquisition module 101: Acquisition of channel sensor data and regional visual sensor data; Identification module 102: uses the individual body image in the channel sensor data to identify the individual, records the time stamp of the individual passing through the channel, and uses the regional visual sensor data to detect and identify the individual in the area to obtain the identification result; Behavior recording module 103: Based on the time stamp of the individual passing through the channel and the recognition result, it establishes the regional time activity record of the individual in different areas to form an individual behavior log; Environmental parameter integration module 104: receives environmental sensor data and pasture management operation data, and establishes a time series database of environmental parameters and management events; Health warning module 105: Based on individual behavior logs, extract individual behavior feature statistics within a specific time window, combine environmental parameters with the time series database of management events, use the preset rule base to perform rule analysis, identify behavioral pattern combinations indicating health problems, and achieve early health warning.
[0015] Acquisition module 101 is responsible for collecting the basic data required by the system. Specifically, channel sensor data is acquired by sensors deployed at channel locations, recording information about individuals passing through the channel. Area visual sensor data is acquired by visual sensors deployed within the area, monitoring the activities of individuals within the area. Thus, the system obtains basic data about individuals passing through specific locations and their activities within the area.
[0016] The identification module 102 receives data from the acquisition module and performs individual identification. It uses the individual's body image from the channel sensor data to identify the individual and records the timestamp of the individual's passage through the channel. Simultaneously, it uses the regional visual sensor data to detect individuals within the area, confirm their presence, and perform individual identification, generating identification results for individuals within the area. This solves the technical problem of distinguishing and tracking individual cows in a group environment, ensuring that subsequent behavioral data is specific to each individual.
[0017] The behavior recording module 103 receives the output of the recognition module and constructs an individual's behavioral history. Based on the timestamps of the individual's passage through the channel and the recognition results of individuals within the region, it creates a regional and temporal record of the individual's activities in different areas. These records are integrated into an individual behavior log. This module converts discrete recognition events into structured individual behavior trajectories and regional residence information, providing a data foundation for subsequent behavioral analysis.
[0018] The environmental parameter integration module 104 is responsible for collecting external information that influences cow behavior and health. It receives environmental parameter data, such as temperature and humidity, collected by environmental sensors. It also receives pasture management operation data, such as feeding and milking records. This data is integrated and used to build a time series database. Environmental and management factors can influence cow behavior and health, and this module provides important contextual information that can be used to explain behavioral changes or as an aid for early warning.
[0019] The health warning module 105 is the core analysis component of the system. Based on individual behavior logs, it extracts statistical characteristics of individual behavior within a specific time window. It then analyzes behavioral patterns using a pre-set rule base, combining environmental parameters with corresponding information from a time series database of managed events. By identifying specific combinations of behavioral patterns that indicate health issues, the system can determine whether an individual has potential health risks and issue an early warning. This solves the technical problem of identifying complex health-related patterns from multi-source data, enabling early warning capabilities.
[0020] In some specific embodiments, the acquisition module 101 can be configured as follows: the lane sensor uses an industrial camera installed at the entrance of the milking lane to capture side views of passing cows at a rate of 5 frames per second, and a matching timestamp recording unit records the precise time each cow passes through the lane. The area vision sensor uses a wide-angle camera installed approximately 5 meters above the feeding area, covering the entire feeding area, and capturing area images at a rate of 1 frame per second.
[0021] Identification module 102 can be configured to use images captured by channel cameras to extract physical features of cows, such as coat color distribution and body outline, using image processing algorithms. These features are then matched against a pre-established database of individual features to determine individual identities. Simultaneously, using images captured by regional cameras, an object detection algorithm is used to identify individual cows within the images, extract their physical features, and match them against the database of individual features to determine the identities of individuals within the region. Correlating channel timestamps with regional recognition results can assist in confirming the identities of individuals within the region.
[0022] The behavior recording module 103 can be configured to create a database table for storing individual behavior logs. When the recognition module identifies an individual within an area, it queries the log for the most recent record of the individual in that area based on their identity and recognition time. If a record exists and the time interval is less than a set threshold (e.g., 5 minutes), the end time of the record is updated. If the time interval is greater than the threshold or no record exists, a new record is created, recording the individual's identity, area identifier, and entry time. When an individual leaves the area (e.g., if they are not detected in multiple consecutive image frames), the departure time is recorded, the dwell time is calculated, and the log record is updated.
[0023] Environmental parameter integration module 104 can be configured to connect to temperature and humidity sensors via standard interfaces (e.g., Modbus TCP) to collect real-time environmental data. It can also access operational records for feeding, milking, immunization, and medical treatment, including operation times and individual information, through the API provided by the farm management software. This data is cleaned and stored in a time series database, such as InfluxDB.
[0024] The health warning module 105 can be configured to: set a sliding time window (for example, 24 hours). Based on the individual behavior log, calculate the behavioral feature statistics of each individual within the window, such as the total activity time, the proportion of residence time in a specific area (such as a rest area), the frequency of visits to the feeding area, etc. The environmental average value (such as the average temperature) and the number of management events (such as the number of milking times) within the window are extracted from the environmental parameter and management event database. These behavioral feature statistics and environmental management feature vectors are input into a rule engine. The rule engine contains preset rules, such as "If the proportion of an individual's residence time in the rest area is higher than the normal level for 48 consecutive hours and the ambient temperature during the same period is higher than 30 degrees Celsius, a heat stress warning is triggered." When the rule is triggered, the system generates a health warning message, for example, pushed to ranch managers via SMS or an application.
[0025] Furthermore, the acquisition module includes: Parameter setting module: sets the image acquisition parameters of channel sensors and area vision sensors; The first acquisition module: according to the set image acquisition parameters, the channel sensor is used to collect the body image of the individual passing through the channel, and the passing time stamp of the individual passing through the channel is recorded; The second acquisition module: uses the regional visual sensor to collect individual activity images in the area according to the set image acquisition parameters; Data synchronization module: synchronizes individual body images with regional vision sensor images to ensure that channel sensor data and regional vision sensor data are aligned in time.
[0026] Specifically, the first acquisition module is specifically responsible for acquiring the physical image of the individual when passing through the channel from the channel sensor, and accurately recording the passing timestamp, providing key information for subsequent individual identification. The second acquisition module is specifically responsible for acquiring the activity images of individuals in the area from the regional vision sensor, which are used for subsequent individual detection and behavior analysis. In order to solve the problem of time asynchrony between different sensor data, the data synchronization module performs time alignment processing on the collected channel sensor data and regional vision sensor data. For example, the data can be timestamp calibrated based on the sensor's internal clock or external synchronization signal to ensure that the timestamp of the individual passing through the channel can be accurately associated with the individual activity image detected in the area, avoiding recognition errors or behavior recording deviations caused by time deviations. Through these steps, this solution overcomes the challenges of data collection in group environments and provides a reliable data foundation for subsequent individual identification, behavior recording, and health warnings.
[0027] Furthermore, the identification module includes: The first extraction module: extracts texture features, color histogram features and local binary pattern features of individual body images; Feature construction module: associates individual visual features with individual passing timestamps recorded by channel sensors and stores them in the individual visual feature database; Detection module: Utilizes images collected by regional vision sensors and uses a deep learning target detection model to perform individual detection, obtaining the detection frame and confidence level of individuals within the region. The second extraction module: extracts the texture features, color histogram features and local binary pattern features of the individual in the area based on the position information of the detection frame; Identification submodule: matches the visual features of individuals in the area with the visual features in the individual visual feature database, calculates the similarity score, and determines the identification results of individuals in the area based on the individual's timestamp.
[0028] Specifically, this solution uses a recognition module to address the challenges of accurately extracting individual features from images, correlating individual information collected by different sensors, and reliably detecting and identifying individuals in complex regional environments. First, the first extraction module processes individual body images captured by channel sensors, extracting visual features such as texture, color histograms, and local binary patterns that describe the individual's appearance. The feature construction module associates these visual features with the timestamp of the individual's passage through the channel, establishing an initial association between the individual's identity and the visual features, and storing them in a database. Next, the detection module uses a deep learning model to analyze the regional visual sensor images, localize the individual within the region, and output a detection bounding box. The second extraction module extracts the visual features of the individual within the region based on the detection bounding box. Finally, the recognition submodule compares the visual features of the individual within the region with known features in the database and calculates similarity. Combined with the timestamp information of the individual's passage through the channel (for example, to narrow the search range or assist in identification), the recognition submodule determines the identity of the individual within the region. Through this series of steps, this solution achieves accurate detection and identification of individual dairy cows in complex pasture environments, providing foundational data for subsequent behavioral recording and health alerts.
[0029] Furthermore, the detection module includes: The first building block is to construct an image dataset containing images of cows in multiple categories, including healthy and sick cows, and to annotate the image dataset, including the bounding box locations of individual cows. Augmentation module: uses data augmentation techniques to augment image datasets, including random rotation, scaling, translation, cropping, and color perturbation. Training module: Select a pre-trained deep learning object detection model, use the expanded image dataset to perform fine-tuning training, and optimize the model parameters; Detection submodule: Deploy the trained deep learning target detection model to the regional vision sensor, perform real-time individual detection on the collected images, and obtain the detection box and confidence of the individuals in the area. The detection box is used to determine the position of the individual in the image.
[0030] Specifically, this solution constructs and annotates an image dataset, collecting images of both healthy and diseased cows and annotating the bounding boxes of individual cows. This provides a foundation for the model to learn to identify individual cows and their locations. Furthermore, data augmentation techniques are employed to augment the dataset through rotation, scaling, translation, cropping, and color perturbation. This increases the number of training samples, enabling the trained model to handle images of varying viewpoints, sizes, positions, and lighting conditions in real-world pasture environments, improving the model's ability to handle unseen data. Therefore, a model previously trained on general data is selected and retrained using the augmented cow dataset. This adapts the model to the target cow and the image characteristics of the pasture environment, adjusting model parameters and ensuring that the model produces satisfactory results for the cow detection task. Finally, the trained model is deployed on a regional vision sensor. The sensor captures images in real time, and the model processes them, outputting detection bounding boxes and confidence scores for individual cows. The detection bounding boxes provide information about the individual cow's location within the image, laying the foundation for subsequent processing. These steps work together to address the problem of individual cow detection in a pasture setting by providing structured training data, increasing the number of data samples, leveraging the strengths of already trained models, and performing targeted training.
[0031] Furthermore, the behavior recording module includes: Create module: create an empty individual behavior log; Judgment module: For each individual detected by the regional visual sensor, based on its identity recognition results, query the individual behavior log to determine whether there is an activity record for the individual; First update module: If an individual's activity record already exists, the individual's residence time in the corresponding area is updated according to the current detection timestamp, and the updated activity record is added to the individual's behavior log; New module: If there is no activity record for the individual, a new activity record is created in the individual behavior log, recording the start timestamp of the individual entering the area, initializing the individual's residence time in the area, and adding the activity record to the individual behavior log; Second update module: When an individual leaves an area, the departure timestamp is recorded, the individual's actual residence time in the area is calculated, and the complete activity record including the area identification, entry timestamp, exit timestamp and residence time is updated to the individual behavior log.
[0032] Specifically, this technical solution realizes the construction of individual behavior logs through collaborative work. First, the creation module prepares the log structure. Then, when the regional visual sensor detects and identifies an individual, the judgment module checks whether there is an ongoing activity record of the individual in the current area. If so, the first update module updates the individual's residence time in the area based on the current detection timestamp. For example, the continuity of the residence can be indirectly reflected by updating the last detection timestamp. If not, the new creation module creates a new activity record for the individual in the area, records the starting timestamp of the individual entering the area, and starts calculating its residence time in the area. When the system determines that the individual has left a certain area, for example, the individual has not been detected in the area for a long time, or is detected in another area, the second update module will record the timestamp of the individual leaving the area, calculate the total actual residence time of the individual in the area from entry to exit, and update the complete activity record including the area identification, entry timestamp, exit timestamp and actual residence time to the individual behavior log. In this way, the system can convert discrete individual detection events into continuous and accurate records of individual activity time and residence time calculations in different areas, overcoming the problem of difficulty in constructing continuous behavior logs by relying solely on event timestamps, and providing a reliable data foundation for subsequent behavioral feature extraction and health warnings.
[0033] Furthermore, the first update module includes: The first acquisition module: if an individual already has an activity record, obtain the departure timestamp of the individual's last activity record in the corresponding area; The first judgment module: judges whether the time difference between the current detection timestamp and the departure timestamp is less than a preset time threshold; The third update module: If the time difference is less than the preset time threshold, the individual is determined to be in continuous activity, the individual's residence time in the corresponding area is updated according to the current detection timestamp, and the updated activity record is added to the individual behavior log; The first new module: If the time difference is greater than or equal to the preset time threshold, the individual is judged to be non-continuously active, the departure timestamp of the last activity record is updated to the departure timestamp before the current detection timestamp, and a new activity record is created based on the current detection timestamp, recording the starting timestamp of the individual entering the area, and initializing the individual's residence time in the area, and adding the activity record to the individual behavior log.
[0034] Specifically, this technical solution solves the problem of accurately distinguishing whether an individual is continuously active in an area or re-entering after a period of absence when updating individual behavior logs. Once the area vision sensor detects an individual and completes identification, the system first uses the first acquisition module to check whether there is any historical activity record for the individual in the area. If so, the system then retrieves the departure timestamp from that record.
[0035] Subsequently, the first judgment module calculates the time difference between the current detection timestamp and the departure timestamp, and compares it with the preset time threshold. If the time difference is less than the threshold, the third update module determines that the individual activity is continuous, uses the current detection timestamp to update the individual's residence time in the area, and updates the behavior log. Thus, accurate timing of continuous activities is ensured. If the time difference is greater than or equal to the threshold, the first new creation module determines that the individual activity is discontinuous, first updates the departure timestamp of the last activity record to complete the record of the visit, and then creates a new activity record based on the current detection timestamp, marks the new entry time and initializes the residence time, and adds it to the behavior log. By introducing a time threshold and executing different processing logic according to the time difference, the scheme can accurately record the continuous and discontinuous activities of individuals in different areas, avoid erroneously merging multiple independent area visits into one record, thereby improving the accuracy of the behavior log and providing a more reliable data basis for subsequent health warning analysis.
[0036] Furthermore, the environmental parameter integration module includes: Configuration module: Configure environmental sensors and pasture management operation data interfaces. Environmental sensors include temperature sensors, humidity sensors, light intensity sensors, and ammonia concentration sensors. Pasture management operation data interfaces include feeding record interfaces, milking record interfaces, immunization record interfaces, and medical record interfaces. The third acquisition module: collects environmental parameter data in real time through the configured environmental sensors, and obtains pasture management operation data in real time through the configured pasture management operation data interface; Data processing module: cleans the collected environmental parameter data and the acquired pasture management operation data to obtain cleaned environmental parameter data and pasture management operation data; The second building block: Based on the cleaned environmental parameter data and pasture management operation data, a time series database of environmental parameters and management events is established.
[0037] Specifically, the environmental parameter integration module establishes connection channels with various data sources through the configuration module. The third acquisition module starts the data acquisition process and continuously obtains real-time data streams from environmental sensors and pasture management systems. These raw data are sent to the data processing module for quality control to remove noise and errors and ensure the accuracy and consistency of the data. For example, for temperature sensor data, the processing module can check whether the value exceeds the reasonable range; for management records, the integrity of the data field can be verified. The cleaned environmental parameter data and management operation data are then received by the second construction module and inserted into the time series database according to the timestamp of their occurrence. This database structuredly stores the changes in the pasture environment over time and the history of key management events, providing the necessary time context and environmental background for subsequent health warning analysis, solving the problem of effectively acquiring, processing and integrating multi-source heterogeneous data.
[0038] Furthermore, the health warning module includes: The third extraction module: Based on the individual behavior log, the sliding window method is used to extract the average movement speed, activity radius, proportion of static time, number of eating and drinking times of the individual within a specific time window to form behavioral feature statistics; The fourth extraction module extracts the average temperature, average humidity, peak ammonia concentration, number of feeding events, number of milking events, and number of immunization events corresponding to a specific time window from the time series database of environmental parameters and management events to form an environmental management feature vector; Evaluation module: Input behavioral characteristic statistics and environmental management feature vectors into the preset rule analysis model to assess the risk probability of individuals suffering from different health problems; Early warning submodule: Based on the risk probability output by the rule analysis model and the preset risk threshold, it determines whether the individual has potential health risks. If the risk probability of any health problem exceeds the corresponding risk threshold, the individual is judged to have potential risk of the health problem and a health warning message is issued to the user.
[0039] Specifically, the health warning module operates as follows: First, the third extraction module obtains individual regional and temporal activity records from individual behavior logs. Using a sliding window approach, for example, a 24-hour sliding window is set, which moves along the time axis with a fixed step size (e.g., 1 hour). For each behavior record within this window, the module calculates the individual's average movement speed, activity radius, percentage of time spent stationary, and the number of times they eat and drink, thereby generating behavioral characteristic statistics.
[0040] At the same time, the fourth extraction module extracts environmental parameters (such as average temperature, average humidity, and peak ammonia concentration) and management events (such as the number of feeding events, milking events, and immunization events) within the time period corresponding to the current sliding window from the time series database of environmental parameters and management events, thereby forming an environmental management feature vector.
[0041] The evaluation module then feeds the extracted behavioral feature statistics and environmental management feature vectors into a pre-set rule analysis model. This model, trained based on historical data, analyzes the correlation between these feature combinations and different health issues (such as lameness, mastitis, and reproductive disorders), outputting the individual's risk probability for each health issue. For example, the model might identify a behavioral pattern characterized by a significant increase in the proportion of inactivity and a decrease in feeding times, which, combined with the environmental factor of an ambient temperature exceeding a threshold, is associated with heat stress or disease risk. Finally, the early warning submodule receives the risk probability output by the evaluation module. For each potential health issue, a corresponding risk threshold is preset.
[0042] The early warning submodule compares the calculated risk probability with the corresponding threshold. If the risk probability of any health issue exceeds its preset threshold, the system determines that the individual is at potential risk for that health issue and immediately generates and sends a health warning message to the user. For example, a warning list is displayed through a mobile app or management platform, indicating the specific individual and the type of possible health issue. This enables early health warning based on behavioral and environmental data, improving pasture management efficiency and cow health.
[0043] Furthermore, the assessment modules include: The third building block: building a rule analysis model, including: The fourth building block: constructing a training dataset containing historical cow behavioral characteristic statistics, environmental management feature vectors, and corresponding health problem labels; The first training module: selects support vector machine, decision tree or neural network as the algorithm framework of the rule analysis model, and uses the training data set for training to obtain a trained rule analysis model; Normalization module: normalizes the behavioral feature statistics and the environmental management feature vector to eliminate the dimension effect; Probability assessment module: The normalized behavioral feature statistics and environmental management feature vectors are input into the trained rule analysis model to obtain the risk probability of an individual suffering from different health problems. The risk probability value range output by the rule analysis model is 0 to 1, and a larger value indicates a higher risk.
[0044] Specifically, in large-scale dairy ranch environments, based on local, event-based multimodal data collected in specific areas by non-contact sensors, overcoming the difficulties of individual identification and tracking in group environments, effectively handling data quality issues and environmental / management interference, integrating and analyzing the correlation between cross-regional multimodal data, and identifying complex behavioral patterns or abnormal combinations of physiological manifestations that indicate early health problems, ultimately achieving early, accurate, and low-false-alarm warnings on the health status of individual dairy cows, are key technical issues that need to be urgently addressed in current non-contact intelligent ranch monitoring systems.
[0045] This solution builds a rule-based analysis model, specifically by constructing a training dataset containing historical data and selecting an appropriate machine learning algorithm framework, such as a support vector machine, decision tree, or neural network, for training. This allows the model to learn the complex relationships between behavioral characteristics, environmental management characteristics, and health issues from historical data. Before applying the model for risk assessment, the input behavioral characteristic statistics and environmental management feature vectors are normalized to ensure data consistency and improve the model's assessment accuracy.
[0046] Ultimately, the trained model receives the normalized feature vectors and outputs the quantified risk probabilities of individuals developing different health issues. These probabilities directly indicate the level of risk associated with potential health issues. Through these steps, this solution provides a structured risk assessment mechanism based on historical data learning, transforming multi-source heterogeneous data into quantitative health risk indicators. This solves the problem of implementing the assessment module and improves the accuracy of health warnings.
[0047] Please refer to Figure 3 A method for early warning of dairy cow health, applied to any of the above-mentioned systems for early warning of dairy cow health, comprises the steps of: S1: Acquire channel sensor data and regional vision sensor data; S2: Use the individual body image in the channel sensor data to identify the individual, record the time stamp of the individual passing through the channel, and use the regional visual sensor data to detect and identify the individual in the area to obtain the identification result; S3: Based on the timestamp of the individual passing through the channel and the recognition results, the regional time activity record of the individual in different areas is established to form an individual behavior log; S4: Receive environmental sensor data and pasture management operation data to build a time series database of environmental parameters and management events; S5: Based on individual behavior logs, extract the behavioral feature statistics of individuals within a specific time window, combine them with the time series database of environmental parameters and management events, use the preset rule base to perform rule analysis, identify behavioral pattern combinations that indicate health problems, and achieve early health warning.
[0048] Step S1 acquires channel sensor data and area vision sensor data, providing raw input for subsequent processing. Channel sensors are typically deployed in narrow passages that cows must pass through, such as at the entrance to a milking tunnel or feeding alley. Area vision sensors are deployed in areas where cows move, such as rest areas, feeding areas, or exercise yards. This allows for the capture of close-up images of cows as they pass through the passages and of animals moving within the area.
[0049] Step S2 uses the collected data to perform individual identification. The images of individuals captured by the channel sensors are used to determine their identities and record the precise time they passed through the channel. Images captured by the area vision sensor are used to detect and identify individuals within a wide area. Through image processing and recognition algorithms, the identity of each detected individual within the area can be determined.
[0050] Thus, step S3 constructs a record of the individual's activities in different areas based on the timestamps of the individual's passage through the channel and the identification results within the area. When an individual passes through a channel, their identity and time are recorded. When an individual is identified within an area, their identity, location, and time are also recorded. Combining this information, it is possible to track the individual's entry and exit times and the length of time they spend in different areas, forming a detailed log of individual behavior.
[0051] Furthermore, step S4 receives environmental sensor data and farm management operation data. Environmental sensors (such as temperature, humidity, light, and ammonia concentration sensors) collect environmental parameters in real time. Farm management operation data (such as feeding, milking, immunization, and medical records) is acquired through an interface. This data is integrated and stored in a time-series database, providing information on external factors influencing cow health.
[0052] Thus, step S5 extracts behavioral characteristic statistics reflecting individual activity patterns based on individual behavior logs, such as activity levels within a specific time period, distribution of regional residence time, etc. These behavioral characteristic statistics are combined with the environmental parameter and management event time series database established in step S4. Using a preset rule base, the association between behavioral characteristics, environmental parameters, and management events is analyzed. The rule base contains rules for combining behavioral patterns and environmental / management factors that indicate specific health issues. Through rule analysis, individuals who meet the patterns indicating health issues can be identified and early warnings can be issued.
[0053] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any actual relationship or order between these entities or operations.
[0054] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Persons skilled in the art will readily appreciate that the present application may be modified and altered in various ways. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A system for early warning of dairy cow health, used in large-scale dairy farms, which provides individual health warnings based on cow activity data collected by non-contact sensors, characterized by: The system comprises: Acquisition module: acquires channel sensor data and regional vision sensor data; Identification module: uses the individual body image in the channel sensor data to identify the individual, records the time stamp of the individual passing through the channel, and uses the regional visual sensor data to detect and identify the individual in the area to obtain the identification result; Behavior recording module: Based on the time stamp of the individual passing through the channel and the recognition result, it establishes the regional time activity record of the individual in different areas to form an individual behavior log; Environmental parameter integration module: receives environmental sensor data and pasture management operation data, and establishes a time series database of environmental parameters and management events; Health warning module: Based on individual behavior logs, it extracts individual behavioral feature statistics within a specific time window, combines environmental parameters with a time series database of management events, and uses a preset rule base to perform rule analysis to identify behavioral pattern combinations that indicate health problems and achieve early health warnings.
2. The system for early warning of dairy cow health according to claim 1, characterized in that: The acquisition module includes: Parameter setting module: sets the image acquisition parameters of channel sensors and area vision sensors; The first acquisition module: according to the set image acquisition parameters, the channel sensor is used to collect the body image of the individual passing through the channel, and the passing time stamp of the individual passing through the channel is recorded; The second acquisition module: uses the regional visual sensor to collect individual activity images in the area according to the set image acquisition parameters; Data synchronization module: synchronizes individual body images with regional vision sensor images to ensure that channel sensor data and regional vision sensor data are aligned in time.
3. The system for early warning of dairy cow health according to claim 1, characterized in that: The recognition module includes: The first extraction module: extracts texture features, color histogram features and local binary pattern features of individual body images; Feature construction module: associates individual visual features with individual passing timestamps recorded by channel sensors and stores them in the individual visual feature database; Detection module: Utilizes images collected by regional vision sensors and uses a deep learning target detection model to perform individual detection, obtaining the detection frame and confidence level of individuals within the region. The second extraction module: extracts the texture features, color histogram features and local binary pattern features of the individual in the area based on the position information of the detection frame; Identification submodule: matches the visual features of individuals in the area with the visual features in the individual visual feature database, calculates the similarity score, and determines the identification results of individuals in the area based on the individual's timestamp.
4. The system for early warning of dairy cow health according to claim 3, characterized in that: The detection module includes: The first building block is to construct an image dataset containing images of cows in multiple categories, including healthy and sick cows, and to annotate the image dataset, including the bounding box locations of individual cows. Augmentation module: uses data augmentation techniques to augment image datasets, including random rotation, scaling, translation, cropping, and color perturbation. Training module: Select a pre-trained deep learning object detection model, use the expanded image dataset to perform fine-tuning training, and optimize the model parameters; Detection submodule: Deploy the trained deep learning target detection model to the regional vision sensor, perform real-time individual detection on the collected images, and obtain the detection box and confidence of the individuals in the area. The detection box is used to determine the position of the individual in the image.
5. The system for early warning of dairy cow health according to claim 1, characterized in that: The behavior recording module includes: Create module: create an empty individual behavior log; Judgment module: For each individual detected by the regional visual sensor, based on its identity recognition result, query the individual behavior log to determine whether there is an activity record for the individual; First update module: If an individual's activity record already exists, the individual's residence time in the corresponding area is updated according to the current detection timestamp, and the updated activity record is added to the individual's behavior log; New module: If there is no activity record for the individual, a new activity record is created in the individual behavior log, recording the start timestamp of the individual entering the area, initializing the individual's residence time in the area, and adding the activity record to the individual behavior log; Second update module: When an individual leaves an area, the departure timestamp is recorded, the individual's actual residence time in the area is calculated, and the complete activity record including the area identification, entry timestamp, exit timestamp and residence time is updated to the individual behavior log.
6. The system for early warning of dairy cow health according to claim 5, characterized in that: The first update module includes: The first acquisition module: If an individual already has an activity record, obtain the departure timestamp of the individual's last activity record in the corresponding area; A first judgment module: judging whether the time difference between the current detection timestamp and the departure timestamp is less than a preset time threshold; The third updating module: if the time difference is less than the preset time threshold, the individual is determined to be in continuous activity, the individual's residence time in the corresponding area is updated according to the current detection timestamp, and the updated activity record is added to the individual behavior log; First new creation module: If the time difference is greater than or equal to the preset time threshold, the individual is judged to be non-continuously active, the departure timestamp of the last activity record is updated to the departure timestamp before the current detection timestamp, and a new activity record is created based on the current detection timestamp, recording the starting timestamp of the individual entering the area, and initializing the individual's residence time in the area, and adding the activity record to the individual behavior log.
7. The system for early warning of dairy cow health according to claim 1, characterized in that: Environmental parameter integration module includes: Configuration module: configures environmental sensors and pasture management operation data interfaces, the environmental sensors including temperature sensors, humidity sensors, light intensity sensors, and ammonia concentration sensors; the pasture management operation data interfaces including feeding record interfaces, milking record interfaces, immunization record interfaces, and medical record interfaces; The third acquisition module: collects environmental parameter data in real time through the configured environmental sensors, and obtains pasture management operation data in real time through the configured pasture management operation data interface; Data processing module: cleans the collected environmental parameter data and the acquired pasture management operation data to obtain cleaned environmental parameter data and pasture management operation data; The second building block: Based on the cleaned environmental parameter data and pasture management operation data, a time series database of environmental parameters and management events is established.
8. The system for early warning of dairy cow health according to claim 1, characterized in that: The health warning module includes: The third extraction module: Based on the individual behavior log, the sliding window method is used to extract the average movement speed, activity radius, proportion of static time, number of eating and drinking times of the individual within a specific time window to form behavioral feature statistics; A fourth extraction module extracts the average temperature, average humidity, peak ammonia concentration, number of feeding events, number of milking events, and number of immunization events corresponding to the specific time window from a time series database of environmental parameters and management events to form an environmental management feature vector; Evaluation module: inputs the behavioral characteristic statistics and the environmental management characteristic vector into a preset rule analysis model to evaluate the risk probability of an individual suffering from different health problems; Early warning submodule: Based on the risk probability output by the rule analysis model and the preset risk threshold, it is determined whether the individual has potential health risks. If the risk probability of any health problem exceeds the corresponding risk threshold, the individual is determined to have a potential risk of the health problem and a health warning message is issued to the user.
9. The system for early warning of dairy cow health according to claim 8, characterized in that: Assessment modules include: The third building block: building a rule analysis model, including: The fourth building block: constructing a training dataset containing historical cow behavioral characteristic statistics, environmental management feature vectors, and corresponding health problem labels; The first training module: selects support vector machine, decision tree or neural network as the algorithm framework of the rule analysis model, and uses the training data set for training to obtain a trained rule analysis model; Normalization module: normalizes the behavioral feature statistics and the environmental management feature vector to eliminate the dimension effect; Probability assessment module: The normalized behavioral feature statistics and environmental management feature vectors are input into the trained rule analysis model to obtain the risk probability of an individual suffering from different health problems. The risk probability value range output by the rule analysis model is 0 to 1, and a larger value indicates a higher risk.
10. A method for early warning of dairy cow health, characterized in that: Applied to a system for early warning of dairy cow health according to any one of claims 1 to 9, the method comprises the steps of: S1: Acquire channel sensor data and regional vision sensor data; S2: Use the individual body image in the channel sensor data to identify the individual, record the time stamp of the individual passing through the channel, and use the regional visual sensor data to detect and identify the individual in the area to obtain the identification result; S3: Based on the time stamp of the individual passing through the channel and the recognition result, a regional time activity record of the individual in different areas is established to form an individual behavior log; S4: Receive environmental sensor data and pasture management operation data to build a time series database of environmental parameters and management events; S5: Based on individual behavior logs, extract the behavioral feature statistics of individuals within a specific time window, combine them with the time series database of environmental parameters and management events, use the preset rule base to perform rule analysis, identify behavioral pattern combinations that indicate health problems, and achieve early health warning.
Citation Information
Cited By
Live animal behavior anomaly detection method and system based on deep learning
CN121148021A
Livestock behavior anomaly detection method and system based on deep learning
CN121148021B