Live pig breeding whole-process intelligent management system

By constructing a global classifier and individual lightweight classifiers, the interference level is dynamically evaluated and updates are triggered, which solves the problems of inaccurate individual identification and poor environmental adaptability in the intelligent management system for pig farming. This achieves accurate monitoring and resource optimization, and improves the stability and efficiency of the system.

CN121744070AActive Publication Date: 2026-03-27CHANGSHA CHANGYU AGRI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-10
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing intelligent management systems for pig farming suffer from inaccurate individual identification, poor environmental adaptability, ineffective model updates, and unreasonable resource utilization, all of which affect system performance and stability.

Method used

A global pig identification classifier is constructed to generate individual lightweight classifiers. Updates are triggered by dynamically evaluating the overall interference level, and the model is adaptively optimized by combining update factors. A mechanism for verifying and backtracking the update effect is also set up.

Benefits of technology

It enables precise identification of individual pigs, improves the level of refined breeding management, allows for rapid adaptation to environmental changes, ensures monitoring accuracy and system stability, and optimizes the utilization of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121744070A_ABST
    Figure CN121744070A_ABST
Patent Text Reader

Abstract

The invention discloses a whole-process intelligent management system for live pig breeding, and relates to the technical field of live pig breeding management. A live pig identity label classifier is constructed, a light-weight classifier is generated for each live pig, and in the breeding monitoring process, the light-weight classifier is used for classifying the live pig identity label; evaluating a comprehensive interference level jointly formed by the physical shielding degree, the group dynamic interference degree and the multi-sensor data fusion difficulty degree in real time, and when the comprehensive interference level reaches a preset updating threshold value, triggering updating of the live pig lightweight classifier; after updating is triggered, based on the current lightweight classifier, an updating factor is introduced to generate an updated lightweight classifier, the updating factor is determined by the comprehensive interference level, and the updated lightweight classifier is used for monitoring the live pig subsequently. The problems of inaccurate individual identification, poor environmental adaptability, invalid updating and unreasonable resource utilization in intelligent management of pig breeding are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pig breeding management, in particular to a pig breeding whole-process intelligent management system. BACKGROUND

[0002] With the expansion of pig breeding scale, traditional manual management is inefficient and error-prone, and it is difficult to meet the needs of fine breeding. Intelligent breeding system has become a trend, but the existing system has deficiencies in pig individual identification and environmental adaptability.

[0003] The prior art is not accurate enough in identifying individual pigs, and it is difficult to adapt to dynamic changes in the breeding environment. The model lacks flexibility and effectiveness in updating, and is prone to over-update or poor performance after updating. In addition, the use of computing resources is not reasonable, affecting the overall performance and stability of the system.

[0004] Therefore, in view of the above problems, there is an urgent need for a pig breeding whole-process intelligent management system. SUMMARY

[0005] In view of the deficiencies of the prior art, the present application provides a pig breeding whole-process intelligent management system, which solves the problems of inaccurate individual identification, poor environmental adaptability, ineffective updating and unreasonable resource utilization in pig breeding intelligent management.

[0006] To achieve the above purpose, the present application realizes the following technical scheme: a pig breeding whole-process intelligent management system, comprising: a global classifier construction module for training based on a historical pig breeding record database to construct a pig identity identifier; an individual classifier generation module for generating a lightweight classifier for each pig during actual breeding monitoring; the lightweight classifier is based on the pig identity identifier and incorporates specific information of the pig to form an individual model for monitoring and identifying the pig; a dynamic interference evaluation and update triggering module for evaluating the comprehensive interference level composed of physical obstruction degree, group dynamic interference degree and multi-sensor data fusion difficulty in real time during breeding monitoring, and triggering the update of the lightweight classifier of the pig when the comprehensive interference level reaches the preset update threshold; an individual classifier adaptive update module for generating an updated lightweight classifier based on the current lightweight classifier after the update is triggered, the update factor is determined by the comprehensive interference level, and the updated lightweight classifier is used for subsequent monitoring of the pig.

[0007] Furthermore, the construction logic of the pig identification classifier includes: extracting multimodal monitoring data sequences for each historical pig throughout its entire breeding cycle from the historical pig breeding record database; the multimodal monitoring data includes at least visual image data, growth weight data, feeding behavior data, and health status data; performing temporal feature extraction and alignment on the multimodal monitoring data sequences to construct a differentiated feature template library for representing pigs of different identification types; and training the differentiated feature template library using a deep learning network based on an attention mechanism, so that the pig identification classifier can focus on key features that contribute highly to identification classification and output the pig's identification type label.

[0008] Furthermore, the generation logic of the lightweight classifier includes: using the pig identification classifier as the basic model architecture; acquiring specific monitoring data of the target pig during the initial monitoring period, wherein the specific monitoring data includes at least the pig's initial physical characteristics, behavioral pattern baseline, and voiceprint features; and using transfer learning technology to adapt the general knowledge of the pig identification classifier to the specific monitoring data of the target pig, fine-tuning some parameters of the basic model architecture to form a lightweight classifier highly bound to the pig.

[0009] Furthermore, the evaluation logic for the comprehensive interference level includes: the degree of physical occlusion is quantified by analyzing the collected images or video streams of pigs and calculating the proportion of the area of ​​the target pig's body parts that are occluded or the number of key feature points that are not visible; the degree of group dynamic interference is quantified by analyzing the relative movement speed of pigs within the group, the rate of change of distance between individuals, and the frequency of movement trajectory intersections; the degree of difficulty in multi-sensor data fusion is quantified by calculating the timestamp deviation, data confidence difference, and feature matching inconsistency between monitoring data from different sensors for the same pig; the above three quantified degree values ​​are combined into the comprehensive interference level by weighted summation or rule-based reasoning.

[0010] Furthermore, the setting of the update threshold is dynamically adjustable, and the adjustment is based on the following factors: the current breeding stage, wherein a lower update threshold is used in the fattening stage when pigs are frequently active to improve model sensitivity, and a higher update threshold is used in the relatively stable growth stage to maintain model stability; historical update frequency, if the lightweight classifier of a certain pig has been updated frequently recently, its update threshold is appropriately increased to avoid over-updating; and currently available computing resources, when the system computing resources are sufficient, the update threshold can be appropriately reduced to pursue better monitoring accuracy.

[0011] Furthermore, the logic of the update factor includes: the update factor is a control parameter used to adjust the model update magnitude; its value is determined by the comprehensive interference level. When the difference between the comprehensive interference level and the update threshold increases, the update factor value increases, indicating that the model needs to be adjusted to a greater extent to adapt to the changing environment; the update process is implemented by combining the update factor with the parameter update amount of the current lightweight classifier, specifically manifested in the process of model parameter optimization, where the update factor scales the step size of gradient descent or affects the strength of the regularization term.

[0012] Furthermore, it also includes: an update effect verification and model backtracking module, which is used to collect monitoring results within a preset verification period after monitoring with the updated lightweight classifier; compare the monitoring results with the benchmark results obtained through RFID readings to obtain the monitoring accuracy; if the monitoring accuracy is lower than the preset validity threshold, the update is determined to be invalid, the system automatically backtracks to the previous version of the lightweight classifier, and records the abnormal update event for analysis.

[0013] The present invention has the following beneficial effects: This intelligent management system for the entire pig farming process accurately identifies each pig by constructing a global classifier and individual lightweight classifiers, enabling personalized monitoring and improving the precision of farming management. It dynamically assesses the overall interference level and triggers updates, determining the update factor based on the interference, allowing the model to quickly adapt to changes in the farming environment and ensuring monitoring accuracy. The lightweight classifier reduces computational resource consumption, and the update threshold is dynamically adjustable, balancing monitoring accuracy and resource consumption according to available computing resources. It includes update effect verification and model backtracking modules to ensure effective updates, avoid invalid updates affecting monitoring, and guarantee system stability.

[0014] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0015] Figure 1 This is a structural diagram of an intelligent management system for the entire process of pig farming according to the present invention.

[0016] Figure 2 This is a flowchart of a method for an intelligent management system for the entire process of pig farming according to the present invention. Detailed Implementation

[0017] This application embodiment utilizes an intelligent management system for the entire process of pig farming, which enables precise and personalized monitoring, adaptive dynamic updates, and effective resource optimization.

[0018] The overall concept of this application's embodiments is as follows: A global pig identification classifier is built based on historical data, providing the infrastructure for individual classifiers. In actual farming, a lightweight classifier incorporating specific information is generated for each pig. During the farming process, the overall interference level is evaluated in real time, and an update threshold is dynamically set. When the threshold is reached, the lightweight classifier is updated with an update factor. Finally, the update effect is verified, and if it is ineffective, the model is backtracked.

[0019] Please see Figure 1 This invention provides a technical solution: an intelligent management system for the entire process of pig farming, comprising: a global classifier construction module, used to train a pig identification classifier based on a historical pig farming record database; an individual classifier generation module, used to generate a lightweight classifier for each pig during actual farming monitoring, the lightweight classifier being based on the pig identification classifier and incorporating the pig's specific information to form an individualized model specifically for monitoring and identification classification of that pig; a dynamic interference assessment and update triggering module, used to assess in real time the comprehensive interference level, composed of physical occlusion, group dynamic interference, and the difficulty of multi-sensor data fusion, during farming monitoring, and triggering an update of the lightweight classifier for that pig when the comprehensive interference level reaches a preset update threshold; and an individual classifier adaptive update module, used to generate an updated lightweight classifier based on the current lightweight classifier after the update is triggered, the update factor being determined by the comprehensive interference level, and the updated lightweight classifier being used for subsequent monitoring of that pig.

[0020] Specifically, the construction logic of the pig identification classifier includes: extracting multimodal monitoring data sequences for each historical pig throughout its entire breeding cycle from a historical pig breeding record database. The multimodal monitoring data includes at least visual image data, growth weight data, feeding behavior data, and health status data; extracting and aligning temporal features from the multimodal monitoring data sequences to construct a differentiated feature template library for representing pigs of different identification types; and training the differentiated feature template library using a deep learning network based on an attention mechanism, so that the pig identification classifier can focus on key features that contribute highly to identification classification and output the pig's identification type label.

[0021] In this implementation plan, the goal of the pig identification classifier is to establish a robust model that can distinguish pigs of different identities based on monitoring data. Its construction is a multi-step process that emphasizes feature engineering and model robustness.

[0022] The system extracts complete breeding cycle data sequences from a historical breeding record database, categorized by individual pig. This data exhibits multimodal characteristics and includes at least: Visual image data sequences: These include keyframes from daily monitoring videos, side-view images acquired at fixed points, and close-up images of the face or ears. For example, the system can extract the contour, texture, and color features of pigs at different growth stages and in different postures (standing, lying down, walking).

[0023] Growth weight data series: a curve of weight change recorded by regular weighing, reflecting an individual's growth rate and pattern.

[0024] Feeding behavior data sequence: Records from smart feeding stations, including the number of feedings per day, duration of each feeding, feed intake variation curves, and even feeding postures obtained through image analysis (such as the depth and angle of the head in the feed trough).

[0025] Health status data sequence: including regularly measured body temperature data, detection records of abnormal sounds such as cough, and indicators such as body surface cleanliness and eye activity based on image analysis.

[0026] These data need to be strictly time-aligned during extraction to ensure that different modalities under the same timestamp belong to the same state of the same pig.

[0027] The system does not directly use the raw data, but extracts temporal features that better characterize identity differences. For example: From the visual image sequence, extract the trend line of body length-to-width ratio changes with age and the change pattern of back contour curvature.

[0028] From the sequence of eating behaviors, we can extract features such as the regularity of the "eating-resting" cycle and the stability of the eating speed.

[0029] The growth weight data is fitted to a curve of a specific growth model, and the model parameters are extracted as features.

[0030] Next, the system analyzes the aforementioned feature sets of all historical pigs, identifying feature combinations that significantly distinguish pigs from different identity categories through clustering or statistical analysis. For each identity category, the system abstracts its most representative feature value range or variation pattern into a "differentiated feature template." The template sets for all identity categories constitute a differentiated feature template library. This template library essentially encodes the prior knowledge of "what characteristics various types of pigs typically possess."

[0031] A deep learning network integrating an attention mechanism is used as the main architecture of the classifier. The network input is preprocessed, aligned multimodal temporal data. The core role of the attention mechanism is to enable the model to automatically "focus" on the features and time segments most important to the current identity classification task during training and inference.

[0032] The specific training process is as follows: The model receives a data sequence of a historical pig and first converts the different modal data into feature vectors through their respective encoders. These feature vectors are then input into an attention layer. The attention layer calculates the "importance weight" of each feature vector for the final classification decision. For example, when identifying a specific breed of pig, the attention mechanism may learn to assign higher weight to its unique ear features while reducing attention to common body color features. Through training with a large number of historical samples, the model gradually learns a complex set of weight allocation rules, enabling it to accurately focus on key identification points and ignore irrelevant or interfering information when faced with new, unseen data, ultimately outputting an identity type label and a corresponding confidence score.

[0033] Specifically, the generation logic of the lightweight classifier includes: using a pig identification classifier as the basic model architecture; acquiring specific monitoring data of the target pig during the initial monitoring period, the specific monitoring data including at least the pig's initial physical characteristics, behavioral pattern baseline, and voiceprint features; and using transfer learning technology to adapt the general knowledge of the pig identification classifier to the specific monitoring data of the target pig, fine-tuning some parameters of the basic model architecture to form a lightweight classifier highly bound to the pig.

[0034] In this implementation plan, the goal of generating the lightweight classifier is to create an efficient and dedicated recognition model for each pig.

[0035] The generation process begins when the target pig enters the system's monitoring range, typically from its entry into the pen or its transfer from weaning to a new group. Using a pre-trained global pig identification classifier, the pig undergoes initial identification. This identification process may be based on the first batch of clear images acquired, preliminary weight data read as the pig passes through the aisle, etc. Initial identification provides basic information about the pig's macro-category (e.g., breed, batch) and links it to its electronic record.

[0036] An initial monitoring period is initiated, during which the system collects specific monitoring data for the pig at a high frequency and from as comprehensive an angle as possible. This data aims to capture the pig's unique and relatively stable characteristics, including at least: Initial physical characteristics: High-resolution multi-angle images of pigs captured under optimal lighting and angles are used to extract their unique static biological features such as spots, wrinkles, ear notches, and tail shapes. For example, the system may identify a pig with a unique V-shaped notch in its left ear and an irregularly shaped black spot on its right hind leg.

[0037] Baseline behavioral patterns: Record the pig's behavioral habits under undisturbed conditions. For example, its preferred resting area in the pigpen, its typical walking gait, its standing posture when drinking water, and the frequency and object preference of its interactions with other pigs (such as scratching each other).

[0038] Voiceprint characteristics: Collect the grunts made by the pig in a calm state (such as when resting) and the begging sounds when hungry, and analyze the stable patterns of its acoustic characteristics such as fundamental frequency and formants to form its "vocal fingerprint".

[0039] These specific data constitute a personalized set of information describing "who" this pig is.

[0040] The transfer learning process is initiated, using a global pig identification classifier as the basic model architecture. This architecture already incorporates general knowledge learned from massive amounts of data on how to extract effective features from multimodal data and perform classification (e.g., how to extract contours from images, how to extract periodic patterns from behavioral sequences). The goal of transfer learning is not to train a new model from scratch, but to "adapt" this powerful basic model to the specific pig in question.

[0041] The first few layers of the base model are fixed (these layers are typically responsible for extracting low-level, general features such as edges and textures), and only the parameters of the last few layers (responsible for high-level feature combination and classification decisions) are retrained. The training data consists of the specific monitoring data of this pig collected above, and the training labels are the pig's identification identifiers. Due to the small amount of data and the single target, this fine-tuning process is very fast and computationally inexpensive. Through fine-tuning, the model retains its strong ability to extract general features, while its decision layers are "calibrated" to specifically identify this particular pig. The calibrated model then becomes a lightweight classifier highly bound to this specific pig.

[0042] Specifically, the evaluation logic for the comprehensive interference level includes: the degree of physical occlusion is quantified by analyzing the collected images or video streams of pigs and calculating the proportion of the target pig's body parts that are occluded or the number of key feature points that are not visible; the degree of group dynamic interference is quantified by analyzing the relative movement speed of pigs within the group, the rate of change of distance between individuals, and the frequency of movement trajectory intersections; the difficulty of multi-sensor data fusion is quantified by calculating the timestamp deviation, data confidence difference, and feature matching inconsistency between monitoring data from different sensors for the same pig; the above three quantified degree values ​​are combined into the comprehensive interference level by weighted summation or rule-based reasoning.

[0043] In this implementation scheme, the quantification of physical occlusion primarily relies on data from visual sensors (cameras). The system performs real-time analysis on the acquired images or video streams of pigs. First, the bounding box of each pig in the image is located using a target detection algorithm. Then, for specific pigs that are the monitoring targets, the system employs image segmentation techniques (such as semantic segmentation) to separate their body regions from the background and other pigs. There are two main methods for quantifying the degree of occlusion: Area ratio method: Calculate the pixel area of ​​the target pig that is obscured by other pigs or feeding facilities (such as fences or feed troughs), and divide it by the total pixel area that the pig should theoretically have when it is intact to obtain an obscuration ratio value. For example, if one-third of the side of a pig is obscured by another pig, the obscuration ratio is approximately 0.33.

[0044] Keypoint Invisibility Method: The system predefines a set of key feature points crucial for identity recognition (such as the center of the eyes, the base of the ears, the tip of the nose, and the base of the tail). A keypoint detection algorithm determines whether these points are visible in the current image. The proportion of invisible keypoints to the total number of keypoints is calculated as another measure of occlusion. For example, when a pig's back is to the camera, keypoints such as the tip of the nose and the eyes are invisible, and this value is close to 1.

[0045] The system typically uses both methods in combination, taking the maximum value or a weighted average as the final quantification of the degree of physical occlusion.

[0046] Quantifying the degree of disturbance in group dynamics addresses the difficulties that the overall movement state of the pig herd poses for individual tracking and feature extraction. The system achieves this by analyzing consecutive video frames.

[0047] Using optical flow or target tracking algorithms, the velocity vectors of each pig in the pigpen (at least the target pig and its neighboring pigs) are calculated. Then, the difference between the velocity vectors of the target pig and the surrounding pigs (e.g., the average Euclidean distance) is calculated. The greater the difference, the more inconsistent and chaotic the group's movement, and the stronger the interference.

[0048] Calculate the distance between the target pig and its nearest neighbors, and track the rate of change of this distance over time. Dramatic and frequent fluctuations in distance indicate frequent interaction among the pigs, unstable positional relationships, and a high degree of interference.

[0049] Within a certain time window (e.g., 30 seconds), the number of times the predicted movement trajectory of the target pig (based on its current speed and direction) intersects with the predicted trajectories of other pigs is counted. A high frequency of intersections means that the target pig's path is easily interfered with by other pigs, increasing the uncertainty of identification and tracking.

[0050] The system normalizes the aforementioned sub-indicators (speed difference, distance change rate, and trajectory intersection frequency) and then synthesizes them into a quantitative value for the degree of dynamic disturbance in the group by weighting or taking the maximum value. For example, this value will increase significantly when pigs fight for feed or run away in fright.

[0051] Methods for quantifying the difficulty of multi-sensor data fusion include: Timestamp bias check: For data that claims to describe the location of target pigs at the same time, calculate the absolute bias of timestamps between key paired sensors and map it to a difficulty score.

[0052] Data confidence discrepancies: Many sensors or processing algorithms output confidence scores for their data. For example, a face (pig face) recognition algorithm outputs a confidence score of 0.9 for identifying the target pig, while a voiceprint-based recognition algorithm outputs a confidence score of only 0.4. This significant difference in confidence suggests that the data from at least one sensor is unreliable in the current environment. The system calculates the variance or range between confidence scores from different sources for the same discrimination target (such as identity or location) as an indicator of difficulty.

[0053] Feature matching inconsistency: For example, the color histogram feature of the target pig extracted from camera data has a similarity of 0.8 with the best match from the historical feature database for that pig; while the back contour feature extracted from top depth camera data at the same time has a similarity of only 0.5 with the historical best match. This inconsistency in cross-modal feature matching results directly reflects the difficulty of data fusion. The system quantifies this by comparing the dispersion of feature matching results from different modalities.

[0054] The three quantitative values—the degree of physical occlusion, the degree of dynamic interference from the group, and the difficulty of multi-sensor data fusion—are combined into a single scalar value, namely the overall interference level, using a pre-defined weighted summation formula (e.g., weights are set based on the deployment of each sensor and historical experience). This level reflects in real time the overall challenge posed by the current monitoring environment to the individual identification task.

[0055] Specifically, the update threshold is dynamically adjustable, and the adjustment is based on the following factors: the current breeding stage, where a lower update threshold is used in the fattening stage when pigs are active to improve model sensitivity, and a higher update threshold is used in the relatively stable growth stage to maintain model stability; historical update frequency, where if the lightweight classifier for a certain pig has been updated frequently recently, its update threshold is appropriately increased to avoid over-updating; and currently available computing resources, where the update threshold can be appropriately reduced when the system has sufficient computing resources to pursue better monitoring accuracy.

[0056] In this implementation plan, the update threshold is the threshold value for determining whether to trigger a model update. Setting it as dynamically adjustable rather than a fixed value is an important design feature of this system to improve its intelligence level and resource utilization efficiency.

[0057] Maintain an independent, dynamically updated threshold for the lightweight classifier for each pig. This threshold is adjusted primarily based on the following three factors: 1. Current breeding stage: Pigs exhibit significant differences in activity and group stability at different growth stages. The system automatically determines the pig's rearing stage (e.g., lactation, nursery, early fattening, late fattening) based on its age or weight information and employs differentiated threshold strategies.

[0058] High-activity phase (e.g., early fattening stage): During this stage, pigs grow rapidly, are highly curious, and frequently engage in rough play, resulting in rapid changes in group dynamics. To capture the physical changes caused by rapid growth and adapt to their active behavioral patterns, the system employs a relatively low update threshold. This means that even if environmental disturbances are not particularly high, the system tends to trigger updates as long as this low threshold is reached, thus maintaining the model's "high sensitivity" to individual changes. For example, during the rapid fattening period when pigs grow from 50 kg to 70 kg, their shoulder width and body length change significantly, and a lower threshold encourages the model to update body shape parameters more frequently.

[0059] In relatively stable phases (such as late fattening or gestation stages): During this phase, pig size changes slow down, behavior becomes more regular, and the group structure is relatively stable. At this time, the system uses a relatively high update threshold. The purpose of this is to "maintain model stability," avoiding unnecessary updates triggered by brief, minor disturbances (such as occasional running), thereby saving computational resources and preventing model performance degradation due to overfitting to noisy data. For example, in gestation stalls, where the activity range of pregnant sows is fixed, the threshold can be set higher.

[0060] 2. Historical update frequency: The system records the number of times the lightweight classifier for each pig has been updated recently (e.g., within the past week). If a pig's model is updated abnormally frequently recently, this may indicate two possibilities: first, the pig is in a highly unstable state (e.g., illness leading to abnormal behavior); second, the current environment is consistently harsh, or the quality of the pig's sensor data has been poor for a long time. In either case, blindly continuing to update the model frequently may yield little benefit, or even cause the model to stray further down the wrong path (e.g., starting to fit noise). Therefore, the system will appropriately increase the update threshold for that pig. After raising the threshold, updates will only be triggered when stronger interference signals appear. This is equivalent to adding a "cooling-off period" or "threshold raising" mechanism to the model updates, helping to prevent "over-updates" and unnecessary consumption of computing resources, while also prompting system administrators to pay attention to pigs with abnormal update frequencies and investigate potential problems.

[0061] 3. Currently available computing resources: The system's computing resources (such as CPU / GPU load, memory usage, and network bandwidth of edge servers) are limited, especially in scenarios that require processing data from tens of thousands of pigs simultaneously. The system monitors its own resource usage in real time.

[0062] When computing resources are plentiful (e.g., fewer batch data processing tasks at night, with server load below 30%), the system can handle the computational overhead of more frequent model updates. In this case, the system can appropriately lower the update threshold to pursue better monitoring accuracy and faster environmental adaptation. This is equivalent to using idle resources for "refined" optimization.

[0063] When computing resources are strained (e.g., during the day when real-time monitoring tasks are heavy and server load exceeds 80%), the system needs to prioritize ensuring the smooth operation of core real-time identification and monitoring tasks. In this case, the system will proactively increase the update threshold. This means that only the most severe environmental disturbances that are most likely to affect the accuracy of core tasks will trigger model updates. This strategy ensures the overall stability of the system and the reliability of core functions during periods of resource bottlenecks, representing an effective resource scheduling and quality trade-off strategy.

[0064] Specifically, the logic of the update factor includes: the update factor is a control parameter used to adjust the magnitude of model updates; its value is determined by the overall disturbance level. When the difference between the overall disturbance level and the update threshold increases, the update factor value increases, indicating that the model needs to be adjusted to a greater extent to adapt to the changing environment; the update process is achieved by combining the update factor with the parameter update amount of the current lightweight classifier. Specifically, during the model parameter optimization process, the update factor scales the step size of gradient descent or affects the strength of the regularization term.

[0065] In this implementation scheme, the update factor is defined as a control parameter that adjusts the magnitude of model updates, typically a scalar greater than 0. Its value is neither random nor fixed, but is determined by the direct cause triggering the update—the overall disturbance level—and its relative relationship with the dynamic update threshold.

[0066] The larger the difference between (comprehensive disturbance level and update threshold), the larger the value of the update factor. This difference reflects "the degree to which the current environmental severity exceeds the system's normal tolerance range".

[0067] Slight Exceedance: If the overall disturbance level is only slightly above the update threshold, it indicates that the environment has not changed significantly. In this case, the update factor should be a small value (e.g., around 1.0). This tells the model: "The environment has changed slightly; please make some minor adjustments to adapt." Significantly Exceeding: If the overall disturbance level is significantly higher than the update threshold (e.g., the threshold is 0.6, but the actual level reaches 0.9), it indicates a drastic and unconventional change in the environment (such as large-scale mixing of pig herds or extreme weather causing abnormal pig behavior). In this case, the update factor should be set to a larger value (e.g., 2.0 or higher). This sends a strong signal to the model: "The environment has changed significantly, the old model may be severely inapplicable, and a major adjustment is needed to recapture the target features." Model updates typically employ online learning or incremental learning algorithms based on gradient descent. Update factors primarily intervene and influence the update process in two ways: Scaling the gradient descent step size (learning rate adjustment): In the parameter update formula, the change in parameters equals the "learning rate" multiplied by the "gradient". The system multiplies the update factor by the base learning rate to obtain the effective learning rate for the current update step. When the update factor is large, the effective learning rate increases, and the "step size" by which the model parameters change along the gradient direction increases, thus achieving faster and larger-amplitude adjustments to adapt to drastic changes. When the update factor is small, the effective learning rate is close to or equal to the base learning rate, and the model undergoes regular, small-amplitude fine-tuning.

[0068] Influencing the strength of regularization terms (controlling model complexity changes): To prevent the model from overfitting to noise in the new data during updates, leading to "catastrophic forgetting" (i.e., forgetting previously learned correct features), regularization terms (such as L2 regularization) are usually added during the update process to constrain parameter changes within a certain range. The system can allow the update factor to influence the weight coefficients of the regularization term. When the update factor is large, the regularization strength can be appropriately weakened, allowing the model parameters greater freedom of change to adapt to the new environment. When the update factor is small, regularization is maintained or strengthened to constrain model changes and ensure its stability.

[0069] The specific steps of the update process are as follows: When the overall disturbance level exceeds the threshold and an update is triggered: The system locks onto the current lightweight classifier model for the target pig.

[0070] Based on the current overall interference level and update threshold, the update factor for this update is calculated.

[0071] The latest monitoring data within a short time window from the trigger time is collected as the training data for this update.

[0072] Starting with a lightweight classifier model and using the latest monitoring data as training data, initiate one (or several) rounds of gradient descent optimization. During the optimization process, use (base learning rate × update factor) as the actual learning rate, and may adjust the regularization strength based on the update factor.

[0073] After optimization, the updated model parameters are obtained, forming a new lightweight classifier for subsequent monitoring.

[0074] Specifically, it also includes: an update effect verification and model backtracking module, which is used to collect monitoring results within a preset verification period after monitoring with the updated lightweight classifier; compare the monitoring results with the benchmark results obtained through RFID readings to obtain the monitoring accuracy; if the monitoring accuracy is lower than the preset validity threshold, the update is determined to be invalid, the system automatically backtracks to the previous version of the lightweight classifier, and records the abnormal update event for analysis.

[0075] In this implementation plan, after monitoring the target pigs using the newly generated lightweight classifier for a period of time, the system initiates the verification process. During this verification period, the system, as usual, uses the newly generated lightweight classifier to identify and monitor the status of the target pigs, and records all identification results.

[0076] Meanwhile, to obtain a reliable "standard answer" or "benchmark result," the system uses a high-confidence independent data source for comparison. In this embodiment, RFID readings are used as the benchmark. Specifically, RFID ear tags are attached to the pigs' ears, and RFID readers are deployed at key locations in the pigpen, such as passageways, watering points, and feeding stations. When a target pig passes through these fixed locations, the reader reads the unique ID from its ear tag without contact. This ID is considered 100% accurate (unless the ear tag falls off or is damaged, in which case the system will issue a separate alarm). The system collects the time and location points of all RFID readings of the pig during the verification period.

[0077] The visual / behavioral recognition results based on the newly generated lightweight classifier will be spatiotemporally aligned and compared with the RFID-based physical reading results.

[0078] The system presets an effectiveness threshold and compares the calculated monitoring accuracy with this threshold: If the accuracy is greater than or equal to the validity threshold: the update is deemed valid, the newly generated lightweight classifier passes validation and officially becomes the current active model for that pig, and the old lightweight classifier is archived or discarded. The system records this successful update event.

[0079] If the accuracy is less than the validity threshold: the update may be invalid. This is a warning sign, meaning that the updated model's performance has decreased instead of improved, failing to reach a basic usable standard. Possible reasons include: the use of severely contaminated training data during the update process (e.g., mistakenly using data from other pigs as the target pig's data), an excessively large update factor causing the model to "learn incorrectly," or the model being unsuitable for updating in a highly interfering environment.

[0080] Once the update is determined to be invalid, the system immediately initiates an automatic rollback mechanism: Version rollback: The system retrieves the previous version of the lightweight classifier from storage and sets it as the current active model for that pig. This ensures that the continuity of monitoring services is not interrupted by a failed update.

[0081] The system records this abnormal update event in detail, including the overall interference level at the time of the update, the update factor used, the accuracy during the verification period, and possible reasons for failure. These records are stored in a dedicated log database for use by system administrators or subsequent root cause analysis algorithms.

[0082] As an advanced feature, the system can automatically adjust the dynamic update threshold of the pig based on consecutive failure records, or use a more conservative update factor in similar disturbance environments in the future.

[0083] In summary, this application has at least the following effects: By constructing a global classifier and individual lightweight classifiers, a dedicated monitoring model is created for each pig, accurately capturing its growth, behavior, and other characteristics to improve the precision of breeding management. Real-time evaluation of comprehensive interference and dynamic adjustment of update thresholds, along with the generation of update factors based on the degree of interference, enable the model to quickly adapt to changes in the breeding environment, ensuring monitoring accuracy and stability. An update effect verification and backtracking mechanism is set up to avoid ineffective updates. Simultaneously, the lightweight classifier reduces resource consumption, and the dynamic threshold balances accuracy and resource consumption.

[0084] Those skilled in the art will understand that embodiments of the present invention can be provided as methods. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that the combination of each step in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.

[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

[0088] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0089] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A fully intelligent management system for the entire process of pig farming, characterized in that, include: The global classifier building module is used to train a pig identification classifier based on a historical database of pig farming records. The individual classifier generation module is used to generate a lightweight classifier for each pig during the actual breeding monitoring process. The lightweight classifier is based on the pig identification classifier and incorporates the specific information of the pig to form an individualized model specifically for the monitoring and identification classification of the pig. The dynamic interference assessment and update triggering module is used to assess the comprehensive interference level in real time during the breeding monitoring process, which is composed of the degree of physical occlusion, the degree of group dynamic interference, and the difficulty of multi-sensor data fusion. When the comprehensive interference level reaches the preset update threshold, the update of the lightweight classifier for the pig is triggered. The individual classifier adaptive update module is used to generate an updated lightweight classifier based on the current lightweight classifier after an update is triggered, by introducing an update factor. The update factor is determined by the comprehensive interference level. The updated lightweight classifier is used for subsequent monitoring of the pig.

2. The intelligent management system for the entire process of pig farming according to claim 1, characterized in that, The construction logic of the pig identification classifier includes: From the historical pig farming record database, extract the multimodal monitoring data sequence of each historical pig throughout the entire farming cycle. The multimodal monitoring data includes at least visual image data, growth weight data, feeding behavior data, and health status data. Temporal features were extracted and aligned from the multimodal monitoring data sequence to construct a differentiated feature template library for characterizing pigs of different species. A deep learning network based on an attention mechanism is used to train the differential feature template library, enabling the pig identification classifier to focus on key features that contribute highly to identification classification and output the pig identification type label.

3. The intelligent management system for the entire process of pig farming according to claim 1, characterized in that, The generation logic of the lightweight classifier includes: The pig identification classifier is used as the basic model architecture; Acquire specific monitoring data of the target pig during the initial monitoring period. The specific monitoring data includes at least the pig's initial physical characteristics, behavioral pattern baseline, and voiceprint characteristics. By using transfer learning technology, the general knowledge of the pig identification classifier is adapted to the specific monitoring data of the target pig, and some parameters of the basic model architecture are fine-tuned to form a lightweight classifier that is highly bound to the pig.

4. The intelligent management system for the entire process of pig farming according to claim 1, characterized in that, The evaluation logic for the overall interference level includes: The degree of physical occlusion is quantified by analyzing the collected images or video streams of pigs and calculating the proportion of the body parts of the target pig that are occluded or the number of key feature points that are not visible. The degree of dynamic disturbance in the group is quantified by analyzing the relative movement speed of pigs within the group, the rate of change of distance between individuals, and the frequency of intersection of movement trajectories. The difficulty of multi-sensor data fusion is quantified by calculating the timestamp deviation, data confidence difference, and feature matching inconsistency between monitoring data from different sensors for the same pig. The three quantified severity values ​​are then combined into the overall interference level through weighted summation or rule-based reasoning.

5. The intelligent management system for the entire process of pig farming according to claim 4, characterized in that, The update threshold is dynamically adjustable, and its adjustment is based on the following criteria: In the current breeding stage, a lower update threshold is used in the fattening stage where pigs are frequently active in order to improve model sensitivity, while a higher update threshold is used in the relatively stable growth stage to maintain model stability. Historical update frequency: If the lightweight classifier for a certain pig has been updated frequently recently, its update threshold should be appropriately increased to avoid over-updating. Given the available computing resources, when the system has sufficient computing resources, the update threshold can be appropriately reduced to pursue better monitoring accuracy.

6. The intelligent management system for the entire process of pig farming according to claim 1, characterized in that, The logic behind the function of the update factor includes: The update factor is a control parameter used to adjust the magnitude of model updates; Its value is determined by the overall disturbance level. When the difference between the overall disturbance level and the update threshold increases, the update factor value increases, indicating that the model needs to be adjusted to a greater extent to adapt to the changing environment. The updating process of the updating factor is specifically manifested in applying the updating factor to the optimization process during the model parameter optimization process in order to adjust the parameter update magnitude. The update process is specifically implemented by scaling the step size of gradient descent by an update factor, or by influencing the strength of the regularization term by an update factor.

7. The intelligent management system for the entire process of pig farming according to claim 1, characterized in that, Also includes: Update the effect verification and model backtracking module, which is used to collect monitoring results within a preset verification period after monitoring is performed using the updated lightweight classifier; The monitoring results are compared with the baseline results obtained through RFID readings to obtain the monitoring accuracy rate; If the monitoring accuracy is lower than the preset validity threshold, the update is deemed invalid. The system will automatically revert to the previous lightweight classifier version and record the abnormal update event for analysis.

Citation Information

Patent Citations

  • Pig identification method based on convolutional neural network

    CN108664878A

  • Zero-perception dairy cow behavior observation system based on AI vision

    CN120877374A

  • Apparatus and method for controlling of rear wheel steering system

    KR1020250108959A

  • Systems and methods for automatic and noninvasive livestock health analysis

    US20230276773A1

  • Livestock sorting method, livestock sorting system, and related apparatus

    WO2024260122A1