Blocking type method for identifying abnormal rotation behavior of pig only based on three-axis attitude angle
By identifying abnormal rotational behavior in pigs using three-axis attitude angles, and constructing a low-frequency continuous sampling mechanism and anti-winding design, the problems of high identification complexity, high power consumption, and insufficient identification in existing technologies are solved, and efficient monitoring of abnormal rotational behavior is achieved under low power consumption conditions.
Patent Information
- Application Number
- CN202511036274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-26
- Publication Date
- 2025-12-19
AI Technical Summary
Existing methods for identifying abnormal rotation behavior in pigs rely on multimodal sensors, resulting in complex algorithms, high power consumption, and difficulty in long-term deployment in large-scale pig farms. Furthermore, they lack specialized modeling and continuous trend judgment for abnormal rotation behavior, leading to insufficient identification capabilities and risks of delayed early warning.
Using three-axis attitude angles as the sole identification input, a time-series analysis mechanism with low-frequency continuous sampling is constructed. Combined with multiple anti-winding designs, it ensures high recognition and strong blocking capabilities for abnormal rotation behavior identification, making it suitable for wearable terminals.
It enables high-frequency monitoring and early identification of abnormal rotation behavior in pigs under low power consumption conditions. It has the advantages of clear logical path, closed data source, low deployment cost and high identification accuracy, and is suitable for large-scale breeding scenarios.
Smart Images

Figure CN121167347A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent monitoring and behavior recognition technology for livestock and poultry, specifically to a closed-loop method for identifying abnormal rotational behavior in pigs based solely on three-axis attitude angles. This method is one of the key algorithm methods for intelligent breeding, animal behavior perception, and health early warning systems, and is particularly suitable for application scenarios in farms for continuous identification and closed-loop protection of abnormal pig behaviors (such as repeated circling and continuous head tilting). Background Technology
[0002] With the development of intelligent farming technology, wearable animal devices are widely used in areas such as behavior monitoring, health management, and precision feeding. Especially in large-scale pig farming, behavioral recognition technology is considered an important means to improve animal welfare, reduce disease risks, and increase management efficiency. Abnormal behaviors (such as continuous circling, spinning, and rigidity) are often early signs of various neurological diseases, central nervous system abnormalities, or stress responses, making them crucial monitoring indicators for early detection, early isolation, and early intervention.
[0003] Existing technologies mostly employ devices integrating six-axis or nine-axis inertial sensors to achieve multimodal recognition of animal behavior by fusing data from three-axis acceleration, three-axis angular velocity, and magnetometers. While these methods possess a certain level of recognition capability, their high algorithmic complexity, high power consumption, and high deployment costs significantly limit their large-scale commercial applications. Furthermore, most methods focus more on classifying everyday behaviors such as standing, lying down, and feeding, lacking specialized recognition methods and structured path definitions for abnormal rotational behavior, a crucial health risk signal.
[0004] On the other hand, some systems attempt to obtain short-term data windows using intermittent high-frequency sampling mechanisms to supplement behavior recognition capabilities. However, such sampling strategies are difficult to capture the trend characteristics of continuous rotation behavior due to the lack of trajectory continuity, and there is a risk of missed recognition.
[0005] Therefore, there is an urgent need for an abnormal rotation behavior identification method that relies solely on three-axis attitude angle data, has a clear sampling mechanism, a controllable identification path, and possesses a blocking protection capability. This method can effectively identify abnormal behaviors that pigs may exhibit under low power consumption constraints, thereby improving the targeting and practicality of intelligent monitoring.
[0006] This invention is proposed against this background, aiming to construct a closed identification method that uses three-axis attitude angle as the only input, eliminates interference from other sensor inputs, and can be deployed at the edge or in the cloud to identify abnormal behaviors such as continuous circling of pigs, and realize a highly feasible and highly blocked identification path in strong monitoring scenarios. Summary of the Invention
[0007] I. Purpose of the Invention
[0008] The purpose of this invention is to provide a closed-loop method for identifying abnormal rotational behavior in pigs based solely on three-axis attitude angles, thereby addressing the following problems in the prior art: Redundant input identification and high power consumption: Existing methods generally rely on multimodal sensors (such as six-axis and nine-axis IMUs) to introduce multidimensional acceleration, angular velocity or magnetometer signals, resulting in complex algorithms and high power consumption, making it difficult to deploy in large-scale pig farms for a long time; The identification path is not closed and is easily bypassed: Although some identification methods use attitude angles to participate in the analysis, they do not build a clear blocking logic, which makes it easy for the core identification path to be bypassed by different sensor combinations, resulting in an unclear scope of technical protection. Insufficient ability to recognize rotational behaviors: Existing recognition methods mostly focus on static behaviors (such as standing, lying down, eating, etc.), lacking specialized modeling and continuous trend judgment for abnormal rotational behaviors, which poses the risk of missing behavior recognition and delayed early warning; High-frequency sampling is not feasible, and intermittent sampling is not consistent: Although high-frequency continuous sampling can support rotation trajectory recognition, it consumes too much energy and bandwidth in commercial deployment; while intermittent high-frequency sampling mechanisms (such as sampling for 10 seconds every 5 minutes) are difficult to effectively identify rotation behavior due to the lack of time continuity.
[0009] To address this, the present invention proposes a blockade-style behavior recognition path, which explicitly uses the three-axis attitude angles (Yaw, Pitch, Roll) as the unique recognition input and constructs a time series analysis mechanism based on low-frequency continuous sampling to accurately identify the continuous rotational behavior of pigs (such as repeated circling, head tilting and walking). It can be widely deployed on wearable terminals such as ear tags, collars, and back clips.
[0010] This invention also proposes multiple anti-winding designs, covering data sources, identification mechanisms, sensing structures, and sampling strategies, ensuring that any method for identifying abnormal rotational behavior using three-axis attitude angles falls within the protection scope. This achieves a unified approach of high identification capability, strong blocking capability, and high deployment feasibility, meeting the actual needs of early abnormal state identification of pigs in current large-scale intelligent farming scenarios.
[0011] II. Technical Solution
[0012] (I) Detailed description of methods and steps
[0013] Step 1: Initialization and periodic low-frequency acquisition of attitude angle data.
[0014] This step includes three aspects: initialization of the wearing terminal, definition of attitude angle parameters, and sampling scheduling mechanism, which are used to achieve long-term, stable, and low-power dynamic perception of the pig's behavioral state.
[0015] 1.1 Initialization of Attitude Angle Data Acquisition Equipment
[0016] The intelligent terminal device, which integrates a three-axis gyroscope, is worn on the pig's body surface, preferably on the ear, back, or neck area, to ensure that the posture perception data is consistent with the pig's actual movement posture.
[0017] The gyroscope acquires and calculates the three-axis spatial attitude angles, including: Yaw: The angle of rotation around the vertical axis, reflecting the pig's left and right rotation (unit: °); Pitch: An angle of rotation about the lateral axis, reflecting head-up and head-down movements (unit: °). Roll angle: The angle of rotation around the front and rear axles, reflecting the body's rolling state (unit: °).
[0018] The collected data is indexed by timestamps to form a continuous three-dimensional attitude angle time series:
[0019] 1.2 Intermittent Periodic Sampling Mechanism
[0020] The present invention adopts an intermittent low-frequency sampling mechanism, that is, a sampling operation is triggered once within a fixed time interval (including but not limited to 10 seconds), each sampling cycle continues to run for a period of time (e.g., 20 minutes), and three-axis attitude angle data are continuously collected at a set frequency (e.g., 1Hz) within the cycle.
[0021] This mechanism runs continuously on the local terminal device, forming a time series of attitude angles that is complete in time and stable in rhythm, which is used to support the input of subsequent abnormal behavior recognition algorithms.
[0022] 1.3 Time-sharing strategy for daytime and nighttime sampling rhythms
[0023] To balance behavioral observability and terminal energy consumption control, this invention designs a daytime and nighttime time-sharing sampling strategy: Daytime phase: The intermittent sampling mechanism operates continuously, with a fixed sampling cycle and time interval; After each cycle of data collection is completed, the edge detection process begins. If no abnormal rotation or attitude instability is detected, only partial summary data is retained in the terminal's rotation cache; If a suspicious behavior pattern is identified, the data upload mechanism will be triggered immediately.
[0024] Nighttime phase: An "interval execution strategy" is adopted to reduce power consumption and minimize interference.
[0025] After each data collection cycle is completed, the terminal enters a sleep state for a period of time (e.g., 30 minutes). Reawaken sampling at the start of the next acquisition cycle; The remaining processing logic remains the same as during the day.
[0026] This sampling strategy can be expressed as a scheduling function:
[0027] in: ΔT 采集 : Duration of a single data collection cycle (e.g., 20 minutes); ΔT 休眠 : Interval duration (e.g., 30 minutes, valid at night); θ(t): Three-axis attitude angle data corresponding to the sampling time point.
[0028] 1.4 Data Record Structure In this invention, the collected attitude angle data is indexed by timestamps, and the three-axis angle values at each moment are recorded accordingly, including: Yaw angle (in degrees); Pitch angle value (in degrees); Roll angle (in degrees).
[0029] Specifically, each sampling record includes the following fields: The sampling timestamp t1 corresponds to the collected attitude angle values: Yaw=y1, Pitch=p1, Roll=r1; The sampling timestamp t2 corresponds to the attitude angle values: Yaw=y2, Pitch=p2, Roll=r2; This process continues to form a complete time series data set.
[0030] The above data can be represented as a three-dimensional time series structure:
[0031] Where t k Let Θ represent the k-th sampling time point, and let Θ represent the continuous temporal sequence of the three-axis attitude angles. This structure provides the basic input data for subsequent feature extraction, behavior recognition, and judgment logic.
[0032] 1.5 To avoid misunderstanding or technical confusion during review, the characteristics and recognition range of the "low-frequency sampling mechanism" adopted in this invention are described as follows: The posture angle acquisition mechanism described in this invention employs a low-frequency intermittent sampling strategy, with a typical sampling interval between 5 and 60 seconds. Due to the low sampling frequency, the system can only retain the changing trends of pig posture over a longer time scale, forming a discrete sequence of behavioral trajectory points.
[0033] Under these sampling conditions, the system cannot identify or capture instantaneous behavioral events with a duration shorter than the sampling interval. For example, a spinning in place, a sudden startle, a rollover, or a standing up that occurs and ends within 5 seconds will not leave complete features in the sampled data, and the system will naturally ignore or filter out such high-frequency disturbances.
[0034] The identification logic claimed in this invention is based solely on the following trend characteristics: Attitude angles (especially yaw) show a trend of continuous deflection and unidirectional accumulation across multiple consecutive sampling points; The attitude angle exhibits significant fluctuations and repeated changes in direction across multiple consecutive sampling points.
[0035] The mechanism identifies non-transient, trend-based abnormal rotational behavior, without involving the classification of specific action events or high-frequency rate analysis, ensuring that the entire system has good identification targeting and energy-saving deployment capabilities.
[0036] Step 2: Setting the Sampling Mechanism Scheduling Strategy
[0037] To balance recognition performance, terminal power consumption, and adaptability deployment requirements, this invention introduces multiple configurable low-frequency sampling scheduling mechanisms for setting the acquisition cycle and time interval. These mechanisms can be enabled independently as needed or combined, supporting local or remote parameter adjustments to form a flexible attitude angle sampling strategy system.
[0038] The sampling mechanism includes, but is not limited to, the following nine low-frequency strategies:
[0039] 1. Fixed-interval sampling mechanism Within a set time interval (e.g., every 10 seconds, every 1 minute), an attitude angle sampling operation is triggered once, forming a sampling sequence with equal time intervals. The sampling time can be represented as:
[0040] Where ΔT is the fixed sampling period.
[0041] 2. Circadian rhythm zonal sampling strategy
[0042] Different sampling period parameters can be set according to the day and night cycle (e.g., daytime from sunrise to sunset, and nighttime from sunrise to sunset). For example, the sampling period can be 10 seconds during the day and extended to 60 seconds at night, or an intermittent sampling mode can be used.
[0043] 3. Dynamic sampling and adjustment mechanism based on attitude angle variation rate
[0044] When the terminal detects a decrease in the rate of variation of the attitude angle within a certain time period (i.e., the pig's behavior tends to be static), it can automatically extend the sampling period; if it detects an increase in the rate of variation, it can shorten the sampling period to obtain more dense data.
[0045] The rate of variation can be calculated using the following formula:
[0046] Where θ(t) represents the three-axis attitude angle vector, and n is the number of sampling points. If V(t) is lower than the threshold ε1, the system enters energy-saving mode; if it is higher than the threshold ε2, high-frequency sampling is restored.
[0047] 4. Adaptive sampling strategy based on static population proportion
[0048] If the terminal system receives a signal that more than a certain percentage of individuals in the same group are in a static state (e.g., 95% are lying face down), it automatically reduces the sampling frequency of the current individual. This strategy relies on the gateway or edge device to dynamically aggregate and determine the group's state.
[0049] 5. Short-term multiple sampling and averaging method (a low-frequency strategy to enhance sampling stability)
[0050] This invention introduces a sampling strategy to enhance stability at each low-frequency sampling time point (e.g., once every 10 seconds). Instead of collecting attitude angle data only once, multiple frames of data are rapidly and continuously collected within a few seconds around that time point (e.g., 3 to 5 times). Then, these data are simply averaged, and the average value is used as the "final recorded value" at that moment.
[0051] The strategy is designed to address the following issue: during low-frequency sampling, if a sampling point is affected by a pig's momentary tremor, posture change, or equipment vibration, a significant deviation may occur, thus affecting subsequent judgments of behavioral trends.
[0052] By sampling multiple frames within a single sampling point and averaging the results, occasional errors and transient interference signals can be effectively filtered out, improving the representativeness and stability of attitude angle data and ensuring the accuracy of behavior trend judgment.
[0053] Its mathematical expression is as follows: Let t be a certain sampling time point. k If n frames of attitude angle data are continuously collected at this moment and within a short period before and after, then the average attitude angle value is:
[0054] Where θ(t) is a three-axis attitude angle vector, including yaw, pitch and roll.
[0055] This strategy keeps the overall sampling frequency unchanged, only improving the anti-interference capability and data quality of single-point sampling. It does not involve continuous high-frequency analysis, nor does it change the overall technical path of "low-frequency sampling + attitude angle trend recognition" of this invention.
[0056] 6. Sampling period extension mechanism under trend-based incompleteness
[0057] 6.1 (For continuous sampling during the daytime) During continuous sampling, if the system detects a certain degree of directional fluctuation or unstable trend in the attitude angle (especially the yaw angle) within a complete sampling period, but the duration or fluctuation amplitude does not meet the criteria for judging abnormal rotation behavior, the system can actively splice multiple adjacent sampling periods (such as 2-3 consecutive periods) into a continuous data sequence with a longer time span through the sampling period extension mechanism, so as to further observe the behavioral evolution trend and assist in making a judgment.
[0058] This mechanism does not constitute active identification of non-rotational behaviors, nor does it involve judgment of actions such as rolling over, standing up, or startling. It only performs strategic sampling periodic integration based on the trend evolution characteristics of the three-axis attitude angles to enhance the identifiability of abnormal rotational behaviors in boundary states.
[0059] 6.2 (Applicable to intermittent sampling scenarios at night) During the intermittent sampling phase at night, if the system detects a trend signal of suspected abnormal rotation behavior in the attitude angle (especially the yaw angle) in a certain sampling period, but the trend is not sufficient to meet the abnormal rotation judgment criteria set by this invention, and the behavior evolution information cannot be obtained in time in subsequent scheduled sampling periods due to the sleep mechanism, the system can actively interrupt the sleep state and insert an unplanned sampling period to obtain supplementary observation data of trend behavior.
[0060] The unplanned sampling period can be triggered after a preset delay time (e.g., 30 minutes). Its purpose is to enhance the ability to continuously judge suspected abnormal rotation behavior without interrupting the original sampling plan structure.
[0061] This mechanism is triggered solely based on the trend changes of the three-axis attitude angle time series, without involving the identification of short-term behaviors such as turning over or standing up. It does not rely on high-frequency sampling or analyze rate information, thus maintaining the method boundary and containment of this invention, which "identifies abnormal rotation behavior solely based on low-frequency attitude angles".
[0062] 7. Energy-saving sampling strategy based on device status When the terminal detects that operating parameters such as power, voltage, or temperature are close to the threshold (such as low voltage or overheating), it will automatically switch to ultra-low power sampling mode, lengthen the sampling interval, and retain only the data required for key behavior detection.
[0063] 8. Nighttime low activity threshold sampling mechanism During nighttime hours, if the rate of change of attitude angle is less than a preset threshold (e.g., 1° / min) for a continuous period of time, the system can activate "static compensation sampling" and sample once every 30–60 minutes to capture extremely rare abnormal events.
[0064] 9. Frequency adjustment mechanism driven by group stability The stability of the population is dynamically assessed by aggregating and statistically analyzing the attitude angle fluctuations of other individuals within the group. If the average fluctuation of the population decreases, the overall sampling frequency is lowered; conversely, it is increased.
[0065] By configuring and combining the above nine strategies, this invention constructs an intelligent acquisition mechanism that relies solely on three-axis attitude angles and has dynamic sampling and scheduling capabilities. This provides a data foundation for subsequent identification of abnormal rotational behavior in pigs, while effectively controlling energy consumption and improving the sustainability of terminal deployment.
[0066] Step 3: Edge preprocessing of attitude angle data
[0067] To ensure the high stability and identifiability of the acquired three-axis attitude angle data, this invention introduces a lightweight preprocessing mechanism in the terminal device or edge computing module. This preprocessing process does not rely on large cloud computing resources and is entirely based on local device computing, offering advantages such as low power consumption and strong real-time performance.
[0068] The goal of preprocessing is: Abnormal data points caused by wearing interference, momentary animal vibration, or communication delays are removed; Synchronize and correct timestamps and numerical precision; This makes the attitude angle time series more discriminative, providing high-quality input for subsequent behavior recognition.
[0069] 3.1 The preprocessing procedure includes the following steps:
[0070] 1. Sliding filter processing A small-window moving average is applied to the original attitude angle data sequence to smooth out local high-frequency fluctuations. The specific operation is as follows:
[0071] Where w is the length of the sliding window (e.g., 3 or 5 points), and θ(t) represents the attitude angle vector at the acquisition time.
[0072] 2. Outlier removal The attitude angle value at each time point is compared with its mean value before and after it. If the deviation exceeds a set threshold, it is identified as an outlier and is either removed or replaced with an interpolated value. The determination logic is as follows:
[0073] 3. Time synchronization and frame interpolation processing Since some devices may have slight sampling clock drift or data packet interruptions, this step aligns the sampling timestamps to ensure that all data intervals are consistent. If a time jump is found to be too large or there are missing frames in the sampling, linear interpolation can be used to fill in the missing frames.
[0074] Interpolation illustration:
[0075] 4. Dimensional normalization (if applicable) If there are slight differences in the attitude angle unit output by the device (e.g., some modules output in °, some in rad), then they will be uniformly normalized to a standard unit (e.g., angle in °) and limited to a fixed range (e.g., -180° to +180°) for subsequent judgment.
[0076] 3.2 Description of the preprocessed data structure After the above processing, the attitude angle data is converted into a smooth, equally spaced, and stable time series format:
[0077] This dataset will be used directly as the input basis for the abnormal rotation behavior recognition module to ensure the accuracy and consistency of the recognition results.
[0078] This preprocessing mechanism is entirely limited to the three-axis attitude angle data itself and does not involve any other sensory information such as acceleration, image, or sound, which conforms to the core design principle of this invention: "blocked, attitude angle as the sole signal source".
[0079] The preprocessing procedure described in this step is a post-processing mechanism for the acquired attitude angle data. It does not involve sensor calibration operations before sampling, nor does it change the original attitude angle sampling logic. It is only used to improve the quality of input data and ensure the stability of behavior recognition.
[0080] Step 4: Abnormal Rotation Behavior Identification
[0081] After completing the edge preprocessing of the attitude angle data, the system enters the abnormal rotation behavior recognition stage. This stage is the core step of the invention, and its objective is: Based on the triaxial attitude angle time series obtained by low-frequency intermittent sampling, we can identify whether pigs have continuous, directional, and irregular rotational movement behaviors, and pay particular attention to the dynamic trend of yaw angle as the main criterion.
[0082] This identification process does not rely on action labels, does not classify specific behaviors, does not focus on sudden changes in posture angles, and does not use rate calculations. It only judges abnormal rotation states by the trend of angle fluctuations within a time series.
[0083] 4.1 Explanation of Recognition Principles and Feature Patterns Abnormal spinning behavior in pigs typically manifests as: The yaw angle is a unidirectional and continuous deflection, meaning that the angle continuously increases or decreases over a period of time; Alternatively, the yaw angle may oscillate back and forth in consecutive sampling points, meaning the angle swings back and forth between two directions with a large amplitude. This behavior rarely occurs in a healthy state and is usually associated with neurological diseases, ear balance disorders, or poisoning.
[0084] At the same time, fluctuations and instability in pitch and roll angles may occur, but these serve as secondary references.
[0085] 4.2 Behavioral Judgment Mechanism Let the preprocessed attitude angle time series be:
[0086] The system performs the following behavioral pattern analysis on the sequence:
[0087] 1. Continuous deflection determination: If a time interval [t] exists a ,t b ], so that:
[0088] Then the abnormal rotation behavior trend is determined to be valid.
[0089] Where, △θ 旋转阈值 T represents the cumulative yaw angle threshold (e.g., 90°). 最小持续时间 Indicates the minimum duration required for the determination (e.g., 10 minutes).
[0090] 2. Judgment of reciprocating oscillation: If, during the sampling period, the yaw angle is detected to repeatedly change direction at both ends and form a significant angular oscillation, and the amplitude satisfies:
[0091] If multiple turning points are observed, it is considered that there is a suspected circling behavior.
[0092] 3. Multi-period trend merging judgment (daytime) If the trend within a single sampling period does not meet the complete judgment criteria, the system can concatenate multiple consecutive periods and perform a merged judgment to enhance the robustness of the identification. This strategy is only executed during the continuous sampling phase during the daytime.
[0093] 4. Trend Extension Trigger Mechanism (Nighttime) If an incomplete rotation trend appears in a sampling period at night, the system will interrupt its hibernation and insert a supplementary sampling period according to the aforementioned mechanism, so as to complete the trend confirmation in the next unplanned sampling window.
[0094] 4.3 Identification Output Once the judgment is valid, the system will mark the behavior and pass the data for the corresponding time period, the judgment basis, and the angle fluctuation pattern to the next step of processing (such as uploading, issuing warnings, and logging). Data that does not meet the recognition conditions will be cached locally and will not be reported to the cloud, saving bandwidth and storage resources.
[0095] This step is the core of the invention, forming a complete closed loop from attitude angle data → trend judgment → behavior recognition → output results, ensuring that abnormal rotation behavior can be effectively captured and reliably identified even under low-frequency conditions.
[0096] Step 5: Result Judgment and Data Upload Mechanism
[0097] After completing the abnormal rotation behavior recognition process, the system will enter the behavior result processing and data flow stage. This step includes local judgment execution, recognition result processing, data upload mechanism, and optional cloud analysis path to ensure that the recognized behavior information is traceable, verifiable, and scalable.
[0098] 5.1 Local Result Judgment and Label Output
[0099] Under the default configuration, the terminal device or its supporting edge computing module will make a final determination on whether there is abnormal rotation behavior based on the aforementioned identification logic, based on the current and historical attitude angle sequences.
[0100] The identification result is a binary label (e.g., abnormal / normal) and includes the following metadata: Determine the time interval; Attitude angle variation characteristics (such as maximum yaw deflection value and fluctuation amplitude); The number of sampling periods involved in the judgment; Determine the confidence level (e.g., the degree of rule matching); The selected identification strategy path number (e.g., if splicing judgment or delayed sampling is used).
[0101] This determination will serve as the basis for subsequent data uploads and platform data storage.
[0102] 5.2 Data Upload Mechanism
[0103] Depending on the judgment result, the system adopts the following data processing strategy: If the identification result is normal behavior, only the summary information of that period (such as maximum / minimum attitude angle, fluctuation statistics) is retained and temporarily stored through a local round-robin caching mechanism, without uploading the complete original data, in order to save communication resources.
[0104] If the identification result indicates abnormal rotation behavior, the system immediately triggers the data upload mechanism to upload the raw attitude angle data for the complete time period, identification labels, judgment criteria, and other information to the cloud platform or local server for further behavior analysis, early warning triggering, historical record archiving, and other uses.
[0105] Data uploads can be completed via Wi-Fi, LoRa, 4G, Bluetooth gateway relay, etc., and there are no restrictions on the specific communication method.
[0106] 5.3 Cloud-based analysis and judgment path (optional mode)
[0107] While this invention defaults to performing identification and judgment at the edge terminal, it does not exclude the possibility of using a deployment mode with centralized analysis in the cloud. In this mode: The terminal is only responsible for data collection and preprocessing; All recognition logic is executed by the cloud platform; The cloud can integrate more complex identification models, historical comparison mechanisms, group behavior comparisons and other advanced analysis functions.
[0108] The method described in this invention can be deployed and executed at both the edge and the cloud. It does not rely on determining the location or calculating the path. The identification logic itself is still strictly limited to the three-axis attitude angle data, and the blocking path is not affected by the execution location.
[0109] 5.4 Behavior Log Recording and Early Warning Interface
[0110] After the recognition results are uploaded, the system can generate a complete behavior log structure on the platform side, including timestamps, behavior types, sampling data indexes, and result tags, for subsequent use. Intelligent early warning notifications (SMS, APP, broadcast); Abnormal trend analysis; Input to the disease early warning system; Basis for supporting management decisions.
[0111] Meanwhile, the mechanism supports pushing the anomaly identification results to the ranch management system, enabling integration and binding with information systems such as ear tag IDs and pig files.
[0112] This step constitutes the final link in the data closed loop of this invention, ensuring the integrity and reliability of the "sampling → identification → output → evidence storage" logical chain, and providing high adaptability and business availability support for actual deployment.
[0113] (II) Summary of the Overall Process
[0114] In summary, the identification method of this invention uses three-axis attitude angles (Yaw, Pitch, Roll) as the sole data source and proceeds sequentially according to the following steps: First, by periodically collecting posture angle data through a smart terminal device worn on the pig's ear or head, a basic low-frequency continuous behavior observation sequence is constructed (Step 1). Subsequently, the system performs preprocessing operations such as filtering, denoising, normalization, and micro-amplitude correction on the acquired attitude angle sequence to improve data quality and correct drift (step 2). In the obtained time series, the system determines whether there is abnormal rotation behavior by identifying the directional shift, amplitude fluctuation and continuous trend characteristics of the Yaw angle (step 3). Meanwhile, the pitch and roll angles are completely stable and without fluctuations across multiple sampling points to identify possible death states (step 4). Finally, based on the recognition results, the system performs edge inference or uploads the data to the cloud for analysis, and triggers corresponding early warning notifications or management linkage mechanisms to complete the recognition closed loop (step 5).
[0115] The method of this invention enables high-frequency monitoring and early identification of abnormal rotation behavior in pigs while ensuring low-power deployment. It has multiple advantages such as clear logical path, closed data source, low deployment cost, and high identification accuracy, and is suitable for real-time early warning and precise prevention and control of abnormal behavior in large-scale breeding scenarios.
[0116] It is worth noting that the closed-loop method for "identifying abnormal pig rotation behavior solely based on three-axis attitude angles" described in this invention can be adapted and deployed in the supporting system "An Intelligent Monitoring System for Identifying Abnormal Pig Rotation Behavior Based on Three-Axis Attitude Angles". This system includes an attitude angle acquisition terminal, an edge processing module, and data communication and platform identification modules, which can fully support all acquisition, identification, and behavior chain output processes of this method. Through systematic integration and deployment, the identification logic of this method can achieve the goals of low power consumption, high frequency, edge perception, and real-time early warning, making it suitable for monitoring abnormal pig behavior and health management in actual breeding environments.
[0117] (II) Technical Boundary Description and Identification Mechanism Blockade Statement
[0118] To ensure that this invention has clear technical boundaries and exclusive protection in practical industrial applications, and to further explain its limiting and blocking strategies regarding data source identification, sampling mechanism, sensing path, and behavior determination logic, the following statements are made:
[0119] 1. Uniqueness of data source and sensing path This invention uses only three-axis attitude angle data (i.e., yaw, pitch, and roll) as the sole input signal source for abnormal rotation behavior recognition, excluding all multimodal sensing paths, including but not limited to other signal sources such as acceleration, angular velocity, temperature, image, sound, pressure, humidity, and magnetic field. Any other data introduced during the behavior recognition process is not part of this invention's method and is not within the scope of patent protection.
[0120] The three-axis attitude angle data described in this invention can originate from a three-axis gyroscope module integrated into a terminal device, or it can be calculated by other sensing units with equivalent attitude angle output capabilities. Regardless of whether the hardware is a three-axis, six-axis, or nine-axis structure, as long as the behavior determination is based solely on the three-axis attitude angle, it falls within the protection scope of this invention.
[0121] 2. Explanation of the blocking of fusion solution and false evasion path For systems that use combined sensors (such as a six-axis IMU or a nine-axis fusion module) or calculate attitude angles through fusion algorithms (such as Kalman filtering or complementary filtering), this invention does not restrict the way attitude angles are obtained, but blocks the abnormal rotation recognition path based on attitude angles.
[0122] 3. In other words, as long as the attitude angle data is used to identify abnormal rotational behavior, regardless of whether its original source is fused from accelerometers, magnetometers or other signals, the behavior identification process still constitutes a substantial use of the present invention, and "different sensor types" or "different algorithm derivation methods" shall not be used as a means of circumvention.
[0123] 3. Identify non-restrictive claims regarding deployment locations. Patent protection for the method of this invention is not limited by the deployment location of the recognition model. The recognition algorithm can run on terminal devices (such as ear tags), edge gateways, local servers, or cloud platforms.
[0124] As long as the system adopts the method path of "identifying abnormal rotation behavior based on the trend of three-axis attitude angle change" defined in this invention, regardless of whether the data recognition is performed by the edge, it constitutes the use of the method of this invention, and "cloud recognition" cannot be used as a reason to circumvent the patent path.
[0125] 4. Explanation of the necessity of sampling mechanisms and trend construction capabilities This invention explicitly proposes that the effective identification of abnormal rotational behavior relies on time-series trend analysis constructed through low-frequency continuous sampling. Its identification logic requires observing directional shifts, reciprocating fluctuations, or rotational trajectory characteristics of the attitude angle across multiple sampling periods.
[0126] For some systems that use a "high-frequency intermittent sampling mechanism" (e.g., collecting 2 seconds of high-frequency data every 5 minutes), this invention specifically points out that this mechanism does not have the technical ability to identify abnormal rotations because the data it collects lacks temporal continuity and cannot build a rotation trend model.
[0127] Even with high-frequency continuous sampling (such as 10Hz continuous sampling throughout the day), significant power consumption, storage, and transmission bottlenecks exist in commercial deployments, rendering them impractical. Therefore, the "low-frequency periodic sampling + attitude angle fluctuation trend judgment" approach proposed in this invention is currently the only technical method that can simultaneously achieve both accurate identification and cost-effective deployment.
[0128] 5. Summary and Protection Logic of Blocked Paths In summary, this invention employs a blockade-based identification strategy to clearly define the following technical protection boundaries: (1) Attitude angle is the only identification input signal, excluding any other auxiliary data sources; (2) It does not rely on multimodal fusion paths such as acceleration, angular velocity, image, and sound; (3) No hardware form is limited, only the recognition path is limited. That is, as long as the rotation behavior is recognized by three-axis attitude angle, it is protected. (4) The sampling mechanism is based on low-frequency continuity and rejects intermittent short-window sampling as a feasible path; (5) Identify deployment locations, not limited to terminals or the cloud, and focus on blocking method paths rather than execution locations; (6) If a third-party system uses three-axis attitude angle to identify abnormal rotation behavior, regardless of its data source, identification method or calculation location, it shall be deemed to have used the method of this invention and shall be covered by the scope of protection of this patent in accordance with the law.
[0129] (iv) Definition of Terms and Explanation of Semantic Boundaries
[0130] To facilitate accurate understanding and implementation of the technical solution of this invention, the following definitions are provided for several terms used in this specification:
[0131] 1. Abnormal rotation behavior This refers to unnatural, irregular, continuous rotating movements exhibited by pigs within a given time period, typically involving circling, turning, or spinning in place around the head or body as an axis. This behavior often occurs in cases of nervous system disorders or central nervous system infections (such as early stages of African swine fever) and is significantly different from normal exploratory, foraging, or rooting behaviors. Abnormal rotating behavior is usually characterized by persistence, directionality, and fluctuations in posture angles, and can be identified through time-series posture angle trends.
[0132] 2. Attitude Angles In this invention, "posture angle" refers to the orientation of a pig's head or body in three-dimensional space, including: Yaw: The angle of rotation about the vertical axis, reflecting the left and right rotation behavior in the horizontal direction; Pitch: The angle of rotation around the lateral axis, reflecting the forward or backward tilt of the head or body; Roll angle: The change in angle of rotation around the front and rear axes, reflecting the left and right tilt of the body or head.
[0133] The three angles mentioned above can be provided by a three-axis gyroscope or other devices with equivalent computational capabilities, constituting the three-dimensional basic feature data for animal posture recognition.
[0134] 3. Clarification of the source of attitude angle signal Although attitude angles can be calculated by different types of sensors (such as three-axis gyroscopes, six-axis IMUs, nine-axis sensors, etc.), this invention only focuses on the three-axis angle values of Yaw, Pitch, and Roll in the final solution, and does not adopt other signals such as acceleration, angular velocity, magnetic field strength, etc., to participate in behavior determination.
[0135] 4. Explanation of the distinction between attitude angle and acceleration Attitude angles are spatial orientation angles, belonging to the displacement direction characteristics formed after integration. They have strong trends and stability, making them suitable for analyzing animal behavioral trajectories and directional changes. Acceleration, on the other hand, is an instantaneous signal, often used to identify short behaviors such as jumping and standing. It lacks directional continuity and is unsuitable for identifying abnormal rotational behaviors. Based on this logic, this invention patent completely excludes acceleration signals from participating in identification.
[0136] 5. Attitude angle fluctuation This refers to the dynamic changes in three-axis attitude angle data (Yaw, Pitch, Roll) within a continuous sampling period, mainly reflecting the attitude changes of an individual around the three axes in space. Abnormal rotational behavior is usually manifested as large-amplitude oscillations in the Yaw angle, and decreased stability or directional shifts in the Pitch and Roll angles under unnatural conditions.
[0137] 6. Behavioral Chain A behavioral chain refers to a sequence of behavioral features formed by concatenating multiple posture angle sampling points over a certain time span, used to characterize an individual's continuous movement trends and state changes. Through a trend scoring mechanism, behavioral chains accumulate trends, analyze precursor evolution, and make closed-loop judgments on abnormal behaviors, serving as an important criterion for behavior recognition.
[0138] 7. Blocked route This invention employs a unique identification strategy that strictly limits the data source (three-axis attitude angles) and specific discrimination logic, prohibiting the introduction of other sensor information (such as acceleration, temperature, sound, etc.) and is not restricted by the specific sensor form. Any third-party system whose identification path conforms to this invention is considered to fall within the scope of protection of this invention, constituting a technical blockade.
[0139] 8. Low-frequency continuous sampling mechanism This refers to a system that continuously and stably collects attitude angle data at a low temporal resolution (e.g., 1–2 times per second or once every 10 seconds) to obtain complete time-series behavioral trends. This mechanism strikes a balance between energy consumption, deployment, and anomaly detection capabilities, and is a prerequisite for constructing behavioral chains and determining trends.
[0140] 9. Trend Deviation Value This refers to the degree of deviation between the postural angle behavior score of a target individual and the group mean over a certain period of time. It is usually achieved using mechanisms such as Z-score and anomaly score to detect potential risky individual behavioral abnormalities at an early stage.
[0141] 10. Edge Recognition Mode The identification model is deployed within the terminal device, enabling abnormal behavior detection at the data collection site without real-time uploading to the cloud for evaluation. Edge recognition significantly reduces transmission load and improves response speed, making it suitable for real-time early warning in high-density aquaculture environments.
[0142] 11. Block the six-axis / pseudo-fusion path For systems that integrate six-axis or nine-axis inertial sensors but whose behavior recognition relies solely on attitude angle data, this invention considers their recognition path to "substantially employ the attitude angle method," and therefore also excludes them from the scope of this patent protection to prevent patent circumvention under the guise of sensor upgrades.
[0143] III. Beneficial Effects This invention proposes a blocking identification method, specifically designed to technically block and accurately identify abnormal rotational behavior in pigs. It relies solely on three-axis attitude angle data (Yaw, Pitch, Roll) as the identification input signal, and possesses the following significant advantages and beneficial effects:
[0144] 1. Identifies closed paths and possesses patented anti-bend properties. This method does not rely on other data sources such as acceleration, angular velocity, images, sound, and temperature; it uses only the attitude angle as the sole identification criterion. It can cover any sensor architecture (such as a six-axis or nine-axis IMU) that uses only attitude angles to identify rotational behavior; Whether it's edge recognition or cloud analysis, as long as rotational behavior is identified by attitude angle, it constitutes the use of this method, achieving a blocking protection at the technical path level.
[0145] This effectively blocks patent circumvention space by countering common strategies in current animal behavior recognition, such as "sensor fusion bypass" and "multimodal input avoidance".
[0146] 2. The project is highly practical and suitable for large-scale aquaculture scenarios. This method can form the attitude angle fluctuation trend based on a low-frequency continuous sampling mechanism (such as sampling once every 15 seconds), without the need for continuous high-frequency sampling, thus significantly reducing power consumption. The identification can be performed on edge terminals or cloud platforms, supporting lightweight deployment and flexible computing strategies; The system is suitable for 24 / 7 continuous operation and can be embedded with low-cost wearable devices such as ear tags, back clips, and leg rings for ordinary pigs, making it feasible for widespread adoption.
[0147] Compared to behavior recognition solutions that rely on high-frequency images or complex models, this method has lower power consumption, lower cost, and simpler deployment.
[0148] 3. It can accurately identify "rotational behavior," an early and serious abnormality. Persistent abnormal spinning behavior in pigs (such as spinning in place or repetitive head shaking) is usually a sign of neuropathy, poisoning, or severe inflammation. This invention identifies hidden major health risks based on the periodic fluctuation of the yaw angle and the incoordination of the roll / pitch pattern. Intervening earlier than death recognition provides an important window of opportunity for disease intervention and community-based prevention and control.
[0149] Current mainstream methods mostly use "lying down and remaining still" as the criterion for death, which makes it difficult to identify early warning signs such as rotation. This method has a unique advantage in early identification.
[0150] 4. Highly adaptable, not dependent on a fixed wearing position This method can be adapted to any location, whether the terminal is installed at the base of the pig's ear, back, or leg, as long as it can stably output attitude angle data. It exhibits strong robustness and generalizability to factors such as breed, sex, age, and farming method (pen / free-range).
[0151] 5. Can be seamlessly integrated with existing pig farm monitoring systems As a single algorithm module, it can be integrated into existing smart ear tag platforms, edge gateways, veterinary early warning systems, etc. The results can be uploaded to the cloud platform for administrators to view, analyze, and respond to in real time. When linked with a population statistical model, a population-level early warning mechanism for frequent rotational behaviors can be achieved.
[0152] Compared with existing technologies, the innovation of this invention is reflected in five aspects: "single signal + path blocking + practical deployment + early identification + anti-spinning design". In particular, in identifying the early, rare but extremely dangerous behavior pattern of "rotation behavior", it fills the technological gap in low-cost, high-frequency aquaculture monitoring and has clear industrial value and patent protection significance. Attached Figure Description
[0153] Figure 1 : A schematic diagram of the overall process of the method of the present invention; Figure 2 : Schematic diagram of the attitude angle acquisition terminal; Figure 3 Attitude angle time series comparison chart (normal vs. abnormal); Figure 4 : Logic discrimination diagram for abnormal rotation behavior recognition; Figure 5 Diagram of edge recognition and state output hierarchical mechanism. Detailed Implementation
[0154] To make the objectives, technical solutions, and beneficial effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. This invention is not limited to the specific embodiments described below; any equivalent substitutions or improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
[0155] Example 1: Identification of Abnormal Behavior of Pigs Spinning in Place in Pens
[0156] In a large-scale fattening pig pen, a pig exhibited continuous circling behavior. The gyroscope module in the ear tag-type terminal worn by the pig continuously collected attitude angle data and uploaded it to a cloud-based recognition platform. The yaw angle recorded by the system showed a consistent increasing trend in the same direction over eight consecutive sampling periods (i.e., within 2 minutes), while the pitch and roll angles did not show significant changes.
[0157] The following identification formula is used to determine this:
[0158] If they occur consecutively:
[0159] This indicates a stable rotation trend.
[0160] The system ultimately flagged the individual as having "suspected spinning behavior" and pushed the data to the management system for intervention and observation. Subsequent clinical confirmation indicated that the individual had suffered damage to their nervous system.
[0161] Example 2: Recognition of Persistent Bias Rotation (Neural Imbalance)
[0162] A breeding sow developed disorientation before farrowing. Its yaw value continuously shifted in the same direction for 4 minutes, with a shift of more than 180°, which manifested as repetitive slow rotation.
[0163] The system extracts the following pattern features: Continuous offset along a single axis; The rate of change is low, but the direction is consistent; Roll and Pitch fluctuations are not synchronized.
[0164] Apply the following criteria:
[0165] Where, θ th A threshold for identifying rotation behavior (e.g., 90°-180°).
[0166] The pig was identified as having a "low-frequency slow-rotation abnormality" and the system reported it to the breeding management platform. After being isolated, the pig was diagnosed with balance disorder caused by central nervous system infection.
[0167] Example 3: Recognition of Abnormal Reciprocating Rotation Behavior
[0168] In a batch of fattening pigs, one pig was repeatedly identified by the system as exhibiting rapid, reciprocating changes in the yaw axis direction, suspected to be pre-epileptic behavior. The data presented the following characteristics: The Yaw angle fluctuation frequency is approximately one complete cycle every 30 seconds. The fluctuation range is stable within ±120°; It lacks directional accumulation and only repeats within a fixed range.
[0169] The recognition algorithm is defined by the following behavioral characteristics: . Where A osc >90°, and f osc A frequency exceeding 0.03 Hz is identified as "reciprocating abnormal rotational behavior".
[0170] Example 4: Identification of Individual Abnormalities in Population Screening
[0171] In a certain intensive pig farm, to achieve real-time health monitoring of dozens of pigs in the pens, the system uniformly deploys three-axis gyroscope attitude angle acquisition terminals to continuously acquire yaw, pitch, and roll data for all individuals at a fixed sampling period (e.g., every 15 seconds). The system sets up local edge nodes to perform preprocessing and periodically uploads the raw or compressed attitude angle data to a cloud platform for behavioral scoring and group deviation analysis.
[0172] During a screening cycle in July 2025, the system detected that a pig with the number #1127 in a certain pen exhibited periodic large fluctuations in its yaw angle (amplitude greater than 80°, with a cycle of 3–5 seconds) over 6 consecutive sampling cycles, while its roll angle showed alternating fluctuations from left to right, which was initially identified as suspected stationary rotation behavior.
[0173] The system further invoked the group behavior deviation scoring model to score the pig's posture and angular behavior trajectory over the past 30 minutes and compared it with the scores of other individuals in the same pen. The results showed that #1127's abnormal rotation score was 85.3, while the average score for the group in the same pen was only 21.7, with a standard deviation of 12.1. Based on the set deviation threshold (e.g., mean + 3σ), #1127's score was far above the critical value (21.7 + 3 × 12.1 = 58.0), and the system immediately identified it as an "abnormal individual within the group" and marked it as "requiring review" on the management platform.
[0174] In addition, the system linked the APP terminal to send an early warning to the on-duty feeder: "Pigs in pen 3-#1127 have shown obvious behavioral deviations, suspected of spinning. Please check on-site." After on-site inspection, the feeder found that the pig had a nervous system abnormality, manifested as continuous head spinning and incoordination. It was later diagnosed as behavioral abnormality caused by central nervous system damage.
[0175] This embodiment demonstrates that the present invention can achieve highly efficient and non-invasive health risk screening through low-frequency sampling, anomaly score modeling, and group comparison mechanisms without requiring individual individuals to actively alarm, thereby significantly reducing the pressure of manual inspection and improving the level of intelligent aquaculture.
[0176] Example 5: Trend analysis of repetitive rotation behavior in the pre-disease stage (taking African swine fever as an example)
[0177] The three-axis attitude angle acquisition terminal described in this invention was fitted to a growing pig, numbered #3041, to continuously collect data on the yaw, pitch, and roll angles. The system was set to sample once every 15 seconds and the data was uploaded to a cloud platform for continuous trend analysis and anomaly scoring.
[0178] On the day before the onset of the disease, the system observed that the pig exhibited slight stationary movement behavior, characterized by periodic small fluctuations in the yaw angle (approximately between 20° and 40°), but without significant roll angle or pitch angle changes. Due to the low fluctuation amplitude, the system did not immediately classify it as abnormal rotational behavior, but only recorded its "rotation trend score" as 42 (low risk) in the behavior scoring module.
[0179] On the second day, the pig's yaw angle fluctuations further intensified and increased in frequency. The system recorded its intraday rotation trend score rising to 63, significantly higher than the group average, but not yet reaching the abnormality threshold. Roll angle data showed a slight left-right swaying trend, while the pitch angle remained stable, consistent with the characteristics of "repetitive orientation behavior in a non-excited state".
[0180] It is worth noting that in the early stages of African swine fever (ASF) infection, some individuals exhibit typical motor neuron disorders, with directional spinning, circling in place, and loss of orientation being typical signs. The systematic trend scoring model can effectively identify such abnormal behavioral chains that gradually intensify from weak to strong.
[0181] By the third day, the pig exhibited periodic and sharp fluctuations in its yaw angle (amplitude exceeding 80°, period of 3-6 seconds) across multiple consecutive sampling cycles, with a synchronous increase in its roll angle and a rotation score that jumped to 91. The system automatically identified this as abnormal rotational behavior. Combined with the trend scores from the previous two days, this constituted a "continuous behavior chain identification," and the system officially triggered an alert and pushed it to the farm's health management platform.
[0182] The on-duty veterinarian immediately isolated and examined the pig, finding early signs of African swine fever (ASF), including decreased appetite, unsteady gait, and refusal to come into contact with the animal. PCR testing confirmed the pig was infected with ASF.
[0183] This embodiment highlights the technical advantages of the present invention in the early identification of high-risk diseases (such as African swine fever): Disease trend modeling and early screening can be achieved using only three-axis attitude angles; We identify weak, non-sudden disease precursor behaviors through a trend scoring + behavioral chain closed-loop mechanism; It does not rely on high-cost perception methods such as images and sounds, and has the advantages of deployment flexibility and practicality; To gain a 24-72 hour window for epidemic prevention and control, so as to achieve "early identification, early isolation and early treatment".
[0184] This approach is particularly suitable for dealing with major animal diseases such as African swine fever, which are characterized by "high mortality, long incubation period, and no specific drugs," demonstrating the high adaptability of this invention to livestock safety and herd control.
[0185] Example 6: Continuous Identification of Abnormal Rotation Behavior under Day-Night Co-sampling
[0186] In a closed pigsty, a pig farming enterprise equipped all its fattening pigs with the three-axis attitude angle acquisition terminal described in this invention. The system uses two collaborative sampling modes based on circadian rhythms to balance recognition accuracy and power consumption control.
[0187] Daytime mode (active hours) The system is set to sample every 10 seconds, running continuously, with daily sampling time covering 06:00–18:00. Data is uploaded every 5 minutes for a window segment, supporting real-time edge detection. Since daytime is the main activity period for pigs, the system focuses on monitoring the frequent fluctuations, directional repetitions, and oscillation frequency of the yaw angle.
[0188] A pig repeatedly exhibited yaw angle fluctuations ranging from 45° to 90° during the day, lasting for more than 5 minutes. The system identified this as directional, repetitive rotational behavior. Simultaneously, the roll angle showed a slight leftward skew, while the pitch angle remained consistently low, suggesting that this behavior was spontaneous rotation rather than caused by environmental disturbances.
[0189] Night mode (rest period) The system switches to a low-frequency sampling mode at night (18:00–06:00 the next day), collecting attitude angles every 30 seconds to identify abnormally active behaviors that should be in a resting state at night. If the system detects a significant change in the yaw angle (>60°) in three consecutive night samplings, a temporary high-frequency sampling window (10Hz, lasting 60 seconds) is triggered to quickly confirm the rotation trend.
[0190] The above-mentioned pigs were detected by the system at 23:40 at night through a high-frequency sampling window. The system identified that the yaw angle was continuously deviating and frequently swinging back. The initial score was 78 points, and the system added them to the "suspected rotation" observation list.
[0191] Trend superposition and behavioral chain closed loop After continuous observation of sampling in the early morning and during the day on the second day, the yaw angle deviation rate of this pig in the past 12 hours was significantly higher than the group average, and the roll angle and pitch angle showed a slight synchronization abnormality. The system performed trend score aggregation on the comprehensive day and night sampling data, and the result was as high as 91 points, which was finally identified as "abnormal rotation behavior".
[0192] The system immediately sent an early warning to the breeding management platform and added the individual to the "high-risk behavior list," recommending an on-site re-inspection. Upon inspection, the pig was found to be exhibiting symptoms such as circling, head and neck twisting, and restlessness, ultimately confirming a neurological abnormality, suspected to be an early reaction to an infectious disease.
[0193] This embodiment demonstrates how, under an all-weather sampling mechanism, the present invention utilizes the different rhythmic characteristics of day and night, combined with changes in attitude angle trends, to achieve the entire process of continuous rotation behavior recognition: During the day, the focus is on identifying directional fluctuations in frequent activities; Nighttime focus is on identifying abnormal movements that should not be present at rest; By combining sampling mechanisms, trend scoring aggregation, and closed-loop behavioral chain judgment, stable and accurate identification of abnormal behavior can be achieved. It supports early intervention, risk reduction, and optimized resource allocation.
[0194] Example 7: Real-time identification mode of abnormal pig rotation behavior based on edge computing
[0195] In a large-scale pig farm, to improve recognition response speed and reduce network dependence, the system described in this invention is deployed in an edge computing mode. That is, the behavior recognition model is directly integrated into the smart terminal devices worn by the pigs, or deployed in edge gateway devices inside the pigpens, processing attitude angle data locally via a local area network to achieve a closed-loop response mechanism of "local acquisition—local recognition—local early warning".
[0196] 1. System Architecture Data acquisition terminal: Pigs wear ear tag-type attitude angle acquisition devices with built-in three-axis gyroscopes to acquire three-axis attitude angle data of Yaw, Pitch, and Roll at a set frequency; Edge recognition unit: An edge server (or high-performance gateway) located within the enclosure, preloaded with an attitude angle trend analysis model and a rotation behavior scoring module; Data link: The collected data is sent to the edge identification unit in real time via Bluetooth Low Energy or ZigBee communication, without relying on a wide area network or cloud platform; Behavior judgment logic: The edge recognition unit completes attitude angle preprocessing, sliding window scoring, and rotation behavior judgment locally, and outputs warning signals according to the set rules.
[0197] 2. Operation Flow Diagram Sampling phase: Three-axis attitude angle data are collected every 10 seconds and periodically uploaded to the edge recognition module; Sliding analysis: The edge recognition module executes a real-time trend analysis algorithm to analyze features such as yaw angle amplitude, fluctuation frequency, and direction consistency within a continuous time window; Abnormal Scoring: If the scoring module detects continuous abnormal fluctuations exceeding the set threshold (e.g., the cumulative score exceeds 80 points within a 60-second window), it will immediately be judged as suspected abnormal rotation behavior; Rapid response: The system triggers an audible and visual alarm locally or pushes a notification to the pen control screen, prompting the breeder to pay attention to the designated individual with the specified number; Data backup and upload: Behavioral data is uploaded to the cloud platform for retention and analysis only after an abnormal state is established, realizing an energy-saving strategy of "no upload under normal circumstances, only push during abnormalities".
[0198] 3. Application Advantages High real-time performance: All analysis and judgment are completed locally, and the time from recognition to prompt is no more than 2 seconds; Low network dependence: The core identification process is independent of the cloud platform, and the identification capability can be maintained even if the network is unstable; Strong power consumption control: The sampling frequency is moderate, avoiding high-frequency uploading and extending the terminal battery life; Low false alarm rate: The use of trend scoring and time series modeling avoids the risk of misidentification of single-point mutations; Highly scalable: The edge module can be configured with multiple recognition models, supporting the addition of other behavior recognition capabilities in the future (such as lying still, startling, licking the wall, etc.).
[0199] 4. Feedback on actual results Fifteen days after deployment in pilot pens, the system successfully identified three pigs exhibiting circling behavior, two of which were diagnosed as early signs of neurological disease (suspected precursors to African swine fever), triggering manual isolation 48 hours in advance. All identification actions were completed at the edge, with no cloud-based delays or missed detections, significantly improving management efficiency and disease control levels.
[0200] Example 8: Identification Behavior of Blocking Six-Axis and Temperature Fusion Path - Judgment
[0201] In a third-party intelligent pig monitoring system, the terminal device integrates a six-axis inertial sensor (including a three-axis gyroscope and a three-axis accelerometer) and a temperature sensing module. The platform claims to use multimodal data fusion to improve the ability to identify abnormal behavior. However, reverse testing and analysis revealed that:
[0202] 1. Actual identification path analysis: Despite its multi-sensor structure, the system algorithm's call path for recognizing "circling / rotating" behavior is as follows: Accelerometer data was not used to determine abnormal rotation. Temperature change information was not used in the rotation behavior recognition and judgment logic. The only basis for judging rotational behavior is the three-axis attitude angle data, especially relying on the periodic fluctuations and directional consistency of the yaw angle in the time series.
[0203] 2. Explanation of the source path of attitude angles: Technical review revealed that the system uses gyroscope and accelerometer data fusion to calculate attitude angle data (through complementary filtering), but the final identification and judgment still relies solely on the three-axis attitude angle data, without incorporating raw acceleration or temperature for joint decision-making. Furthermore, temperature was not used as a weighted input in the model.
[0204] Therefore, although it uses a "six-axis + temperature" sensing structure, its behavior recognition path is essentially a single-source attitude angle path, which is a "pseudo-fusion" path - the data forms are multiple, but the recognition is actually dependent on a single attitude angle.
[0205] 3. Logic for determining whether an item falls within the protection path of this invention: Claims and boundary statements based on this invention: "Regardless of whether the sensor is six-axis, nine-axis, or temperature fusion, as long as the final behavior recognition path uses only three-axis attitude angles as the judgment input signal, it falls within the protection scope of the method of this invention." Therefore, the loop recognition method and behavior judgment logic of the third-party system constitute a substantial use of the method of the present invention and fall within the protection scope of the claims of the present invention. It cannot be circumvented on the grounds of hardware structure redundancy or the non-participation of fused data in recognition.
[0206] 4. Effective lockdown strategies and their significance: Prevent the use of techniques such as "six-axis fusion without accelerometer activation" to circumvent attitude angle paths; To prevent "pseudo-multimodal" schemes that "claim temperature / image assistance" but actually only use attitude angles for judgment from bypassing protection; Block any "behavior recognition path that only calls attitude angles", regardless of whether the device has other sensors.
Claims
1. A method for identifying abnormal rotational behavior in pigs based solely on three-axis attitude angles, characterized in that, Includes the following steps: 1) Collect three-axis attitude angle data, including yaw, pitch and roll, through a terminal device worn on the pig's body. 2) Perform low-frequency sampling at fixed time intervals to acquire attitude angle time series data for behavioral trend observation; 3) Preprocess the acquired attitude angle sequence, including sliding filtering, outlier removal and time alignment, to improve data stability; 4) Based on the continuous change characteristics of the yaw angle, determine whether abnormal rotation behavior occurs. The change characteristics include, but are not limited to, continuous yaw angles exceeding the threshold, abnormal fluctuation frequency, or repeated oscillations in the direction of change. 5) The judgment result is used for behavior status output. The recognition process can be deployed on edge terminals, gateway nodes or cloud platforms without relying on other sensor inputs.
2. The method according to claim 1, characterized in that, The attitude angle data acquisition adopts a periodic low-frequency triggering method, and the sampling interval can be dynamically adjusted according to the attitude angle variation rate or the static ratio of the population.
3. The method according to claim 1, characterized in that, At each sampling point, multiple consecutive short-time samples are taken and the average value is calculated to enhance the stability and noise resistance of single-point data.
4. The method according to claim 1, characterized in that, During the recognition process, only attitude angle data is used as the input signal source, without introducing other sensor information such as acceleration, image, temperature or sound.
5. The method according to claim 1, characterized in that, After detecting a suspected abnormal disturbance, an unplanned delayed sampling period can be inserted to collect the evolution trend after the disturbance, thereby enhancing the continuity of behavior recognition.
