Swallowing type cow rumen sensor and disease monitoring and early warning system
By using a swallowable rumen sensor, key rumen parameters of dairy cows can be collected and transmitted wirelessly in real time. Combined with machine learning analysis on a cloud platform, this solves the problem of delayed disease warnings in dairy cows and provides accurate disease warnings and feeding strategies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-02-10
- Publication Date
- 2026-04-17
AI Technical Summary
Current dairy farming technologies make it difficult to achieve real-time collection and wireless transmission of key rumen parameters in dairy cows. Disease early warning relies on human experience and lacks refined feeding strategies, resulting in delayed disease identification and fragmented monitoring methods.
A swallowable rumen sensor for dairy cows is designed, integrating a pH sensor, a temperature sensor, a gas sensing system, and an attitude sensor. It transmits data to a data receiving host via the LoRa wireless communication protocol and performs machine learning analysis on a cloud platform to achieve disease early warning and intelligent feeding.
It enables long-term continuous monitoring of key rumen parameters in dairy cows, allowing for early disease diagnosis. It has a long transmission distance, is easy to operate, has minimal impact on dairy cows, and provides accurate disease warnings and feeding strategies.
Smart Images

Figure CN121867776A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of animal husbandry technology and relates to a swallowable dairy cow rumen sensor and disease monitoring and early warning system. Specifically, it relates to a disease monitoring and early warning method based on a dairy cow rumen sensor to achieve low-cost, real-time and efficient monitoring of the health status of dairy cows. Background Technology
[0002] Disease prevention and control in dairy cows is crucial for the health of dairy cows, the success of their farming, and the safety and hygiene of milk and dairy products. Taking mastitis as an example, early detection can prevent further deterioration of the cow's udder health, reduce mammary tissue damage, and improve treatment outcomes. To enhance the effectiveness of disease prevention and treatment in dairy cows, it is essential to systematically explore the pathogenesis of different diseases and to establish an early diagnosis and warning system for various diseases. This will enable the development of targeted medical intervention programs and precise feeding strategies, providing systematic support for dairy cow health management and disease control. However, current disease warning systems primarily rely on manual visual observation, such as assessing mastitis through udder appearance, identifying reproductive abnormalities based on behavioral characteristics, and diagnosing rumen acidosis based on cow feeding patterns. This model has significant limitations: subjective judgment is prone to bias, and disease identification often occurs after symptoms appear, leading to missed opportunities for optimal treatment. The limited variety of feeding strategies prevents the development of targeted, precise feeding systems that can be tailored to different health conditions and physiological stages of cattle, thus impacting feeding efficiency and production performance. Current research has found a high correlation between rumen temperature, pH, and activity levels in dairy cows and the incidence of dairy diseases. However, to effectively diagnose various dairy cow diseases by monitoring key rumen parameters, it is necessary to first achieve real-time acquisition and wireless transmission of these key rumen parameters, and then process and analyze the continuous data to provide diagnostic decisions and precise feeding plans.
[0003] In summary, existing research technologies have several drawbacks, including difficulty in real-time acquisition and wireless transmission of key rumen parameters in dairy cows; reliance on human experience in data analysis, which has not enabled automated disease prediction; fragmented monitoring methods; and separation of physiological parameters (pH, body temperature) from behavioral data. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a swallowable dairy cow rumen sensor and disease monitoring and early warning system that can solve the problems of difficulty in obtaining physiological parameters, equipment operation and maintenance and transmission bottlenecks, delayed and simplistic disease early warning, and lack of refined feeding strategies in existing dairy cow breeding and monitoring technologies.
[0005] The technical solution of this invention is as follows: A swallowable rumen sensor and disease monitoring and early warning system for dairy cows, comprising a swallowable multi-parameter rumen sensor for dairy cows that collects rumen environmental parameters and dairy cow movement posture data and transmits the data via the LoRa wireless communication protocol; a data receiving host equipped with a LoRa wireless receiving module and a 4G communication module for receiving and transmitting data and synchronously uploading data; and a cloud platform host computer that is communicatively connected to the data receiving host for receiving the uploaded data and performing dairy cow behavior recognition, intelligent feeding, health status analysis, and disease early warning based on machine learning algorithms.
[0006] Furthermore, the swallowable bovine rumen multi-parameter sensor includes an upper shell, a middle shell, and a lower shell, which are sequentially connected by threads to form a sealed cylindrical capsule structure. A pH sensor reference electrode and a pH sensor glass electrode are installed on the upper end face of the middle shell, and an optical dark chamber is integrated inside it. The upper shell is threaded to the upper end of the middle shell, and through holes are provided on its top and side walls, forming a cavity inside to accommodate the reference electrode and the glass electrode. The lower shell is threaded to the lower end of the middle shell, and inside it, from top to bottom, a PCB circuit board, a battery, and a counterweight are fixed in sequence via slots or brackets.
[0007] Furthermore, a corrosion-resistant nano-sensitive film layer is coated on the surface of the pH sensor glass electrode; The pH sensor reference electrode and the pH sensor glass electrode together constitute a dual-electrode system of a swallowable bovine rumen multi-parameter sensor. It is fixed to the middle shell by a corrosion-resistant encapsulation structure, and its sensing end extends into the liquid-permeable cavity of the upper shell.
[0008] Furthermore, the PCB circuit board integrates a main control module, a power management circuit, a pH acquisition module, a temperature sensor, a three-axis attitude sensor, a gas sensing system, and an antenna array. The main control module integrates a LoRa communication unit and is configured with an edge computing algorithm; The antenna array utilizes a copper layer as a reflector and is composed of flexible antennas with mixed polarization modes, which are attached to a rectangular substrate corresponding to the PCB circuit board. A slot is provided at the bottom of the rectangular base plate and is fixedly connected to the internal structure of the lower shell. The counterweight is made of ferromagnetic material and is disposed in the bottom region of the lower shell.
[0009] Furthermore, the gas sensing system is constructed based on tunable diode laser absorption spectroscopy, and includes: The optical measurement cavity is located in the optical dark chamber of the middle shell and is connected to the external rumen environment through an air inlet. The laser and detector are located on opposite sides of the optical measurement cavity, and are used to emit infrared lasers of a specific wavelength and receive transmitted light signals, respectively. Establish a calibration model for the methane absorption spectral model based on real-time temperature data; A piezoelectric ceramic diaphragm is integrated inside the air inlet and configured to remove deposits from the holes through periodic high-frequency vibration.
[0010] Furthermore, the edge computing algorithm configured in the main control module is as follows: Step (1) Signal preprocessing: Read the acceleration data output by the triaxial attitude sensor. The signal is separated into gravity components using an infinite impulse response filter. and dynamic acceleration components ; Step (2) Feature extraction: Extracting dynamic acceleration components Windowing and discrete Fourier transform are performed to calculate the amplitude spectrum and perform frequency band clipping and downsampling to generate a time-frequency feature matrix; Step (3) Input the time-frequency feature matrix into the built-in quantization dual-stream network and perform inference through parallel frequency domain branches and time domain branches; The frequency domain branch employs depthwise separable convolution, while the time domain branch employs a time-domain one-dimensional convolution with dilation. Step (4) results fusion, and gating coefficients are calculated through a gating network. eigenvectors of the frequency domain branch and the feature vector output by the time-domain branch Perform weighted fusion to output the dairy cow behavior classification results. The formula is: .
[0011] Furthermore, a vibration-generating ring coil is also attached and integrated into the inner wall of the lower shell. The vibration-generating loop coil is configured to convert mechanical vibration into electrical energy using the principle of electromagnetic induction, and its natural frequency matches the characteristic frequency of rumen peristalsis. The power management circuit on the PCB is electrically connected to the vibration power generation loop coil and the battery, and is configured to rectify and regulate the generated power and charge the battery.
[0012] Furthermore, the data receiving host includes a collar-shaped shell, a power management unit, and a data processing and communication unit; The collar-shaped outer shell includes a sealed back plate, a main shell, and a cover plate. An interface for the LoRa antenna to pass through is provided on the side wall of the main shell. A waterproof cavity for accommodating the hardware circuit system is formed inside the back plate, the main shell, and the cover plate, which are sealed together. The power management unit integrates a battery pack, a charging interface, and a boost module. The charging interface is electrically connected to the battery pack, and the output terminal of the battery pack is electrically connected to the input terminal of the boost module. The data processing and communication unit includes an MCU carrying a LoRa module and a 4G communication module. The power supply terminal of the MCU carrying the LoRa module is electrically connected to the output terminal of the boost module. The radio frequency terminal of the MCU carrying the LoRa module is connected to the LoRa antenna extending into the main housing. The 4G communication module is connected to the data terminal of the MCU carrying the LoRa module.
[0013] Furthermore, the cloud platform's host computer adopts a microservice architecture, which specifically includes: Communication interface layer: includes a load balancer and an IoT message gateway, with an MQTT protocol interface provided in the IoT message gateway; Data storage layer: connected to the communication interface layer, including a time-series database for storing raw physiological data and a relational database for storing individual profiles; Core computing layer: connected to the data storage layer, including an algorithm engine module; the algorithm engine module stores edge computing result synchronization instructions and deep learning models for disease diagnosis and precision feeding; Interactive Application Layer: Connects to the core computing layer, including web visualization dashboards and mobile app interface modules.
[0014] Furthermore, the algorithm engine module includes program instructions for performing the following steps: Step (1) Construction of multidimensional time series data: Parse the received data packets and construct the normalized feature vector at time step 1. ; Step (2) Bidirectional temporal dependency extraction: extract the normalized feature vector Input a bidirectional long short-term memory network and compute the forward hidden state. and backward hidden state ; Step (3) Multidimensional feature coupling: A multi-head attention mechanism is used to calculate the output of the attention head and perform a linear transformation to obtain the fused feature matrix. ; Step (4) Disease classification and diagnosis: For the fusion feature matrix Global average pooling is performed, and the disease probability distribution is output through a fully connected layer and a softmax activation function. ; Step (5) Vitality Index Calculation: Based on the number of ruminations within a unit time window Duration of rumination pH change rate and rate of temperature change Combined with the disease probability distribution Calculate the eating vitality index : ; In the formula, These are the weighting coefficients. The sigmoid normalization function, This represents the probability of abnormal diseases.
[0015] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: It offers advantages such as long-term continuous monitoring, early diagnosis of dairy cow diseases, long transmission distance, convenient operation, and minimal impact on dairy cows. The swallowable rumen multi-parameter sensor can remain in the rumen for an extended period after a single swallow to monitor key rumen parameters. It uses LoRa wireless communication technology to send data to a data receiving host and 4G communication technology to synchronize data to a cloud platform host computer. The cloud platform host computer analyzes the key rumen parameters and uses behavior prediction and disease identification algorithms to determine the cow's behavior and health status. When a cow is detected to be in a sub-healthy state, a danger alarm is sent to the mobile device, prompting the user to provide care and treatment. Simultaneously, a feeding strategy based on a cow feeding vitality index model derived from time-series feature extraction and state segmentation is developed for the cow. When the swallowable rumen multi-parameter sensor's battery is depleted, a low battery reminder is sent to the user. The user can remove the swallowable rumen multi-parameter sensor from the rumen using a cow iron remover to replace the battery and pH electrode. Attached Figure Description
[0016] Figure 1 This is the overall system framework diagram of the present invention; Figure 2 This is a schematic diagram of the structure of the swallowable rumen multi-parameter sensor for dairy cows in this invention; Figure 3 This is a schematic diagram of the data receiving host in this invention; Figure 4 This is a schematic diagram of another data receiving host in this invention; Figure 5 This is a schematic diagram of the hierarchical structure of the cloud platform host computer in this invention; Figure 6 This is a flowchart illustrating the overall algorithm framework of the present invention; Figure 7 This is a sensitivity comparison diagram between the pH sensor and detection circuit of the present invention and the laboratory Leici pH sensor and detection equipment; Figure 8 This is a comparison chart of the accuracy of the various models in this invention for behavior prediction; Figure 9This is a comparison chart of temperature sensor detection data and actual data in this invention; In the diagram: 1. Top shell; 2. pH sensor reference electrode; 3. pH sensor glass electrode; 4. Middle shell; 5. PCB circuit board; 6. Battery; 7. Bottom shell; 8. Counterweight; 9. Vibration generator loop coil; 16. Charging interface; 17. Battery pack; 18. Backplate; 19. MCU carrying LoRa module; 20. 4G communication module; 21. Boost module; 22. LoRa antenna; 23. Cover plate; 24. Main housing. Detailed Implementation
[0017] The specific technical solution of the present invention will be further described in detail below with reference to specific examples.
[0018] As shown in the figure, the present invention discloses a swallowable rumen sensor and disease monitoring and early warning system for dairy cows. The swallowable rumen sensor is configured to collect rumen environmental parameters and dairy cow movement posture data, and process the posture data through a built-in edge computing algorithm to output dairy cow behavior classification results. Subsequently, the environmental parameters and behavior classification results are transmitted via the LoRa wireless communication protocol. A data receiving host is configured with a LoRa wireless receiving module and a 4G communication module for receiving and transmitting data and synchronously uploading it. A cloud platform host computer is communicatively connected to the data receiving host for receiving the uploaded data and performing intelligent dairy cow feeding, health status analysis, and disease early warning based on machine learning algorithms.
[0019] The swallowable rumen multi-parameter sensor for dairy cows is cylindrical in shape and can be placed in the rumen of dairy cows through a dosing device and remain there for a long time. It is mainly composed of an upper shell 1, a pH sensor reference electrode 2, a pH sensor glass electrode 3, a middle shell 4, a PCB circuit board 5, a battery 6, a lower shell 7, a counterweight 8, and a vibration power generation loop coil 9. Multiple perforations are made on the upper shell 1, and the probe portions of the pH sensor reference electrode 2 and the pH sensor glass electrode 3 pass through the upper shell 1. This structure ensures that the pH sensor probe can fully contact the gastric juice without being damaged by hard objects. The middle shell 4 is slightly shorter and is used to fix the pH sensor probe; the lower shell is longer and is used to place the PCB circuit board 5, digital temperature sensor, pH sensor, triaxial attitude sensor, gas sensing system, array antenna, battery 6, and counterweight 8. Both the upper shell 1 and the lower shell 7 are made of non-toxic and corrosion-resistant materials; the upper shell 1 has internal gaps, allowing rumen fluid in the cow's rumen to flow within these gaps; the upper shell 1, the middle shell 4, and the lower shell 7 are connected by threads; the lower shell 7 contains an antenna array, a PCB circuit board 5, a temperature sensor, a three-axis attitude sensor, a gas sensing system, a battery 6, a pH sensor, a counterweight 8, etc. Array antennas include various types of antennas such as flexible antennas, patch antennas, spring antennas, PCB antennas, and microstrip antennas, and are characterized by small size and strong penetration. The counterweight ensures that the sensor remains in the rumen for a long time; at the same time, the counterweight is made of ferromagnetic material, has different shapes, and can be freely combined inside the sensor housing, so that the sensor can be removed by the cow iron extractor when the battery is depleted or the pH electrode is passivated. PCB circuit board 5 contains a main control module, a voltage regulator circuit, a pH acquisition module, a temperature acquisition module, an acceleration acquisition module, and a photoelectric detection module; The main control module integrates numerous core control components and data processing and analysis components using a printed circuit board. It controls the temperature sensor, pH acquisition circuit, attitude sensor, and gas sensing system, employing a low-power monitoring strategy that controls the sampling frequency based on data validity and acquisition time to achieve low-power, high-efficiency prediction. Simultaneously, this module uses the STM32WLE5JC as its core control chip and also handles LoRa communication functionality. The temperature sensor uses the SHT series high-precision digital temperature acquisition chip, achieving a temperature acquisition accuracy of 0.01℃ and an error of ±0.1℃. The voltage regulator circuit uses PW5100 as a DC / DC boost module. Its wide input range compensates for the instability of the output voltage due to battery operation time, while its low power consumption meets the requirements of long-term operation. At the same time, REF2030 and REF5020 are used to provide a 2.048V reference voltage, providing a stable reference voltage for the pH acquisition circuit and ensuring the accuracy of pH acquisition. The pH sensor is a dual-electrode system, applicable environment: 0~80℃, no temperature compensation, pressure resistance: 0~0.6Mpa, end-sealed without handle, with two lines (red and black, line length: 50~70mm) reserved. Electrode dimensions: glass electrode Φ5.5mm, length 30±5mm; reference electrode Φ10.6mm, length 45±5mm and embedded in the middle shell 4, protected by the upper shell 1. The reference electrode is composed of 3mol / L-1 KCl solution and Ag / AgCl wire. The pH acquisition module is connected to the pH sensor. The analog electrical signal of pH is amplified and filtered before being acquired by the ADS1120 analog-to-digital converter chip. After analog-to-digital conversion, it communicates with the main control module via SPI. The gas sensing system is based on tunable diode laser absorption spectroscopy technology. It includes a sealed optical chamber that is connected to the rumen environment through a specially designed air inlet. When the system is working, the tunable diode laser emits infrared laser light of a specific wavelength that passes through the air chamber. A photodetector on the opposite side receives the transmitted light signal and converts it into an electrical signal. The signal processing unit calculates the methane gas concentration in the rumen by analyzing the attenuation of the laser intensity. A miniature piezoelectric ceramic vibrating diaphragm is integrated inside the air inlet, which can periodically vibrate at high frequency to effectively shake off particles attached to the pores, achieving active self-cleaning and ensuring long-term unobstructed airflow. The battery uses FANSO's ER series of disposable lithium batteries, which are characterized by a working voltage of 3.6V and a large capacity of 4200mAh, which can support the sensor to work for a long time - more than three years. The ring-shaped vibration power generation module is integrated into the inner wall of the lower housing of the sensor. It generates electricity using the mechanical energy produced by the periodic peristalsis of the rumen of a cow. The module adopts a piezoelectric and electromagnetic combined power generation mechanism, and its natural frequency is designed to match the characteristic frequency of rumen peristalsis to achieve efficient energy harvesting. The power generation module is electrically connected to a power management circuit, which rectifies, filters and stabilizes the generated unstable power, outputs a stable voltage and replenishes the sensor battery, thereby extending the working life of the entire device. The sensor's main control module executes a lightweight behavior recognition method at the edge. Utilizing triaxial acceleration data, it employs IIR gravity separation, STFT time-frequency transformation, and a quantization dual-stream network to calculate and identify the cow's feeding, rumination, and lying-down behaviors in real time on a low-power MCU. The data acquired by the triaxial acceleration is then sent to the receiving host as behavior prediction results. The specific steps are as follows: Step (1) Signal preprocessing: The edge computing unit reads the acceleration data output by the triaxial attitude sensor. The resultant acceleration modulus was calculated, and the signal was separated into gravitational components using an infinite impulse response filter. and dynamic acceleration components The calculation formula is as follows: In the formula, The filter coefficients are determined by the sampling rate. and cutoff frequency Decide, ; Step (2) Feature extraction: Extracting dynamic acceleration components Add windows Using Discrete Fourier Transform (DFT), the amplitude spectrum is calculated, and frequency band clipping and downsampling are performed to generate the time-frequency feature matrix: Subsequently, the amplitude spectrum was analyzed. Frequency band clipping was performed, retaining only the frequency bands. to The effective frequency index range is used to generate a low-resolution time-frequency feature matrix; Step (3) Network Inference: Input the time-frequency feature matrix into the quantized dual-stream network embedded in the main control module. This network contains parallel frequency domain branches and time domain branches. The frequency domain branch uses depthwise separable convolution, including depthwise convolution of independent channels and pointwise convolution of fused channels. The time domain branch uses temporal one-dimensional convolution (TCN) and introduces dilation rate. Dilated convolution is performed to expand the receptive field. The formula is: ; Step (4) Result Fusion: Calculate the gating coefficients through a gating network and fuse the feature vectors of the frequency domain branch. and the feature vector output by the time-domain branch Perform weighted fusion to output the dairy cow behavior classification results. The formula is as follows: ; The data receiving host mainly consists of a charging interface 16, a battery pack 17, a backplate 18, an MCU 19 carrying a LoRa module, a 4G communication module 20, a boost module 21, a LoRa antenna 22, a cover plate 23, and a main housing 24. The back plate 18, cover plate 23 and main housing 24 are combined to form a collar-shaped data receiving host, which protects the charging interface 16, battery pack 17, MCU 19 carrying LoRa module, 4G communication module 20 and boost module 21 inside. The MCU 19 carrying LoRa module is connected to the LoRa antenna 22 that extends out of the housing. The data receiving host is collar-shaped and can be worn around the neck of a cow to receive data for extended periods. When the battery is low, the device can be operated cyclically by replacing the battery pack 17.
[0020] In addition, the data receiver can also be cylindrical in shape, allowing for long-term data reception by placing it at any power source on the ranch. It mainly consists of a power supply circuit, a cylindrical shell, a boost module, a 4G module, an STM32WL series microcontroller with a LoRa wireless receiver module, and an antenna. The cylindrical shell protects the boost module, the 4G module, and the STM32WL series microcontroller with the LoRa wireless receiver module inside, with the STM32WL series microcontroller with the LoRa wireless receiver module connected to the antenna extending out of the shell.
[0021] The 4G module uses the DTU version of the Heze Air780EP to synchronize key parameters of the rumen of dairy cows to the cloud platform, enabling bidirectional communication with the host computer on the cloud platform. The host computer on the cloud platform is designed to set the data transmission frequency of the sensors in the rumen of dairy cows, including the communication between the 4G module and the STM32WL series microcontroller with LoRa wireless receiver module.
[0022] Threshold setting and preliminary judgment: For temperature, pH data, and methane concentration, normal and abnormal thresholds are set based on the normal range and historical data of the monitored objects. The collected temperature, pH data, and methane concentration are compared with the corresponding thresholds. If the data exceeds the normal range, or the duration of the characteristic behavior exceeds the threshold, it is judged as abnormal, and a mechanism to change the data collection frequency is activated to obtain more intensive data for further analysis.
[0023] The cloud platform's host computer includes a dairy cow disease intelligent diagnosis and dynamic early warning model, a mobile human-computer interaction interface, and a database.
[0024] This study analyzes the coupled discriminative features of continuous pH sequence changes, abnormal temperature fluctuations, abnormal methane concentration changes, and behavioral anomalies across multiple time windows. Based on a multi-head attention mechanism and a bidirectional LSTM network-based multi-timescale feature fusion modeling method, intelligent diagnosis of common diseases such as rumen acidosis and mastitis in dairy cows is achieved. The specific steps are as follows: Step (1) Construction of multidimensional time series data: Parse the received data packets, extract the pH value sequence, temperature data, methane concentration data collected by the sensors, and the dairy cow behavior classification results output by the edge computing unit to form the input vector sequence. In the formula, Indicates the first Normalized eigenvectors at time step; Step (2) Bidirectional temporal dependency extraction: Extract the input vector sequence Input a bidirectional long short-term memory network and calculate the forward hidden states respectively. and backward hidden state To capture the long-term and short-term dependencies of physiological parameters over time: ; Concatenate the forward and backward hidden states to obtain the first hidden state. Context feature vector at time step ; Step (3) Multidimensional feature coupling: Use multi-head attention mechanism to capture the correlation features of different physiological parameters under different time windows; define the query matrix. Key matrix Sum matrix Both are linear mappings of the hidden state matrix: ; Calculate the first The output of each attention head : ; All The outputs of each element are concatenated and subjected to a linear transformation to obtain the fused feature matrix. : ; Step (4) Disease classification and diagnosis: For the fusion feature matrix Global average pooling is performed, and the disease probability distribution is output through a fully connected layer and a softmax activation function. : .
[0025] This study aims to identify and analyze the precursory features of dairy cow diseases in multidimensional time-series data. By using temporal convolutional networks and logistic regression, an abnormal feature pattern extraction and dynamic disease early warning strategy can be implemented to achieve advanced perception of potential health risks in dairy cows.
[0026] By combining the frequency and duration of rumination, rumen pH and temperature changes, and the trends in dairy cow activity and methane concentration, an individualized precision feeding strategy based on real-time behavioral and physiological feedback was established. A vitality index was constructed based on the number of ruminations within a unit time window. Duration of rumination pH change rate and rate of temperature change Combined with the disease probability distribution Calculate the eating vitality index : In the formula, These are the weighting coefficients. The sigmoid normalization function, This represents the probability of abnormal diseases. Differentiated feeding decisions: Defining the state space ,in, The ambient temperature and humidity for the day. Define the individual's historical feed intake; define the action space. Strategies for adjusting feed formulation; by maximizing the action value function Output the optimal feeding plan : .
[0027] The database stores all the data uploaded by the data receiving host, including information such as the data collection time, cow number, age, and health status.
[0028] The dairy cow gateway is equipped with an RFID module, which can be used by a reader to manually read information such as the cow's number, age, health status, and number of treatments received.
[0029] In the individual dairy cow health status analysis and historical anomaly retrospective query system, the visualization cloud platform for dairy cow disease diagnosis results can be viewed through the interactive interface of the cloud platform and sensor parameter settings.
[0030] View the visual interactive platform that integrates early warning response and manual supervision through the user-facing cloud-based real-time early warning notification push, manual confirmation, and intervention instruction issuance functions.
[0031] Specifically, the device of the present invention includes the following modules: (1) Swallowable dairy cow rumen multi-parameter sensor: This module realizes the collection of key data of dairy cows, and uploads the data and receives instruction operation commands through the LoRa communication protocol to realize long-distance communication with the data receiving host; among them, the PCB circuit board 5 integrates an STM32 microcontroller, which is responsible for controlling the temperature sensor, pH sensor, attitude sensor and gas sensor, processing data, realizing LoRa communication, ensuring the reliable operation of the equipment and coordinating the work between various modules to realize low-power continuous monitoring; (2) Data receiving host: This module communicates with the swallowable rumen multi-parameter sensor of dairy cows and synchronizes the data to the cloud platform host computer; the MCU19 carrying the LoRa module receives the temperature, pH, methane concentration and attitude data of the swallowable rumen multi-parameter sensor of dairy cows and sends instruction operation commands to the swallowable rumen multi-parameter sensor of dairy cows; the 4G communication module 20 synchronizes the temperature, pH, attitude data and methane concentration to the cloud platform host computer to realize communication with the cloud platform host computer; (3) Cloud platform host computer: This module realizes the prediction of dairy cow diseases and displays the prediction results and monitoring data on the human-computer interaction interface; the database is used to store temperature, pH, methane concentration and posture data sent by the data receiving host; the dairy cow prediction algorithm obtains the data from the database to predict the health status of dairy cows and sends a danger warning when dairy cows are in a sub-healthy state. (4) Data acquisition: Temperature sensors are used to acquire rumen temperature data of dairy cows, pH sensors are used to acquire rumen pH data, gas sensing systems are used to acquire rumen methane concentration, and triaxial accelerometers are used to collect acceleration information of dairy cows in three axes; acceleration gravity calibration combined with matrix angle adjustment algorithm is used to ensure the reference angle and acquisition accuracy of the sensors, and deviation thresholds are set to ensure the accuracy and real-time performance of the data, providing basic data for subsequent analysis; (5) Behavior prediction and analysis: Using edge machine learning behavior prediction models, data such as triaxial acceleration are processed and analyzed to predict various behaviors of the monitored objects and the duration of the behaviors; at the same time, behavior duration thresholds are set according to behavior classification, and the predicted behavior duration is compared with the threshold to determine whether the behavior is abnormal. (6) Threshold setting and preliminary judgment: For temperature, pH data and methane concentration, set normal and abnormal thresholds respectively based on the normal range and historical data of the monitored objects; compare the collected temperature, pH data and methane concentration with the corresponding thresholds. If the data exceeds the normal range or the duration of the characteristic behavior exceeds the threshold, it is judged as abnormal, and the mechanism of changing the data collection frequency is activated to obtain more dense data for further analysis. (7) Abnormal handling and early warning: If the temperature, pH and methane concentration or behavior prediction results are abnormal, the alarm mechanism will be triggered immediately; at the same time, all collected data, behavior prediction results and abnormal information will be transmitted to the cloud platform host computer in real time. The cloud platform host computer will process the data using cloud deployment algorithms and combine pattern recognition, deep learning and reinforcement learning algorithms for further disease diagnosis. (8) Feeding program and display: Combine the rumination frequency, duration, rumen pH, temperature change patterns, and dairy cow activity and methane concentration change trends to establish an individualized precision feeding strategy based on real-time behavior and physiological feedback. At the same time, display the data to facilitate users to check the status of the monitored objects at any time so that timely countermeasures can be taken.
[0032] Example 1: This example discloses an application scheme of a dairy cow rumen sensor and disease monitoring and early warning system based on a fixed data receiving host in a small farm. First, a swallowable dairy cow rumen multi-parameter sensor is precisely assembled and deployed. The PCB circuit board 5, integrating a LoRa module and edge computing unit, and the battery 6 are securely mounted in the lower shell 7 using a bracket. A counterweight 8 (ferromagnetic counterweight) is tightly attached to the bottom of the battery 6 to ensure stability. The upper shell 1 and the middle shell 4 are tightly connected using a spiral sealing structure. The self-developed pH sensor assembly (including a pH sensor reference electrode 2 and a pH sensor...) is used in this assembly. The sensor glass electrode 3) is fixed through a special hole in the middle shell 4, so that its sensitive end extends into the liquid-permeable cavity designed in the upper shell 1. In particular, a flexible antenna array with a copper layer reflector is installed at the corresponding position on the PCB circuit board 5 to optimize the radio frequency performance in a specific direction. After assembly, the system is powered on and automatically runs a self-test program including battery voltage, airtightness and zero-point calibration. After passing the test, it enters the standby ready state. The staff uses a special ruminant pellet dispenser to send it into the esophagus of cattle. Under the action of gravity and counterweight 8, the swallowable dairy cow rumen multi-parameter sensor naturally settles and stays in the rumen and reticulum area for a long time. After being inserted into the stomach, the swallowable rumen multi-parameter sensor for dairy cows immediately begins to collect multi-dimensional key parameters and perform edge computing. In terms of physicochemical environmental monitoring, the digital temperature sensor initiates data acquisition, with the first round of acquisition lasting about 3 minutes to balance thermal inertia, and the subsequent cycle is shortened to 5 seconds. A moving average filtering algorithm is used to remove outliers caused by local cold water intake. At the same time, the pH acquisition circuit reads the electrode potential difference and combines it with real-time temperature and methane concentration data. The built-in multi-parameter compensation model is used to perform secondary calibration on the original data to eliminate gas interference. The gas sensing system is intermittently activated based on TDLAS technology. Before measurement, the piezoelectric ceramic diaphragm integrated at the pores is triggered to perform a high-frequency vibration program to actively shake off attached impurities to ensure unobstructed optical path. Meanwhile, the internal STM32 main control chip runs a lightweight quantization dual-stream network to process the triaxial acceleration data collected by the attitude sensor and implements adaptive power management: when the cow is identified as being in a calm state such as lying down, the system switches to a low-power sleep mode and reduces the sampling rate to 1Hz; once rumination or vigorous movement is detected, the system is immediately woken up to a high-performance mode, the sampling rate is increased to 25Hz and the preliminary characteristic value of the feeding vitality index is calculated; after the acquisition cycle ends or the buffer is full, the main control chip sends encrypted data packets to the relay node via the LoRa protocol.
[0033] In this embodiment, the data receiving host is typically a mobile collar-type data receiving host used in large ranches. The data receiving host includes a collar-type shell, a power management unit, and a data processing and communication unit. The collar-shaped outer shell includes a back plate 18, a main shell 24 and a cover plate 23 that are sealed together. An interface for the LoRa antenna 22 to pass through is provided on the side wall of the main shell 24. A waterproof cavity for accommodating the hardware circuit system is formed inside the back plate 18, the main shell 24 and the cover plate 23 that are sealed together. The power supply management unit integrates a battery pack 17, a charging interface 16, and a boost module 21. The charging interface 16 is electrically connected to the battery pack 17, and the output terminal of the battery pack 17 is electrically connected to the input terminal of the boost module 21. The data processing and communication unit includes an MCU 19 carrying a LoRa module and a 4G communication module 20. The power supply terminal of the MCU 19 carrying the LoRa module is electrically connected to the output terminal of the boost module 21. The radio frequency terminal of the MCU 19 carrying the LoRa module is connected to the LoRa antenna 22 extending into the main housing 24. The 4G communication module 20 is connected to the data terminal of the MCU 19 carrying the LoRa module. The battery pack 17 converts the voltage to 3.3V via the boost module 21 to power the MCU 19 carrying the LoRa module, and to 5V to power the 4G communication module 20. The main housing 24 has openings to accommodate the installation of the LoRa antenna 22. The charging interface 16 is connected to the back panel 18, and the battery pack 17 can be replaced when needed. The data receiving host 2 has an external LoRa antenna 22. All the structures are integrated into one housing for easy installation on the cow in the form of a collar. The cover plate 23 is designed with a curved strap to allow the collar to fix the data receiving host to the cow's neck. The MCU 19 carrying the LoRa module receives data from multiple sensors through the LoRa antenna 22, records the reception time and the cow number to which the data belongs, and stores the raw data locally. At the same time, the MCU 19 carrying the LoRa module establishes communication with the 4G communication module 20. The MCU built into the MCU 19 carrying the LoRa module processes the data and sends it to the cloud platform host computer through the 4G communication module 20.
[0034] Example 2: An implementation case of the dairy cow rumen sensor and disease monitoring and early warning system provided by the present invention in a large-scale ranch; the workflow of the device includes: sensor deployment, collection of key rumen parameters of dairy cows, repeater data synchronization, cloud platform disease prediction and alarm, and device discharge, etc.
[0035] Swallowable rumen multi-parameter sensor for dairy cows: In this stage, the sensor is first assembled. The upper shell 1, middle shell 4, and lower shell 7 adopt a spiral structure, including the installation of the pH sensor reference electrode 2, pH sensor glass electrode 3, antenna array, counterweight 8, PCB circuit board 5, and battery 6. The pH sensor reference electrode 2 and pH sensor glass electrode 3 are fixed by the middle shell 4. The ion exchange portion exposed in the groove at the top of the upper shell 1 contacts the rumen fluid to collect ion voltage. The PCB circuit board 5 and all modules on it are powered by the battery 6. The counterweight 8 is attached to the battery 6 to increase weight. After assembly, a self-test program is run. Only when the self-test program runs successfully does the device enter the ready state. Once in the ready state, the operator uses a veterinary calcium rod to guide the monitoring slave device through the cow's throat, placing the sensor into the rumen. The sensor then runs the monitoring program. Key Parameter Acquisition for Bovine Rumen: In this stage, a swallowable multi-parameter rumen sensor establishes communication with the data receiving host; a digital temperature sensor acquires several temperature data points, and after the data stabilizes (the first temperature acquisition takes about 3 minutes, and subsequent acquisitions take about 5 seconds to stabilize), a filtering algorithm is used to remove bad points, resulting in accurate and stable temperature data; while the temperature sensor acquires the temperature, the pH acquisition circuit acquires the potential difference of the pH sensor, and similarly, after the data stabilizes (the first pH acquisition takes about 4 minutes, and subsequent acquisitions take about 8 seconds to stabilize), a filtering algorithm is used to remove bad points, and a mean filtering algorithm is used to smooth the data, resulting in accurate and stable pH values; a gas sensing system acquires the methane concentration inside the bovine rumen, and a high-frequency vibration module is equipped to clean impurities attached to the pores, thus realizing methane concentration measurement. The attitude sensor operates in a low-power mode. When the rumen of the cow is in a relatively calm state, such as when it is resting or sleeping, the attitude sensor enters a sleep mode. When it detects violent movements, such as running, walking, or peristalsis, the attitude sensor exits the sleep mode and increases the sampling frequency until the rumen of the cow returns to a calm state. After the data acquisition is completed, the main control chip STM32 enters a low-power mode. Every predetermined time interval (typically 10 minutes), the main control chip exits the low-power mode and sends the data to the data receiving host via the LoRa communication protocol. In this embodiment, the data receiving host adopts a cylindrical shell, and the internal power supply circuit drives the STM32WL microcontroller with LoRa demodulation function and 4G respectively through the boost module. The DTU module; the microcontroller receives data packets from multiple sensors within its coverage area via a high-gain antenna 15, parses and timestamps them with cow ID tags, then stores them in local Flash backup. Simultaneously, it wakes up the 4G module via UART to establish a TCP / IP long connection, synchronizing the processed JSON data to the cloud server in real time. The cloud platform, as the core brain, uses a diagnostic model based on bidirectional LSTM and multi-head attention mechanisms to analyze the uploaded multi-dimensional temporal features. If the result is healthy, only the visualization dashboard is updated. If the model initially screens out suspected sub-health or early disease signs (such as a continuous and slow decrease in pH accompanied by reduced rumination), the cloud platform will trigger a closed-loop early warning mechanism, immediately generating a secondary early warning command and transmitting it back to the corresponding sensor via 4G and LoRa downlink. After receiving the command, the sensor is forced to exit sleep mode, enters full-power encrypted acquisition mode, and transmits high-density data. The cloud then performs a secondary diagnosis based on this data. If rumen acidosis or mastitis is diagnosed, the highest-level alarm is pushed to the user's APP, and manual intervention is recommended.
[0036] Furthermore, the system supports the generation of intelligent feeding strategies and the maintenance of equipment throughout its entire lifecycle. The cloud platform analyzes long-term behavioral and physiological data, combines it with a dairy cow feeding vitality index model to quantitatively assess individual metabolic needs, and uses reinforcement learning algorithms combined with environmental temperature and humidity data to dynamically generate differentiated feeding recommendations (such as adding buffers for cows with low pH), which are then pushed to the feeder's terminal or automated equipment. Regarding equipment maintenance, when low battery voltage or abnormal pH electrode impedance is detected, the system proactively reports a status word, and the cloud platform sends a recycling prompt accordingly. After the user locks onto the corresponding cow, they use a magnet extractor with a strong magnetic head inserted into the esophagus, and the ferromagnetic weight 8 at the bottom of the sensor to remove the cow without damage. After replacing the battery and electrode components and disinfecting and resetting, the equipment can be put back into use, achieving recycling.
[0037] Cloud Platform Disease Prediction: In this stage, the cloud platform's host computer receives key rumen parameters of dairy cows from the data receiving host and stores the data in the database. The disease prediction algorithm calls the data in the database and determines whether the dairy cow is diseased based on the disease prediction model. If the cow is not diseased, the data is displayed on the human-computer interaction interface. If the cow is diseased, a danger alarm is sent to the data receiving host. After receiving the signal, the data receiving host instructs the sensor to operate. After receiving the instruction, the main control chip of the sensor exits the sleep mode and collects temperature, pH, and methane concentration data multiple times. At the same time, the attitude sensor exits the low-power mode and collects data at the maximum frequency. After one set of collections (10 minutes), the data is sent to the cloud platform through the data receiving host. The disease identification algorithm makes another judgment. If it is a false judgment, no alarm is issued. If it is judged to be in a sub-healthy state, an alarm is issued and the sensor is instructed to run at full power again to achieve accurate prediction of the type of disease.
[0038] Feeding strategy generation: In this stage, the cloud platform host computer deploys the algorithm model, analyzes the time-frequency domain characteristics of typical behavioral patterns by parsing triaxial acceleration data, uses machine learning algorithms to realize behavior recognition and activity quantification, and constructs a feeding vitality index calculation architecture; analyzes the influence of external factors on feed intake, builds a quantitative model of the exercise-digestion-metabolic chain, and generates a precise feeding strategy based on real-time physiological feedback and external factors.
[0039] Equipment removal: During this stage, the sensor will issue a low battery warning or a pH sensor replacement prompt. Upon receiving this prompt, the user can choose to remove the sensor (or, if the user does not wish to replace the pH sensor, the sensor can be configured to only detect temperature, methane concentration, and attitude data). The user inserts a metal pick through the throat into the rumen, uses a magnet to attract the swallowable rumen multi-parameter sensor, and removes it. After replacing the battery and pH sensor, the swallowable rumen multi-parameter sensor can be reinserted into the rumen for operation.
Claims
1. A swallowable dairy cow rumen sensor and disease monitoring and early warning system, characterized in that, The system includes a swallowable multi-parameter rumen sensor for dairy cows that collects rumen environmental parameters and cow movement posture data and transmits the data via the LoRa wireless communication protocol; a data receiving host equipped with a LoRa wireless receiving module and a 4G communication module for receiving and transmitting data and simultaneously uploading data; and a cloud platform host computer that communicates with the data receiving host to receive the uploaded data and perform cow behavior recognition, smart feeding, health status analysis, and disease early warning based on machine learning algorithms.
2. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 1, characterized in that, The swallowable rumen multi-parameter sensor for dairy cows includes an upper shell (1), a middle shell (4) and a lower shell (7), which are connected in sequence by threads to form a sealed cylindrical capsule structure. A pH sensor reference electrode (2) and a pH sensor glass electrode (3) are installed on the upper end face of the middle shell (4), and an optical dark chamber is integrated inside it; The upper shell (1) is threaded to the upper end of the middle shell (4), and through holes are provided on its top and side walls, forming a cavity inside to accommodate the reference electrode (2) and the glass electrode (3). The lower shell (7) is threaded to the lower end of the middle shell (4), and inside it, from top to bottom, a PCB circuit board (5), a battery (6) and a counterweight (8) are fixed in sequence via slots or brackets.
3. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 2, characterized in that, A corrosion-resistant nano-sensitive film layer is coated on the surface of the pH sensor glass electrode (3); The pH sensor reference electrode (2) and pH sensor glass electrode (3) together constitute a dual electrode system of a swallowable rumen multi-parameter sensor for dairy cows. It is fixed to the middle shell (4) by a corrosion-resistant encapsulation structure, and its sensing end extends into the liquid-permeable cavity of the upper shell (1).
4. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 2, characterized in that, The PCB circuit board (5) integrates a main control module, a power management circuit, a pH acquisition module, a temperature sensor, a three-axis attitude sensor, a gas sensing system and an antenna array. The main control module integrates a LoRa communication unit and is configured with an edge computing algorithm; The antenna array uses a copper layer as a reflector and is composed of flexible antennas with mixed polarization modes, which are attached to the rectangular substrate corresponding to the PCB circuit board (5). A slot is provided at the bottom of the rectangular substrate and is fixedly connected to the internal structure of the lower shell (7); The counterweight (8) is made of ferromagnetic material and is disposed in the bottom region of the lower shell (7).
5. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 4, characterized in that, The gas sensing system is based on tunable diode laser absorption spectrum and includes: an optical measurement cavity located in the optical dark chamber of the middle shell (4) and connected to the external rumen environment through an air inlet. The laser and detector are located on opposite sides of the optical measurement cavity, and are used to emit infrared lasers of a specific wavelength and receive transmitted light signals, respectively. Establish a calibration model for the methane absorption spectral model based on real-time temperature data; A piezoelectric ceramic diaphragm is integrated inside the air inlet and configured to remove deposits from the holes through periodic high-frequency vibration.
6. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 4, characterized in that, The edge computing algorithm configured in the main control module is as follows: Step (1) Signal preprocessing: Read the acceleration data output by the triaxial attitude sensor. The signal is separated into gravity components using an infinite impulse response filter. and dynamic acceleration components ; Step (2) Feature extraction: Extracting dynamic acceleration components Windowing and discrete Fourier transform are performed to calculate the amplitude spectrum and perform frequency band clipping and downsampling to generate a time-frequency feature matrix; Step (3) Input the time-frequency feature matrix into the built-in quantization dual-stream network and perform inference through parallel frequency domain branches and time domain branches; The frequency domain branch employs depthwise separable convolution, while the time domain branch employs a time-domain one-dimensional convolution with dilation. Step (4) results fusion, and gating coefficients are calculated through a gating network. eigenvectors of the frequency domain branch and the feature vector output by the time-domain branch Perform weighted fusion to output the dairy cow behavior classification results. The formula is: .
7. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 2, characterized in that, A vibration-generating ring coil (9) is also attached and integrated into the inner wall of the lower shell (7). The vibration power generation loop coil (9) is configured to convert mechanical vibration into electrical energy using the principle of electromagnetic induction, and its natural frequency matches the characteristic frequency of rumen peristalsis. The power management circuit on the PCB circuit board (5) is electrically connected to the vibration power generation loop coil (9) and the battery (6), and is configured to rectify and regulate the generated power and charge the battery (6).
8. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 1, characterized in that, The data receiving host includes a collar-shaped outer shell, a power management unit, and a data processing and communication unit; The collar-shaped outer shell includes a sealed back plate (18), a main shell (24), and a cover plate (23). An interface for the LoRa antenna (22) to pass through is provided on the side wall of the main shell (24). A waterproof cavity for accommodating the hardware circuit system is formed inside the back plate (18), the main shell (24), and the cover plate (23) that are sealed together. The power supply management unit integrates a battery pack (17), a charging interface (16) and a boost module (21). The charging interface (16) is electrically connected to the battery pack (17), and the output terminal of the battery pack (17) is electrically connected to the input terminal of the boost module (21). The data processing and communication unit includes an MCU (19) carrying a LoRa module and a 4G communication module (20). The power supply terminal of the MCU (19) carrying the LoRa module is electrically connected to the output terminal of the boost module (21). The radio frequency terminal of the MCU (19) carrying the LoRa module is connected to the LoRa antenna (22) extending into the main housing (24). The 4G communication module (20) is connected to the data terminal of the MCU (19) carrying the LoRa module.
9. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 1, characterized in that, The cloud platform's host computer adopts a microservice architecture, which specifically includes: Communication interface layer: includes load balancer and IoT message gateway, with MQTT protocol interface provided in IoT message gateway; Data storage layer: connected to the communication interface layer, including a time-series database for storing raw physiological data and a relational database for storing individual profiles; Core computing layer: connected to the data storage layer, including an algorithm engine module; the algorithm engine module stores edge computing result synchronization instructions and deep learning models for disease diagnosis and precision feeding; Interactive Application Layer: Connects to the core computing layer, including web visualization dashboards and mobile app interface modules.
10. The swallowable rumen sensor and disease monitoring and early warning system for dairy cows according to claim 9, characterized in that, The algorithm engine module includes program instructions for performing the following steps: Step (1) Construction of multidimensional time series data: Parse the received data packets and construct the first... Normalized eigenvectors at time step ; Step (2) Bidirectional temporal dependency extraction: extracting the normalized feature vector Input a bidirectional long short-term memory network and compute the forward hidden state. and backward hidden state ; Step (3) Multidimensional feature coupling: A multi-head attention mechanism is used to calculate the output of the attention head and perform a linear transformation to obtain the fused feature matrix. ; Step (4) Disease classification and diagnosis: For the fusion feature matrix Global average pooling is performed, and the disease probability distribution is output through a fully connected layer and a softmax activation function. ; Step (5) Vitality Index Calculation: Based on the number of ruminations within a unit time window Duration of rumination pH change rate and rate of temperature change Combined with the disease probability distribution Calculate the eating vitality index : In the formula, These are the weighting coefficients. The sigmoid normalization function. This represents the probability of abnormal diseases.