Intelligent monitoring method, device and equipment for livestock breeding and storage medium
By synchronously processing multi-source signals and video frames and performing Bayesian updates, risk event clusters in livestock farming are identified, and actionable intervention recommendations are generated. This solves the problem of the lack of economic and biosafety decision support in existing technologies and achieves accuracy in resource optimization and risk assessment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-27
AI Technical Summary
Existing livestock farming monitoring systems lack the ability to support economic and biosafety decisions for on-site disposal, cannot effectively assess the transmission paths and population spread consequences between events, and lack quantitative estimates of disposal costs and production losses.
By acquiring multi-source signals and video frames, performing timestamp correction and synchronization processing, constructing individual daily cycle and long-term distribution baselines, using multi-scale filtering and context interpolation techniques for signal denoising, extracting physiological behavioral event sequences, performing Bayesian updates and adaptive regularization correction, calculating time delay dependency indicators, identifying risk event clusters, and generating actionable intervention recommendations.
It enables priority decision-making for livestock farms based on economic and biosecurity considerations, quantifies the potential economic impact and operational costs of risk events, optimizes resource allocation, and reduces the probability of large-scale outbreaks or spreads.
Smart Images

Figure CN121744231A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent monitoring technology for livestock farming, specifically to an intelligent monitoring method, device, equipment, and storage medium for livestock farming. Background Technology
[0002] With the development of large-scale and intelligent livestock farming, sensor- and video-based farm monitoring systems have been gradually applied to daily health management and early warning. Existing technologies mostly rely on single or limited modal indicators (such as body temperature, activity levels, or environmental parameters) for threshold or simple statistical alarms; additionally, there are research and products using machine learning for anomaly detection or group-level health scoring. These methods are effective in providing real-time alerts for abnormal events and reducing the frequency of off-site inspections, but they are typically limited to single-point alarms or black-box risk scoring, lacking the economic and biosafety decision support capabilities for on-site handling.
[0003] On the one hand, alarms are mostly based on threshold triggers or static risk scores, lacking modeling of transmission paths between events and the consequences of group spread; on the other hand, there is insufficient quantitative estimation of disposal costs, production losses and implementation uncertainties, thus failing to provide an economically driven prioritization and resource allocation for the limited veterinarians, manpower and materials on site.
[0004] In response to this, this application proposes an intelligent monitoring method, device, equipment, and storage medium for livestock farming to solve the aforementioned problems. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent monitoring method, device, equipment, and storage medium for livestock farming, in order to solve the problem that existing monitoring methods are limited to single-point alarms or black-box risk scoring, and lack the ability to support economic and biosafety decisions for on-site handling.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] Firstly, this application provides an intelligent monitoring method for livestock farming, including:
[0008] Acquire multi-source signals and video frames, and use timestamp correction and synchronization algorithms to achieve time alignment of various sampling streams to obtain synchronized original time-series streams;
[0009] The original synchronized time series is subjected to signal quality assessment, and multi-scale filtering and context interpolation techniques are used to complete denoising and missing value compensation to obtain a continuous time series signal stream. Short-term and long-term features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation.
[0010] Based on the structured physiological behavior event sequence, an individual daily cycle and long-term distribution baseline are constructed. The drift is corrected by online Bayesian update and adaptive regularization to obtain a normalized relative anomaly score sequence.
[0011] The normalized relative anomaly score sequence is windowed at multiple scales, including short-term, near-term, and long-term, and time-delay dependence indicators are calculated and weak causal inference is performed to obtain clusters of candidate risk events with aggregated single-point deviations and identify their possible triggering paths.
[0012] Based on the confidence level, impact scope, and intervention cost of the candidate risk event clusters, they are ranked and sorted, and executable intervention suggestions containing action recommendations, evidence, and review prompts are generated and output.
[0013] Furthermore, the normalized relative anomaly score sequence is windowed at multiple scales, time-delay dependence indicators are calculated, and weak causal inference is performed to obtain a cluster of candidate risk events, including:
[0014] Hierarchical aggregation of normalized relative anomaly score sequences is performed based on multiple non-overlapping and overlapping time windows;
[0015] The time window includes a short window (for capturing instantaneous events), a near-to-medium-term window (for capturing intraday pattern abrupt changes), and a long window (for capturing chronic trends). The sliding statistics are performed in order from short to long to generate a multi-scale aggregation matrix.
[0016] At each scale of the multi-scale aggregation matrix, the latency dependence index of adjacent event pairs is calculated and significance is screened to form the candidate risk event cluster.
[0017] Furthermore, the formula for calculating the confidence level (CCI) of the candidate risk event cluster is as follows:
[0018] For any event pair i→j, the Comprehensive Causal Confidence Index (CCI) is defined as:
[0019]
[0020] Where i represents the first event or potential triggering event, that is, the event node that occurs before another event in the time series;
[0021] j represents a subsequent event or potential response event, that is, an event node that occurs after i in the time series and may be affected by it;
[0022] τ represents the candidate delay;
[0023] , , These are the normalized delay mutual information, delay transmission entropy, and amplitude / spectral coherence indices, respectively.
[0024] This is a background noise correction factor generated based on the same time window and resampling.
[0025] α, β, γ, and λ are weighting coefficients, which are calibrated using cross-validation with a historical sample set to balance sensitivity and robustness;
[0026] When the CCI exceeds a preset threshold, the event pair is included in the high-confidence candidate set.
[0027] Furthermore, the weak causal inference is constructed by progressive link expansion: the event pair with the highest confidence in the high-confidence candidate set is used as the seed chain, and new event pairs are sequentially sorted by CCI in chronological order to extend the seed chain in a greedy manner, and the overall significance of the link is evaluated by a bootstrap method with permutation test after each extension.
[0028] If the bootstrap p-value is lower than the preset threshold and the cumulative CCI increase in the link exceeds the minimum gain, then the extension is accepted and continues to be extended until there are no new significant extensions or the maximum allowed extension is reached, thereby outputting a set of weak causal inferences sorted by confidence.
[0029] Furthermore, the formula for calculating the influence range (IR) of the candidate risk event cluster is as follows:
[0030]
[0031] Where S: the set of nodes within the event cluster (which can be individuals or spatial units).
[0032] pi: The probability of node i being affected at the end of the prediction window (pi(T) mentioned above);
[0033] pci: Path confidence (path_conf) contributed by node i in this cluster, first processed by non-negative normalization. Alternatively, keep the original value but ensure it is positive;
[0034] Δti: The time lag of node i relative to the cluster seed event (unit is the same as the prediction window, such as hours or days);
[0035] γ: Time decay parameter (γ≥0), used to reduce the weight of more distant time points on the current influence range; the larger the value, the more it is biased towards recent nodes, and it is calibrated by historical samples (typical initial value 0.1–1.0, depending on the time unit).
[0036] xi: Spatial coordinates of node i (two-dimensional or three-dimensional vector);
[0037] xc: The weighted centroid of the cluster, defined with equal weights. ;
[0038] Euclidean distance (can be replaced with Manhattan or great circle distance, depending on the spatial metric);
[0039] This IR is a time-decayed weighted RMS distance that combines probability, path confidence, and temporal information. It reflects both the preference of affected nodes to be closer to the cluster center and the spatial diffusion potential of the cluster. A larger value indicates a wider and more dispersed influence range; a smaller value indicates a more concentrated and localized influence. The parameter γ controls the emphasis on temporal recency; if spatial location is unavailable, it can be set... It equals "intra-group index distance" or grid index distance to quantify relative position.
[0040] Furthermore, the method for calculating the intervention cost of the candidate risk event cluster is as follows:
[0041]
[0042] Where S: the set of nodes within the event cluster.
[0043] Cfix: Fixed initiation and validation costs of the intervention (one-time expenditures, such as on-site dispatch, initial labor and administrative expenses);
[0044] pi: The probability that node i is affected;
[0045] The nominal single-node cost of node i is defined as follows: ,in:
[0046] The direct unit cost of implementing intervention at this node;
[0047] : The decrease in output per unit period for this node under the affected conditions;
[0048] Economic value per unit of output;
[0049] The weighted coefficient of variation for intra-cluster path confidence is defined as:
[0050] The weight wi can be pi or pi⋅pci. This is the weighted mean. This quantity reflects the non-uniformity of the cluster's built-in confidence distribution—the higher the uncertainty, the larger the CV;
[0051] ζ: Uncertainty sensitivity coefficient (calibration parameter, ζ≥0), controls the intensity of the uncertainty premium; when ζ=0, it degenerates into a no-premium model, calibrated through historical backtracking (typical value range 0.2–2.0);
[0052] exp(⋅): Exponential function, used to amplify the impact of CV by multiplication on the base cost, reflecting the engineering reality of "repetition / verification / larger buffer for low confidence";
[0053] First, define the basic expected cost of a cluster as the one-time startup / verification cost Cfix plus the nominal cost per node weighted by the probability of being affected. The sum of these values, then weighted by the intra-cluster path confidence coefficient of variation. The exponential amplification of the coefficient ζ is used as an uncertainty premium to obtain the expected intervention cost, which reflects the combined impact of direct costs and model / path uncertainty.
[0054] This formula uses the basic expected cost (fixed startup cost + sum of nominal costs weighted by the probability of being affected) as a base, and then amplifies the basic cost using an exponential uncertainty tax. This achieves the following: In practice, high path confidence or model uncertainty within a cluster often leads to additional manpower for repeated verification, redundant drug administration, or delayed decision-making, resulting in proportionally amplified actual costs. Using an exponential function maps small to medium changes in CV to considerable cost differences, facilitating the deweighting of high-uncertainty clusters in prioritization.
[0055] Furthermore, the step of constructing an individual daily cycle and long-term distribution baseline based on the structured physiological behavioral event sequence, and obtaining a normalized relative anomaly score sequence through online Bayesian update and adaptive regularization to correct drift, includes:
[0056] The model is segmented by intraday time period and the rhythmic, seasonal and sudden components are modeled separately. The online Bayesian update achieves adaptive fusion with hierarchical priors - short-term priors and long-term priors. When abrupt changes occur, a variable regularization parameter is applied to prevent short-term anomalies from excessively encroaching on the long-term baseline, so as to obtain the sensitivity of the normalized relative anomaly score sequence to sudden events while suppressing long-term drift misjudgment.
[0057] Secondly, this application provides an intelligent monitoring device for livestock farming, comprising:
[0058] The data acquisition and time synchronization module is used to acquire multi-source signals and video frames, and to achieve time alignment of various sampling streams through timestamp correction and synchronization algorithms to obtain synchronized original time-series streams.
[0059] An adaptive denoising and cross-modal feature extraction module is used to perform signal quality assessment, denoising, and missing value compensation on the synchronized original time series to obtain a continuous time series signal stream; short-term and long-term features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation;
[0060] The individualized baseline modeling and drift adaptation module is used to construct individual daily cycle and long-term distribution baselines based on the structured physiological behavior event sequence, and to obtain a normalized relative anomaly score sequence by correcting drift through online Bayesian update and adaptive regularization.
[0061] The multi-scale event association and weak causal identification module is used to perform window aggregation on the normalized relative anomaly score sequence at multiple scales, calculate the time delay dependency index, and perform weak causal inference to obtain candidate risk event clusters.
[0062] The risk grading and actionable intervention suggestion generation module is used to rank the candidate risk event clusters according to their confidence level, scope of impact and intervention cost, generate actionable intervention suggestions including action suggestions, evidence and review prompts, and output the actionable intervention suggestions.
[0063] Thirdly, this application provides an electronic device, the electronic device comprising:
[0064] At least one processor; and a memory communicatively connected to said at least one processor; wherein:
[0065] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described above.
[0066] Fourthly, this application provides a computer-readable storage medium, wherein a computer program is stored on the medium, and the computer program, when executed by a processor, implements the method described above.
[0067] Compared with the prior art, the present invention provides an intelligent monitoring method, device, equipment and storage medium for livestock farming. This method prioritizes decision-making and resource optimization based on economic and biosafety orientation. It integrates path confidence score and node impact probability into the calculation of impact range (IR) and expected intervention cost (EIC), and reflects the uncertainty premium driven by confidence in the cost, so that the alarm not only reflects biological risks but also quantifies their potential economic impact and operating costs.
[0068] Based on this multidimensional scoring, this method can prioritize intervention targets at the livestock farm scale according to net benefit or ROI, so as to prioritize the deployment of limited veterinary and disease prevention resources, drugs and isolation measures to the clusters that contribute the most to the risk of population health and production loss, thereby maximizing operational efficiency and reducing the probability of large-scale disease outbreaks or spreads while ensuring animal welfare and biosecurity. Attached Figure Description
[0069] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0070] Figure 1 A flowchart of an intelligent monitoring method for livestock farming provided in an embodiment of the present invention;
[0071] Figure 2 This is a block diagram of an intelligent monitoring device for livestock farming provided in an embodiment of the present invention. Detailed Implementation
[0072] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0073] In one embodiment, such as Figure 1 As shown, an intelligent monitoring method for livestock farming is provided. This embodiment illustrates the method applied to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0074] S100: Acquires multi-source signals and video frames, and uses timestamp correction and synchronization algorithms to achieve time alignment of various sampling streams, thereby obtaining synchronized original time-series streams;
[0075] Specifically, various sensors are deployed at the livestock sheds in livestock farming, including but not limited to: chest strap or ear tag physiological sensors to collect heart rate and respiration, body temperature patches or infrared thermometers to collect body temperature, triaxial accelerometers and pressure pads to collect motion / weight signals, environmental sensors to collect temperature, humidity and ammonia, and high-definition cameras to record video frames. The sensors collect data at a typical sampling rate of 1 Hz–100 Hz and record it with UTC timestamps.
[0076] The edge gateway uses GPS / PPS or NTP + local clock drift model for clock correction and performs drift compensation every minute (e.g., linear regression correction for drift <100 ms per hour). If necessary, heartbeat / frame alignment anchors are added to ensure that cross-modal alignment error is less than one sampling period.
[0077] The output data stream is a "synchronized raw time-series stream". Each record contains: subject ID, modality identifier, timestamp, raw measurement value and initial quality label (e.g., packet loss identifier, noise amplitude identifier).
[0078] S200. The synchronized original time series is evaluated for signal quality. Multi-scale filtering and context interpolation techniques are used to complete denoising and missing value compensation to obtain a continuous time series signal stream. Short-term and long-term features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation.
[0079] Specifically, edge or near-field computing nodes are used to first perform modal quality assessment (signal-to-noise ratio, packet loss rate, abnormal spike count) on the synchronized original time-series stream. Multi-scale wavelet denoising or variational mode decomposition (wavelet decomposition level 4–6) is used for high-frequency physiological signals, and Kalman smoothing or adaptive median filtering is used for low-frequency environmental signals.
[0080] Missing values are interpolated using a context-based strategy—short missing values (<30 s) are interpolated using linear / spline interpolation, while long missing values (>30 s) are interpolated using multiple imputation based on similar time windows and population migration patterns (e.g., using historical curves of similar individuals at the same time period for conditional reconstruction).
[0081] After denoising / repairing, output a quality confidence score (0–1) for each time period, and use this confidence score to weight and output a "clean and continuous time-series signal stream". At the same time, pass the quality metadata to the subsequent feature extraction so that the sensor uncertainty is reflected in the feature weights.
[0082] Furthermore, in the clean time series, a multi-scale sliding window was used to extract short-term (window length 10–60 s, 50% overlap) and medium-to-long-term (window length 5–30 min; 24-hour summary on a daily scale) features: physiological features were extracted, including heart rate variability (time domain RMSSD, frequency domain low / high frequency power ratio), respiratory spectrum energy band, body temperature slope, and abrupt change points.
[0083] For motion-related data, gait cycles, motion energy spectra, and anomalous acceleration segments are extracted. For video data, pose estimation / keypoint tracking (such as self-managed pose networks) is used to identify feeding, lying down, falling, and grouping events, and confidence scores are assigned to behavioral segments (composed of frame-level confidence and continuity scores).
[0084] These features are then aggregated into a structured "physiological-behavioral event sequence" using the time consistency rule. The event is recorded as a tuple (subject ID, event type, start and end time, intensity / score, source modality, quality confidence), and a preliminary normalized intensity value is calculated on the event tuple (the mapping function can be Sigmoid(k·raw_score + b), where k and b are calibrated by historical annotations).
[0085] S300. Based on the structured physiological behavior event sequence, construct the individual daily cycle and long-term distribution baseline, and obtain the normalized relative anomaly score sequence by online Bayesian update and adaptive regularization to correct drift.
[0086] Specifically, the model is segmented by intraday time period and the rhythmic, seasonal and sudden components are modeled separately. The online Bayesian update achieves adaptive fusion with hierarchical priors - short-term priors and long-term priors. When abrupt changes occur, a variable regularization parameter is applied to prevent short-term anomalies from excessively encroaching on the long-term baseline, so as to obtain the sensitivity of the normalized relative anomaly score sequence to sudden events while suppressing long-term drift misjudgment.
[0087] Furthermore, a hierarchical time series decomposition (separating intraday rhythms, weekly / seasonal characteristics, and trends, similar to STL) is adopted for the event sequence and temporal characteristics of each subject to establish a two-layer prior: short-term prior (with a high learning rate to capture daily variations, learning rate 0.05–0.2) and long-term prior (with a smooth learning rate of 0.001–0.01 to characterize seasonal / growth curves).
[0088] An online Bayesian update rule is used to update the baseline distribution parameters each time a new event arrives. Variable regularization is triggered when a statistical mutation is detected (e.g., the CUSUM of the baseline residual exceeds the threshold) to prevent excessive encroachment of a single anomaly on the long-term baseline. Finally, each time series / event is mapped to a normalized relative anomaly score sequence (value range 0–1, facilitating cross-subject comparison). This sequence, along with the baseline posterior distribution and drift markers, is used in step five for multi-scale association analysis.
[0089] S400. The normalized relative anomaly score sequence is windowed and aggregated at multiple scales, including short-term, near-term and long-term, and the time delay dependence index is calculated and weak causal inference is performed to obtain clusters of candidate risk events with aggregated single-point deviations and identify their possible triggering paths.
[0090] Specifically, the normalized relative anomaly score sequence is hierarchically aggregated based on multiple non-overlapping and overlapping time windows;
[0091] The time window includes a short window (for capturing instantaneous events), a near-to-medium-term window (for capturing intraday pattern abrupt changes), and a long window (for capturing chronic trends). The sliding statistics are performed in order from short to long to generate a multi-scale aggregation matrix.
[0092] At each scale of the multi-scale aggregation matrix, the latency dependence index of adjacent event pairs is calculated and significance is screened to form the candidate risk event cluster.
[0093] Furthermore, the normalized anomaly score sequence and event sequence are hierarchically aggregated using three overlapping sliding windows: short-term (e.g., 10–60 min), near-to-medium-term (e.g., 1–12 h), and long-term (e.g., 24–168 h). The mutual information of time delay (TDMI), time delay propagation entropy (TE), and spectral / amplitude coherence (COH) are calculated. For each candidate event pair i→j, a comprehensive causal confidence score is constructed based on normalized indices.
[0094] Where i represents the first event or potential triggering event, that is, the event node that occurs before another event in the time series;
[0095] j represents a subsequent event or potential response event, that is, an event node that occurs after i in the time series and may be affected by it;
[0096] τ represents the candidate delay;
[0097] , , These are the normalized delay mutual information, delay transmission entropy, and amplitude / spectral coherence indices, respectively.
[0098] This is a background noise correction factor generated based on the same time window and resampling.
[0099] α, β, γ, and λ are weighting coefficients, which are calibrated using cross-validation with a historical sample set to balance sensitivity and robustness;
[0100] When the CCI exceeds a preset threshold, the event pair is included in the high-confidence candidate set;
[0101] Preferably, when expressed as an ordered pair i→j, the temporal order is emphasized: i occurs before the candidate time delay τ, and j occurs after i. The two are regarded as a pair for statistical association or causal tests.
[0102] i and j can occur on the same subject (e.g., a rise in the body temperature of a cow → a decrease in feed intake of the same cow), or across subjects or spaces (e.g., a sudden increase in ammonia levels in the barn → a decrease in feed intake of the group or abnormal activity of neighboring cows).
[0103] i and j can come from the same mode (e.g., two temperature anomalies) or different modes (e.g., increased ambient ammonia → reduced feeding behavior detected in the video).
[0104] Example 1: i = (cow #12, sudden increase in body temperature, 2025-12-10 09:05), j = (cow #12, reduced feeding time, 2025-12-10 09:40). Explanation: The same cow first showed an increase in body temperature, followed by a decrease in feed intake, forming a candidate i→j pair.
[0105] Example 2: i = (Barn A, sudden increase in ammonia concentration, 2025-12-09 14:00), j = (Cattle herd, uniform decrease in activity level, 2025-12-09 15:00). Explanation: The environmental event acts as the trigger, and the group behavior acts as the response.
[0106] Example 3: i = (Niu #5, Abnormal acceleration fragment (suspected fall), 2025-12-11 07:12), j = (Niu #6, Stress-related increased heart rate, 2025-12-11 07:20). Explanation: Cross-individual association pairs that may be transmitted through social behavior or environmental factors.
[0107] Subsequently, the CCI is converted into the side propagation probability pe through the exponential mapping p = 1 − exp(−σ·CCI), so that the statistical signal can be mapped to the propagation potential in a probabilistic sense. Using the event pair with the highest confidence as the seed, a weak causal chain is constructed by greedily extending the CCI. The overall significance of the link is evaluated by the permutation test bootstrapping method (bootstrapping p < 0.05 is considered significant). At each link extension, the cumulative CCI and bootstrapping significance are recorded and low-gain extensions are pruned, thereby outputting the "candidate risk event cluster" and the path_conf (path confidence score) calculated by node / path, as well as the time series evidence trajectory of each path.
[0108] Preferably, the weak causal inference is constructed by progressive link expansion: the event pair with the highest confidence in the high-confidence candidate set is used as the seed chain, and new event pairs are sequentially sorted by CCI in a greedy manner to extend the seed chain, and the overall significance of the link is evaluated by a bootstrap method with permutation test after each extension.
[0109] If the bootstrap p-value is lower than the preset threshold and the cumulative CCI increase in the link exceeds the minimum gain, then the extension is accepted and continues to be extended until there are no new significant extensions or the maximum allowed extension is reached, thereby outputting a set of weak causal inferences sorted by confidence.
[0110] S500 ranks and sorts the candidate risk event clusters according to their confidence level, scope of impact, and intervention cost, generates executable intervention suggestions containing action recommendations, evidence, and review prompts, and outputs the executable intervention suggestions.
[0111] Specifically, for each candidate cluster of risk events, with the probability p of each node being affected... i path_conf and the spatial coordinates x of the node i Relative time lag Δt i Calculate the effective radius of influence IR (using the formula:
[0112]
[0113] Where S: the set of nodes within the event cluster (which can be individuals or spatial units).
[0114] pi: The probability of node i being affected at the end of the prediction window (pi(T) mentioned above);
[0115] pci: Path confidence (path_conf) contributed by node i in this cluster, first processed by non-negative normalization. Alternatively, keep the original value but ensure it is positive;
[0116] Δti: The time lag of node i relative to the cluster seed event (unit is the same as the prediction window, such as hours or days);
[0117] γ: Time decay parameter (γ≥0), used to reduce the weight of more distant time points on the current influence range; the larger the value, the more it is biased towards recent nodes, and it is calibrated by historical samples (typical initial value 0.1–1.0, depending on the time unit).
[0118] xi: Spatial coordinates of node i (two-dimensional or three-dimensional vector);
[0119] xc: The weighted centroid of the cluster, defined with equal weights. ;
[0120] Euclidean distance (can be replaced with Manhattan or Great Circle distance, depending on the spatial metric).
[0121] This IR is a time-decayed weighted RMS distance that combines probability, path confidence, and temporal information. It reflects both the preference of affected nodes to be closer to the cluster center and the spatial diffusion potential of the cluster. A larger value indicates a wider and more dispersed influence range; a smaller value indicates a more concentrated and localized influence. The parameter γ controls the emphasis on temporal recency; if spatial location is unavailable, it can be set... It equals "intra-group index distance" or grid index distance to quantify relative position.
[0122] Preferably, the initial value of γ can be set to 0.2 / hour and fine-tuned through historical backtesting, while constructing a nominal single-node cost for each node in the cluster:
[0123]
[0124] Determined by the bills for medicines, labor, and isolation supplies. Estimated by mapping individual baselines to normalized scores, and calculate the expected intervention cost. :
[0125]
[0126] Where S: the set of nodes within the event cluster;
[0127] Cfix: Fixed initiation and validation costs of the intervention (one-time expenditures, such as on-site dispatch, initial labor and administrative expenses);
[0128] The probability of node i being affected (i.e., pi(T) mentioned earlier);
[0129] The nominal single-node cost of node i is defined as follows: ,in:
[0130] The direct unit cost of implementing intervention at this node (medicine, labor, isolation materials, etc.);
[0131] : The decrease in output per unit period of the node under the affected conditions (which can be mapped by normalized outlier score or historical mean).
[0132] Economic value per unit of output;
[0133] The weighted coefficient of variation for intra-cluster path confidence is defined as:
[0134] The weight wi can be pi or pi⋅pci. This is the weighted mean. This quantity reflects the non-uniformity of the cluster's built-in confidence distribution—the higher the uncertainty, the larger the CV;
[0135] ζ: Uncertainty sensitivity coefficient (calibration parameter, ζ≥0), controls the intensity of the uncertainty premium; when ζ=0, it degenerates into a no-premium model, calibrated through historical backtracking (typical value range 0.2–2.0);
[0136] exp(⋅): Exponential function, used to amplify the impact of CV by multiplication on the base cost, reflecting the engineering reality of "repeated / verified / larger buffer for low confidence".
[0137] First, define the basic expected cost of a cluster as the one-time startup / verification cost Cfix plus the nominal cost per node weighted by the probability of being affected. The sum of these values, then weighted by the intra-cluster path confidence coefficient of variation. The exponential amplification of the coefficient ζ is used as an uncertainty premium to obtain the expected intervention cost, which reflects the combined impact of direct costs and model / path uncertainty.
[0138] Using the basic expected cost (the sum of fixed startup cost and nominal cost weighted by the probability of being affected) as a base, an exponential uncertainty tax is applied to amplify this base cost. This approach achieves the following: In practice, high path confidence or model uncertainty within a cluster often leads to additional manpower for repeated verification, redundant drug administration, or delayed decision-making, resulting in proportionally amplified actual costs. Using an exponential function maps small to medium changes in CV (cost per unit cost) into substantial cost differences, facilitating the deweighting of high-uncertainty clusters in prioritization.
[0139] Preferably, among which For p i The weighted path confidence coefficient of variation, ζ, can be initially set to 0.5, and sensitivity analysis can be performed to measure IR and Expected Affected (Σp). i ), ExpectedLoss (Σ) · · After forming a multidimensional score with EIC, an actionable intervention list is generated according to decision rules (e.g., prioritizing maximum NetBenefit or ROI > threshold). This list includes suggested actions, expected reduction in impact, priority, and indicators requiring manual review. The final data stream is output as a structured record: each candidate cluster contains a list of member nodes, and each node p... i Path confidence (path_conf), effective radius of influence (IR), and expected intervention cost. The suggested actions and evidence trajectories serve as direct inputs for downstream handling modules or human decision-making, thereby achieving a closed loop of monitoring, identification, and handling.
[0140] As can be seen from the above, this method prioritizes decision-making and resource optimization based on economic and biosafety—integrating path confidence scores and the probability of nodes being affected into the calculation of impact range (IR) and expected intervention cost (EIC), and reflecting the uncertainty premium driven by confidence in the cost, so that the alarm not only reflects biological risks but also quantifies their potential economic impact and operational costs.
[0141] Based on this multidimensional scoring, this method can prioritize intervention targets at the livestock farm scale according to net benefit or ROI, so as to prioritize the deployment of limited veterinary and disease prevention resources, drugs and isolation measures to the clusters that contribute the most to the risk of population health and production loss, thereby maximizing operational efficiency and reducing the probability of large-scale disease outbreaks or spreads while ensuring animal welfare and biosecurity.
[0142] In one exemplary embodiment, such as Figure 2 As shown, an intelligent monitoring device for livestock farming is provided, comprising:
[0143] The data acquisition and time synchronization module is used to acquire multi-source signals and video frames, and to achieve time alignment of various sampling streams through timestamp correction and synchronization algorithms to obtain synchronized original time-series streams.
[0144] An adaptive denoising and cross-modal feature extraction module is used to perform signal quality assessment, denoising, and missing value compensation on the synchronized original time series to obtain a continuous time series signal stream; short-term and long-term features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation;
[0145] The individualized baseline modeling and drift adaptation module is used to construct individual daily cycle and long-term distribution baselines based on the structured physiological behavior event sequence, and to obtain a normalized relative anomaly score sequence by correcting drift through online Bayesian update and adaptive regularization.
[0146] The multi-scale event association and weak causal identification module is used to perform window aggregation on the normalized relative anomaly score sequence at multiple scales, calculate the time delay dependency index, and perform weak causal inference to obtain candidate risk event clusters.
[0147] The risk grading and actionable intervention suggestion generation module is used to rank the candidate risk event clusters according to their confidence level, scope of impact and intervention cost, generate actionable intervention suggestions including action suggestions, evidence and review prompts, and output the actionable intervention suggestions.
[0148] The beneficial effects and technical effects of the same intelligent monitoring method for livestock farming are not repeated here.
[0149] In one embodiment, this application provides an electronic device, the electronic device comprising:
[0150] At least one processor; and a memory communicatively connected to said at least one processor; wherein:
[0151] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in Embodiment 1.
[0152] In one embodiment, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in Embodiment 1.
[0153] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A smart monitoring method for livestock farming, characterized in that, include: Acquire multi-source signals and video frames, and use timestamp correction and synchronization algorithms to achieve time alignment of various sampling streams to obtain synchronized original time-series streams; The synchronized original time series is subjected to signal quality assessment, denoising, and missing value compensation to obtain a continuous time series signal stream; short-duration and long-duration features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation; Based on the structured physiological behavior event sequence, an individual daily cycle and long-term distribution baseline are constructed. The drift is corrected by online Bayesian update and adaptive regularization to obtain a normalized relative anomaly score sequence. The normalized relative anomaly score sequence is windowed at multiple scales, time delay dependence index is calculated, and weak causal inference is performed to obtain candidate risk event clusters; Based on the confidence level, impact scope, and intervention cost of the candidate risk event clusters, they are ranked and sorted, and executable intervention suggestions containing action recommendations, evidence, and review prompts are generated and output.
2. The intelligent monitoring method for livestock farming according to claim 1, characterized in that, The process involves windowing the normalized relative anomaly score sequence across multiple scales, calculating latency-dependent indices, and performing weak causal inference to obtain a cluster of candidate risk events, including: Hierarchical aggregation of normalized relative anomaly score sequences is performed based on multiple non-overlapping and overlapping time windows; The time window includes a short time window, a near-to-mid-term window, and a long time window. Sliding statistics are performed in order from short to long to generate a multi-scale aggregation matrix. At each scale of the multi-scale aggregation matrix, the latency dependence index of adjacent event pairs is calculated and significance is screened to form the candidate risk event cluster.
3. The intelligent monitoring method for livestock farming according to claim 1, characterized in that, The formula for calculating the confidence level (CCI) of the candidate risk event cluster is as follows: For any event pair i→j, the Comprehensive Causal Confidence Index (CCI) is defined as: Where i represents the first event or potential triggering event, that is, the event node that occurs before another event in the time series; j represents a subsequent event or potential response event, that is, an event node that occurs after i in the time series and may be affected by it; τ represents the candidate delay; , , These are the normalized delay mutual information, delay transmission entropy, and amplitude / spectral coherence indices, respectively. This is a background noise correction factor generated based on the same time window and resampling. α, β, γ, and λ are weighting coefficients, which are calibrated using cross-validation with a historical sample set to balance sensitivity and robustness; When the CCI exceeds a preset threshold, the event pair is included in the high-confidence candidate set.
4. The intelligent monitoring method for livestock farming according to claim 3, characterized in that, The weak causal inference is constructed by progressive link expansion: the event pair with the highest confidence in the high-confidence candidate set is used as the seed chain, and new event pairs are sequentially sorted by CCI in chronological order to extend the seed chain in a greedy manner. After each extension, the bootstrapping method with permutation test is used to evaluate the overall significance of the link. If the bootstrap p-value is lower than the preset threshold and the cumulative CCI increase in the link exceeds the minimum gain, then the extension is accepted and continues to be extended until there is no new significant extension or the maximum allowed extension is reached, thereby outputting a set of weak causal inferences sorted by confidence.
5. The intelligent monitoring method for livestock farming according to claim 1, characterized in that, The formula for calculating the influence range (IR) of the candidate risk event cluster is as follows: Where S: the set of nodes within the event cluster; pi: The probability that node i will be affected at the end of the prediction window; pci: Path confidence contributed by node i in this cluster, first processed by non-negative normalization. Or keep the original value; Δti: The time lag of node i relative to the cluster seed event; γ: Time decay parameter, used to reduce the weight of more distant time points on the current influence range; the larger the value, the more it is biased towards recent nodes; xi: Spatial coordinates of node i; xc: The weighted centroid of the cluster, defined with equal weights. ; Euclidean distance.
6. The intelligent monitoring method for livestock farming according to claim 1, characterized in that, The method for calculating the intervention cost of the candidate risk event cluster is as follows: Where S: the set of nodes within the event cluster; Cfix: Fixed initiation and validation costs for intervention; pi: The probability that node i is affected; The nominal single-node cost of node i is defined as: ,in: The direct unit cost of implementing intervention at this node; : The decrease in output per unit period for this node under the affected conditions; Economic value per unit of output; The weighted coefficient of variation of intra-cluster path confidence is defined as: Where the weight w i p can be taken i or p i ⋅pc i , It is the weighted average; ζ: Uncertainty sensitivity coefficient, controlling the intensity of the uncertainty premium; when ζ=0, it degenerates into a no-premium model, which is calibrated through historical backtracking. exp(⋅): Exponential function, used to amplify the impact of CV on the base cost in a multiplicative manner.
7. The intelligent monitoring method for livestock farming according to claim 1, characterized in that, The individual daily cycle and long-term distribution baseline are constructed based on the structured physiological behavior event sequence. Through online Bayesian updates and adaptive regularization to correct drift, a normalized relative anomaly score sequence is obtained, including: The model is segmented by intraday time period and the rhythmic, seasonal and sudden components are modeled separately. The online Bayesian update achieves adaptive fusion with hierarchical priors - short-term priors and long-term priors. When abrupt changes occur, a variable regularization parameter is applied to prevent short-term anomalies from excessively encroaching on the long-term baseline, so as to obtain the sensitivity of the normalized relative anomaly score sequence to sudden events while suppressing long-term drift misjudgment.
8. An intelligent monitoring device for livestock farming, characterized in that, include: The data acquisition and time synchronization module is used to acquire multi-source signals and video frames, and to achieve time alignment of various sampling streams through timestamp correction and synchronization algorithms to obtain synchronized original time-series streams. An adaptive denoising and cross-modal feature extraction module is used to perform signal quality assessment, denoising, and missing value compensation on the synchronized original time series to obtain a continuous time series signal stream; short-term and long-term features are extracted from the continuous time series signal stream and transformed into a structured physiological behavior event sequence through time window semantic segmentation; The individualized baseline modeling and drift adaptation module is used to construct individual daily cycle and long-term distribution baselines based on the structured physiological behavior event sequence, and to obtain a normalized relative anomaly score sequence by correcting drift through online Bayesian update and adaptive regularization. The multi-scale event association and weak causal identification module is used to perform window aggregation on the normalized relative anomaly score sequence at multiple scales, calculate the time delay dependency index, and perform weak causal inference to obtain candidate risk event clusters. The risk grading and actionable intervention suggestion generation module is used to rank the candidate risk event clusters according to their confidence level, scope of impact and intervention cost, generate actionable intervention suggestions including action suggestions, evidence and review prompts, and output the actionable intervention suggestions.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to said at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The medium is a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.