A livestock and poultry health state recognition method and system based on brain-inspired reasoning

By constructing a livestock and poultry health status identification system based on brain-inspired reasoning, action segmentation, and individual feature encoding, the system solves the problem of false alarms and missed alarms caused by individual behavioral differences, and achieves stable and individualized health status identification.

CN122067786BActive Publication Date: 2026-07-03QINGDAO UNIV OF TECH +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO UNIV OF TECH
Filing Date
2026-04-17
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies are ill-suited to individual behavioral differences in livestock and poultry health status identification, leading to false alarms or missed alarms. Furthermore, methods that rely on large amounts of historical data are ineffective when dealing with newly introduced individuals or when data is insufficient, and lack comprehensive analytical capabilities.

Method used

Using a brain-inspired reasoning approach, this method forms an individual-specific behavioral benchmark model through action segmentation, individual feature encoding, and scenario construction. It combines familiarity calculation and multi-evidence reasoning to judge health status, avoiding reliance on a single threshold or group average model.

Benefits of technology

It improves the accuracy and stability of health status identification, enables the establishment of individualized behavioral benchmarks for each livestock and poultry under limited observation data conditions, and enhances the sensitivity to behavioral deviations and the interpretability of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122067786B_ABST
    Figure CN122067786B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent breeding, and particularly relates to a livestock and poultry health state recognition method and system based on brain heuristic reasoning. The method comprises the following steps: acquiring behavior segment data; performing action segmentation according to the behavior segment data to obtain action segmentation data; performing individual feature coding and scenario construction according to the action segmentation data to obtain individual feature data and individual scenario data respectively; performing scenario memory writing on the individual feature data and the individual scenario data to obtain individual memory data; performing prototype aggregation processing according to the individual memory data to obtain individual benchmark data; performing familiarity calculation on the action segmentation data and the individual benchmark data to obtain behavior familiarity data; and performing brain heuristic reasoning processing according to the behavior familiarity data to obtain livestock and poultry state hypothesis data. The present application can recognize the condition deviating from the individual normal state under the condition of limited observation data by analyzing individual behavior and performing brain heuristic reasoning based on behavior familiarity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent aquaculture technology, and in particular to a method and system for identifying the health status of livestock and poultry based on brain-inspired reasoning. Background Technology

[0002] With the development of large-scale farming, the number of livestock and poultry is constantly increasing, and traditional health monitoring methods relying on manual observation are insufficient to meet the management needs of high-density farming environments. In recent years, some farms have begun to use sensor devices to collect livestock and poultry movement, behavior, or environmental data, and to identify abnormal behaviors through data analysis methods, thereby achieving early warning. Common methods in existing technologies mainly include threshold-based anomaly detection methods, such as judging anomalies by statistically analyzing changes in acceleration, activity levels, or feeding behavior, and determining anomalies when these exceed a set threshold; behavior recognition methods based on unified deep learning models, which identify livestock and poultry behavior types by training classification models and then judging health status based on changes in behavior types; and behavior analysis methods based on statistical features or population average models, which identify anomalies by comparing the differences between individual behavior and the population average behavior. However, the above methods still have significant shortcomings. First, there are significant differences in behavioral habits among different individuals. For example, the same head-shaking behavior may be normal activity in some individuals, but may be a disease symptom in others. Unified models are often based on population statistical regularities and easily ignore individual behavioral characteristics, leading to false alarms or false negatives. Secondly, some methods rely on large amounts of historical data for model training, making it difficult to establish effective models for newly introduced individuals or when data is insufficient. Thirdly, traditional anomaly detection typically relies on a single behavioral characteristic for judgment, lacking comprehensive analytical capabilities, thus reducing the accuracy and stability of health identification. Therefore, how to establish individualized behavioral benchmarks for each livestock and poultry under limited observational data conditions, and how to determine health status through multi-evidence comprehensive reasoning when behavioral deviations are detected, has become a pressing technical problem to be solved in the field of intelligent farming. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention proposes a method and system for identifying the health status of livestock and poultry based on brain-inspired reasoning, thereby resolving at least one of the aforementioned technical problems.

[0004] This application provides a method for identifying the health status of livestock and poultry based on brain-inspired reasoning, including the following steps:

[0005] Step S1: Obtain behavior segment data; perform action segmentation based on behavior segment data to obtain action segmentation data;

[0006] Step S2: Based on the action segmentation data, perform individual feature encoding and scenario construction to obtain individual feature data and individual scenario data respectively;

[0007] Step S3: Write the individual characteristic data and individual context data into contextual memory to obtain individual memory data; perform prototype aggregation processing based on the individual memory data to obtain individual baseline data;

[0008] Step S4: Calculate the familiarity of the action segmentation data and individual baseline data to obtain behavioral familiarity data; perform brain-inspired reasoning processing based on the behavioral familiarity data to obtain livestock and poultry state hypothesis data.

[0009] In this invention, step S1 segments behavioral fragments into action segments, transforming continuous raw signals into structured action interval data. This helps reduce noise interference and improves the stability of subsequent feature calculations. In step S2, through individual feature encoding and scenario construction mechanisms, action features are no longer based on group averages but encoded at the individual scale. Combined with time, region, or environmental state, a scenario-related structure is formed, enabling the expression of the technical fact that the same action has different meanings in different individuals or scenarios, effectively avoiding the smoothing out of individual differences by a uniform model. Step S3 constructs an individual-specific behavioral benchmark model through scenario memory writing and prototype aggregation, allowing the system to gradually form a stable set of individual behavioral prototypes during the cold start phase. This benchmark is not a static threshold but a dynamically updated structured model as memory accumulates, thereby enhancing the ability to express long-term behavioral patterns. Step S4 calculates behavioral familiarity based on the individual benchmark and uses familiarity as an intermediate quantity for brain-heuristic reasoning, ensuring that health judgments are based on objective quantitative data deviating from individual norms, rather than simple anomaly detection.

[0010] Preferably, the action segmentation is as follows:

[0011] The action activation segmentation is performed based on the behavior fragment data to obtain the first action segmentation data;

[0012] The second action segmentation data is obtained by performing self-similar potential field behavior segmentation based on the behavior segmentation data;

[0013] Frequency domain similarity features are extracted from the first action segmentation data and the second action segmentation data to obtain frequency domain similarity feature data;

[0014] The first action segmentation data and the second action segmentation data are filtered based on the frequency domain similarity feature data to obtain action segmentation data.

[0015] This invention employs a dual-parallel design of activation segmentation and self-similar potential field segmentation, enabling action boundaries to capture both energy-altering behaviors and latent actions with structural pattern changes but insignificant amplitudes. This overcomes the limitations of single-threshold or single-pattern detection methods. Consistency screening of the two types of segmentation results is performed through frequency domain similarity feature extraction, effectively eliminating erroneous segmentations that are anomalous only at the energy or structural levels, and retaining true action ranges with stable and consistent frequency domain structures. This invention improves the stability and robustness of the segmentation boundaries, reducing the risk of misjudgment caused by noise disturbances and individual differences.

[0016] Preferably, the action activation segmentation is specifically as follows:

[0017] Behavioral mutation feature data is obtained by characterizing behavioral fragment data and performing behavioral mutation feature analysis.

[0018] Cold start quantile statistics were performed on behavioral mutation feature data to obtain individual activation threshold data;

[0019] Context gating mapping is performed based on behavioral fragment data to obtain context gating data;

[0020] Activation functions are constructed based on contextual gating data and individual activation threshold data to obtain action activation probability data;

[0021] The behavior segment data is segmented based on the action activation probability data to obtain the first action segmentation data.

[0022] This invention eliminates the reliance on fixed empirical thresholds for determining action boundaries. Instead, it dynamically generates activation criteria based on the initial behavioral distribution of individuals, adapting to the differences in behavioral intensity among different livestock and poultry from the outset. Through scenario-gated mapping, the same amplitude change exhibits different activation sensitivities in different time periods or activity areas, effectively avoiding false triggers caused by environmental or group disturbances. By outputting probabilities through activation functions instead of hard-decision, the segmentation results possess continuity and adjustability, enhancing boundary stability and robustness.

[0023] Preferably, the self-similar potential field behavior segmentation is specifically as follows:

[0024] Feature embedding mapping is performed on behavioral fragment data to obtain embedded sequence data;

[0025] Self-similar matrix is ​​constructed from the embedded sequence data to obtain self-similar matrix data;

[0026] The self-similar matrix data is transformed into a potential field to obtain the self-similar potential field data.

[0027] Breakpoints are selected from the self-similar potential field data to obtain potential energy breakpoint data;

[0028] Boundary constraints are applied to the potential energy breakpoint data based on the potential energy breakpoint data to obtain the second action segmentation data.

[0029] This invention constructs behavioral state trajectories through feature embedding and then uses self-similar matrices to represent the structural similarity relationships between different time segments, shifting the identification of action boundaries from amplitude changes to pattern structure changes. Through potential field transformation, regions of similar structure aggregation are converted into stable potential energy basins, while regions of abrupt pattern changes are represented as potential energy breakpoints, thereby enabling the identification of latent behaviors with insignificant amplitude changes but structural shifts. Boundary constraint processing at breakpoints avoids over-segmentation or noise triggering, improving the stability and structural consistency of action interval division.

[0030] Preferably, the frequency domain similarity feature extraction specifically involves:

[0031] The segmented data of the first action and the segmented data of the second action are aligned to obtain interval-aligned data.

[0032] Spectrum construction is performed on the interval-aligned data to obtain dual-domain spectrum data;

[0033] Individual frequency band data is obtained by dividing the dual-domain spectrum data into individual frequency bands;

[0034] Frequency domain features are extracted from individual frequency band data to obtain frequency domain feature data;

[0035] Cross-spectral consistency calculation is performed on frequency domain feature data to obtain coherent similarity data;

[0036] Difference coding is performed based on frequency domain feature data and coherent similarity data to obtain frequency domain difference map data;

[0037] Similarity structure aggregation is performed on the frequency domain difference map data to obtain frequency domain similarity feature data.

[0038] This invention aligns the dual-segmentation results across intervals and constructs dual-domain spectra, enabling structural comparison of the two segmentation mechanisms within a unified frequency domain, thus avoiding misjudgments based solely on temporal boundary differences. Individual frequency band division allows frequency segments to be adaptively generated based on individual behavioral distributions, enhancing the ability to express individual rhythmic differences. Through cross-spectral consistency calculation and difference coding mechanisms, not only are spectral energy differences measured, but phase and coherence relationships are also evaluated, thereby identifying cases with consistent structures but different amplitudes, or similar amplitudes but rhythmic shifts. By converging similar structures, stable frequency domain components are preserved, improving the robustness and reliability of action screening.

[0039] Preferably, step S2 specifically includes:

[0040] Stable segments are selected based on the action segmentation data to obtain stable action segment data;

[0041] Frequency domain coding and motion coordination feature extraction are performed on stable motion segment data to obtain frequency domain coded data and motion coordination feature data, respectively.

[0042] Anchor points are selected based on frequency domain coding data and motion coordination feature data to obtain individual anchor point data;

[0043] Individual feature data is obtained by prototype encoding based on individual anchor data;

[0044] Context state data is obtained by extracting context state data based on action segmentation data;

[0045] Scenario transition diagrams are constructed based on scenario status data to obtain scenario transition diagram data;

[0046] The scenario transition map data is processed into scenario stages to obtain individual scenario data.

[0047] This invention employs a stable fragment selection mechanism to prioritize action regions with high structural consistency and low boundary jitter, reducing interference from noisy fragments in individual modeling. The system performs frequency domain coding and motion-coordinated feature extraction separately, enabling individual features to possess both rhythmic and dynamic expressive capabilities. Anchor point selection prioritizes representative fragments with high stability and discriminability for prototype coding, facilitating the rapid formation of individual behavioral benchmarks even with limited samples. Constructing a scenario transition graph and performing staged processing transforms scenarios from static labels into temporal structures and staged evolutionary features, thereby enhancing the structural expressiveness and long-term stability of individual scenario modeling.

[0048] Preferably, step S3 specifically includes:

[0049] Context matching is performed on individual characteristic data and individual context data to obtain context matching data;

[0050] Memory similarity data is obtained by calculating memory similarity based on individual characteristic data and context matching data.

[0051] Write-gating judgment is applied to memory similarity data to obtain individual memory data;

[0052] Contextual structure density is calculated based on individual memory data to obtain density distribution data;

[0053] Initial prototype data is generated based on density distribution data.

[0054] Based on the initial prototype data, cross-time stability verification is performed to obtain individual baseline data.

[0055] This invention uses scenario matching to confine individual features within corresponding scenario containers for comparison, avoiding model drift caused by cross-scenario mixing. The system performs memory similarity calculation and write gating, ensuring that new behaviors only enter the memory bank when they deviate from the existing structure, thereby suppressing noise accumulation and controlling memory expansion. High-density stable regions are identified through scenario-based structure density calculation, ensuring that the prototype originates from real high-frequency behavioral patterns rather than sporadic samples. Combined with cross-time stability verification, the prototype maintains consistency across different time windows, thus forming an individual benchmark model with long-term reliability.

[0056] Preferably, the familiarity calculation is as follows:

[0057] Dual-channel distance calculations are performed on action segmentation data and individual baseline data to obtain prototype distance data. The dual-channel distance calculations include structural evolution channel distance calculations and distribution offset channel distance calculations.

[0058] The nearest prototype is selected from the prototype distance data to obtain the optimal matching data;

[0059] Based on the optimal matching data, an exponential mapping is performed to obtain behavioral familiarity data.

[0060] This invention employs a dual-channel distance calculation mechanism—a structural evolution channel and a distribution shift channel—to measure the consistency of the internal evolutionary trajectory of an action and the degree of deviation in the overall statistical distribution, respectively. This ensures that familiarity assessment considers both microstructural changes and macroscopic distribution drift, thus avoiding misjudgments caused by a single distance metric. Nearest neighbor prototype selection matches the current action with the most representative individual benchmark, guaranteeing the relevance of the comparison. An exponential mapping is used to transform distance values ​​into a continuous familiarity index, resulting in a smooth change in deviation and improving sensitivity to progressive anomalies while maintaining the stability and interpretability of the results.

[0061] Preferably, the brain-inspired reasoning processing specifically includes:

[0062] Novelty data is obtained by performing novelty mapping on behavioral familiarity data.

[0063] Based on the novelty of the behavior data, context-gated weighting is performed to obtain the gated evidence strength data;

[0064] Based on the gated evidence strength data, evidence events are generated and processed to obtain abnormal evidence event data;

[0065] Brain-inspired symptom node mapping is performed on anomalous evidence event data to obtain symptom evidence data.

[0066] Load the state hypothesis graph onto the symptom evidence data to obtain the state hypothesis graph data;

[0067] Evidence propagation reasoning was performed on the state hypothesis diagram data to obtain livestock and poultry state hypothesis data.

[0068] This invention starts with behavioral familiarity and quantifies the degree of deviation from an individual's norm into propagable evidence strength through novelty mapping. Combined with a context-gating mechanism, it assigns differentiated weights to the same behavioral deviation in different environments or stages, thereby avoiding contextual misjudgment. Abnormal evidence events are mapped to symptom nodes and loaded into a state hypothesis graph. Through structured evidence propagation, multiple symptoms are collaboratively accumulated and mutually constrained, enabling state judgments to be based on multi-source evidence fusion rather than relying on a single feature. This mechanism enhances early anomaly identification capabilities while improving the structural consistency and interpretability of the results, demonstrating stable and practically implementable reasoning advantages.

[0069] Preferably, this application also provides a livestock and poultry health status identification system based on brain-inspired reasoning, used to execute the livestock and poultry health status identification method based on brain-inspired reasoning as described above, the livestock and poultry health status identification system based on brain-inspired reasoning includes:

[0070] The action segmentation module is used to acquire behavior segment data; and to segment actions based on the behavior segment data to obtain action segmentation data.

[0071] The individualized feature encoding and scenario modeling module is used to encode individual features based on action segmentation data to obtain individual feature data; and to construct scenarios from the individual feature data to obtain individual scenario data.

[0072] The context memory construction and prototype aggregation module is used to write context memories into individual feature data and individual context data to obtain individual memory data; and to perform prototype aggregation processing based on individual memory data to obtain individual baseline data.

[0073] The familiarity assessment and brain-inspired reasoning module is used to calculate the familiarity of action segmentation data and individual baseline data to obtain behavioral familiarity data; based on the behavioral familiarity data, brain-inspired reasoning is performed to obtain livestock and poultry state hypothesis data.

[0074] The beneficial effects of this invention are as follows: it achieves a stable technical closed loop from raw behavioral signals to health state hypotheses. In step S1, continuous behavioral segments are transformed into clearly defined action interval data through action segmentation, effectively reducing the impact of raw signal noise and random fluctuations on subsequent modeling and providing a unified time scale basis for feature extraction. In step S2, through individual feature encoding and scenario construction, action features not only reflect dynamic information such as frequency domain structure and motion coordination, but also form a binding relationship with the scenario state, thereby avoiding bias caused by mixed modeling of behaviors from different time periods or regions. In step S3, through scenario memory writing and prototype aggregation, an individual-specific benchmark model is constructed, enabling the system to gradually form a stable set of behavioral prototypes during the cold start phase. Structural density and cross-temporal stability checks suppress occasional behavior from entering the benchmark, improving the reliability of individual normal expression. In step S4, a continuous familiarity index is generated using dual-channel distance and exponential mapping, allowing for fine quantification of the fit between the current behavior and the individual benchmark. This index is then used as input for brain-inspired evidence propagation inference, achieving multi-symptom collaborative accumulation judgment. Attached Figure Description

[0075] Other features, objects, and advantages of this application will become more apparent from the following detailed description of the non-limiting embodiments, taken with reference to the accompanying drawings:

[0076] Figure 1 A flowchart illustrating the steps of a method for identifying the health status of livestock and poultry based on brain-inspired reasoning is shown in one embodiment.

[0077] Figure 2 A flowchart illustrating the steps of an action segmentation method according to one embodiment is shown.

[0078] Figure 3 A flowchart illustrating the steps of an embodiment of a personalized feature encoding and scenario modeling method is shown.

[0079] Figure 4 A flowchart illustrating the steps of a scenario memory construction and prototype aggregation method according to an embodiment is shown.

[0080] Figure 5 A flowchart illustrating the steps of a familiarity calculation method according to an embodiment is shown. Detailed Implementation

[0081] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0082] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. Functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.

[0083] It should be understood that although the terms "first," "second," etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are used merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0084] Please see Figures 1 to 5 This application provides a method for identifying the health status of livestock and poultry based on brain-inspired reasoning, including the following steps:

[0085] Step S1: Obtain behavior segment data; perform action segmentation based on behavior segment data to obtain action segmentation data;

[0086] In one embodiment, the system first acquires triaxial acceleration and triaxial angular velocity data from wearable sensors in livestock and poultry, and preprocesses them according to a sliding time window of one to three seconds, including gravity component elimination and bandpass filtering, to obtain a stable behavioral signal sequence. The system calculates the energy of a short time window and a long time window on the filtered signal (the system establishes two sliding windows on the preprocessed acceleration and angular velocity magnitude sequences, respectively; the short time window is typically set to a length of approximately 0.5 to 1 second; the long time window is typically set to a length of approximately 2 to 3 seconds. The system statistically analyzes the signal amplitude within each window, representing the signal energy within that time period by calculating the average of the squares of the amplitudes at each sampling point within the window), and analyzes / compares the differences between the two to characterize the intensity of behavioral change. When the intensity of this change is higher than the 90th percentile threshold obtained statistically during the cold start phase, the system marks the corresponding time as the start position of the action; when the intensity of the change is lower than the 60th percentile threshold, it is marked as the end position of the action, thus forming the first type of behavioral segmentation interval. The system segments the behavioral signal using a fixed-length sliding window, extracting a set of basic behavioral features within each window, such as the mean magnitude of acceleration, the mean magnitude of angular velocity, signal energy level, and dominant frequency position. The system combines these features in a predetermined order to form a feature vector. The system arranges the feature vectors obtained from all time windows in chronological order, forming a continuous sequence of behavioral features, which is the behavioral feature embedding sequence. The system constructs a self-similarity matrix for this embedding sequence. The system compares the similarity between feature vectors from every two time windows in the embedding sequence, obtaining a similarity evaluation value by comparing the degree of directional consistency and numerical difference between the feature vectors. Specifically, in the directional consistency judgment, the system compares the directional relationship of changes in corresponding dimensions, such as whether two vectors increase, decrease, or remain stable simultaneously in that dimension; when the directional relationship is consistent, that dimension is recorded as the directional consistency dimension. Subsequently, in the numerical difference judgment, the system evaluates the numerical differences between features in each dimension. The system checks the similarity values ​​and considers the dimension to be numerically consistent if the difference falls within a preset allowable range. After completing the dimension-by-dimensional comparison, the system counts the number of feature dimensions that meet the criteria of "consistent direction and numerical difference within the allowable range" and calculates their proportion of all feature dimensions. When this proportion reaches a preset threshold, the two feature vectors are considered to have high similarity; when the proportion is in a medium range, they are considered to be generally similar; and if the proportion is low, they are considered to have low similarity. The system arranges the similarity values ​​between all pairs of time windows in chronological order to form a two-dimensional matrix and identifies structural breakpoints at locations where the similarity change gradient (the system observes the similarity change near the diagonal of the matrix along the time axis) decreases significantly, generating a second type of behavior segmentation interval.The two types of intervals are subjected to overlap matching processing, and only intervals with an overlap exceeding a preset ratio are retained as valid action segments to form action segmentation data.

[0087] Step S2: Based on the action segmentation data, perform individual feature encoding and scenario construction to obtain individual feature data and individual scenario data respectively;

[0088] In one embodiment, the system performs feature extraction processing on each behavioral interval in the action segmentation data, obtains the dominant frequency features from the signal spectrum, and statistically analyzes the stability of spectral peaks, the changes in the spacing between adjacent spectral peaks, and the joint change trend between acceleration and angular velocity (the system extracts the changes in acceleration magnitude sequence and angular velocity magnitude sequence in chronological order to obtain their respective increases and decreases over time; it synchronously compares the two types of changes at the same time to determine whether they increase or decrease simultaneously, or whether one increases while the other decreases; it statistically analyzes the continuous occurrence and dominant type of this type of synchronous change throughout the entire action interval, thereby obtaining the joint change trend features characterizing action coordination), thereby constructing the initial behavioral feature vector for the corresponding interval. The system uses the feature mean and standard deviation obtained during the cold start phase (the initial data accumulation phase after an individual enters the monitoring system, establishing the individual's own behavioral reference range, rather than immediately making anomaly judgments) to perform scale normalization processing on the above features, so that each feature can remain consistent at the individual scale. The system extracts time category labels based on the time information of the behavior interval, and generates scenario labels by combining the livestock and poultry pen area number and environmental status level information. For example, if a certain action interval occurs in the morning, the location result shows that the livestock and poultry are in the feed trough area, and the current environmental monitoring result is high temperature and low noise, then the scenario label "morning - feed trough area - high temperature and low noise" can be generated; if another action occurs at night, in the lying area, in a normal temperature and quiet environment, then the label "night - lying area - normal temperature and low noise" can be generated. The system statistically analyzes the frequency and duration of various behavioral characteristics under different scenario conditions, constructing a correspondence structure between characteristics and scenarios. (The system groups action intervals with the same scenario label into the same scenario set, and within this set, it statistically analyzes the frequency of occurrence, cumulative duration, and proportion of each behavioral characteristic to the total duration of that scenario. For example, in the scenario of "morning—feeding area—normal temperature," the system can statistically analyze that feeding-related frequency domain characteristics occur more frequently and have a larger duration; while in the scenario of "night—lying area—low noise," static characteristics account for a higher proportion. Based on the above statistical results, the system can form a correspondence structure of "which behavioral characteristics frequently occur in a certain scenario and how intense they are," generating individual characteristic data and individual scenario data respectively.)

[0089] Step S3: Write the individual characteristic data and individual context data into contextual memory to obtain individual memory data; perform prototype aggregation processing based on the individual memory data to obtain individual baseline data;

[0090] In one embodiment, the system writes individual feature data into corresponding context memory containers based on context tags to record historical behavioral features under different context conditions. The context memory container is a partitioned storage unit within the individual memory structure, used to store historical behavioral features under specific context conditions. Behavioral features with the same context tags are stored together in the same container to avoid interference between behavioral patterns under different contexts. For example, a combination of context stage identifiers and context state identifiers can be used as index keys to create a corresponding memory container for each context. After generating individual feature data for a behavioral segment, the system writes the feature into the corresponding container based on its context tag, thereby gradually forming a behavioral memory set for different contexts. When a new behavioral feature enters, the system compares its similarity with existing features in the container. The similarity is evaluated by considering the spatial distance difference between features and their deviation from the feature distribution. For example, the system compares the current feature vector with the feature values ​​of existing feature nodes in the container dimensionally, such as dominant frequency position, frequency band energy proportion, and motion coordination direction / joint change trend. When multiple key features are within a preset allowable deviation range, the current feature is determined to be similar to existing nodes; if several key features significantly deviate from this range, it is determined to be a new behavioral expression. The overall similarity can be determined by statistically analyzing the proportion of feature dimensions that meet the deviation range conditions, thereby deciding whether to add new memory nodes. If the comparison result is lower than a preset threshold, the feature is determined to have a new behavioral expression form, and the system adds a corresponding memory node to the container; if it is higher than the threshold, the feature is updated with existing nodes using weighted updates to gradually correct the memory representation. For example, the system merges the new feature value with the original feature value of the node to update it, so that the node feature gradually moves closer to the recent behavioral feature. In implementation, a smooth update strategy of historical values ​​and new observations can be adopted, that is, retaining most of the information of the original node feature and adjusting it with a certain proportion of new feature values, so that the node feature gradually adapts to behavioral changes over time, while avoiding drastic fluctuations caused by a single observation. Through continuous updates, the node feature can stably represent the typical behavioral pattern in the scenario. The system performs an overall analysis of memory nodes in the same scenario container within a preset period, calculates the distance relationship between nodes and performs density clustering, and selects nodes with high local density and small average distance from surrounding nodes as candidate behavioral prototypes. When a candidate prototype appears stably over multiple consecutive time windows, the system recognizes it as the behavioral benchmark for that scenario and writes it into the individual benchmark data to represent the normal behavioral pattern under that scenario.

[0091] Step S4: Calculate the familiarity of the action segmentation data and individual baseline data to obtain behavioral familiarity data; perform brain-inspired reasoning processing based on the behavioral familiarity data to obtain livestock and poultry state hypothesis data.

[0092] In one embodiment, the system assesses familiarity between the behavioral characteristics of the current action segmentation interval / action segmentation data and the behavioral prototype in the individual baseline data. The system performs difference analysis on behavioral characteristics from two channels: structural change and statistical distribution. In the structural channel, the system aligns and compares the change patterns of the behavioral sequence to assess the degree of difference between the current behavioral structure and the baseline behavioral structure. In the distribution channel, the system calculates the deviation of key statistical features (features such as frequency band energy proportion, dominant frequency position, and spectral peak width in frequency domain coding, and indicators such as joint change rate level and dominant direction consistency in motion coordination features / joint change trends, extracting their average level, dispersion, and distribution morphology parameters to form a statistical distribution summary vector) by comparing the statistical summary of the current action segment with the corresponding statistical summary in the individual baseline prototype. This deviation represents the change in the numerical distribution of the current behavior. The system fuses the difference results from the two channels to obtain a distance index, which is then converted into a behavioral familiarity value. When the behavioral familiarity is below a preset threshold, the system marks the corresponding interval as an anomalous evidence event and adjusts the weight based on the importance of the current context. The system maps this evidence to a pre-established symptom node graph, accumulating scores for various health states through multiple rounds of correlation propagation. This multi-round correlation propagation involves the system mapping detected abnormal evidence events to corresponding symptom nodes and assigning initial evidence strength values ​​to these nodes. Based on the correlation between symptom nodes and state nodes, the system progressively propagates the evidence strength of symptom nodes to connected state nodes, accumulating and updating the scores of state nodes in each round. This propagation process can continue for several rounds, allowing evidence from different symptom nodes to gradually converge on relevant state nodes. After propagation is complete, the system obtains the scores of each state node and determines the most probable health state by comparing the scores of each node, thereby generating the corresponding livestock / poultry state hypothesis. When the score of a certain health state reaches the trigger condition and is higher than other states, the system outputs it as a livestock / poultry state hypothesis, simultaneously recording the corresponding evidence source and correlation path. The symptom node graph is constructed using a predefined knowledge structure. The system determines several behavioral symptom nodes based on breeding behavior experience or historical data analysis results, such as abnormal activity, frequent head shaking, reduced feed intake, or persistent lying down. Corresponding state nodes are established for different health states, such as risk of neurological abnormalities, risk of digestive abnormalities, or estrus status. The system establishes connections between nodes based on the correlation between behavioral symptoms and health status, and sets a correlation strength parameter for each connection, thereby forming a graph structure that includes symptom nodes, status nodes, and associated edges.

[0093] Preferably, the action segmentation is as follows:

[0094] Step S11: Perform action activation segmentation based on the behavior fragment data to obtain the first action segmentation data;

[0095] In one embodiment, the system performs two-level sliding window statistical processing on the acceleration magnitude and angular velocity magnitude in the behavior segment data, where the short time window is set to approximately 0.5 seconds and the long time window is set to approximately 3 seconds. The system calculates the signal energy of the short window and the long window respectively, and analyzes the difference between the two, using this difference as the action activation feature. During the system cold start phase, the activation feature is statistically analyzed to determine the entry threshold and exit threshold, and the action interval is identified through hysteresis judgment. That is, the system avoids frequent triggering by setting two different levels of entry and exit thresholds. When the activation feature first exceeds the entry threshold, the system considers the behavior intensity to have increased significantly, and thus marks this moment as the action start point. When judging the end of the action, the system does not immediately end the interval when the feature decreases, but requires the activation feature to remain below the exit threshold for a continuous period of time. Only when this continuous condition is met is it marked as the action end point. When the activation feature first exceeds the entry threshold, the corresponding moment is marked as the action start point; when the activation feature remains below the exit threshold for a preset duration, the position is marked as the action end point, thus forming the initial action interval. The system applies a minimum duration constraint to the obtained intervals, retaining only the intervals whose duration reaches the set duration, while merging adjacent intervals with shorter intervals to obtain the first action segmentation data.

[0096] Step S12: Perform self-similar potential field behavior segmentation based on the behavior segment data to obtain the second action segmentation data;

[0097] In one embodiment, the system extracts behavioral embedding vectors from behavioral segment data at fixed time steps. These embedding vectors consist of features such as spectral peak positions, spectral skewness characteristics, and the combined trends of acceleration and angular velocity, forming a continuous embedding sequence. The system performs pairwise similarity comparisons on the embedding vectors at each time step in the sequence, constructing a self-similarity matrix and calculating the similarity density between each time step and its immediate neighbors, generating a one-dimensional potential field sequence representing the continuous change in the behavioral structure. When the potential field sequence shows a significant change at a certain position, accompanied by a shift from an upward to a downward trend, the system identifies that position as a behavioral structure breakpoint. The system uses the intervals between adjacent breakpoints as candidate behavioral intervals and applies constraints on interval length and breakpoint spacing to exclude excessively short or dense segmentation results. For cases where adjacent intervals have high structural similarity, the system performs merging processing to obtain the second action segmentation data.

[0098] Step S13: Extract frequency domain similarity features from the first action segmentation data and the second action segmentation data to obtain frequency domain similarity feature data;

[0099] In one embodiment, the system performs interval alignment processing on the first action segmentation data and the second action segmentation data, using the degree of overlap between the two intervals as the matching basis. When the overlap ratio reaches a preset threshold, they are formed into an aligned interval pair; intervals that fail to form an alignment relationship are temporarily marked as low-confidence intervals. Within each aligned interval, the system performs spectral analysis on the behavioral signal and determines adaptive frequency band boundaries based on the spectral energy distribution statistically obtained during the cold start phase (during the cold start phase, the system statistically analyzes the spectrum of several behavioral segments, accumulates the energy values ​​corresponding to each frequency position from low to high frequency, and calculates the proportion of the accumulated energy in the overall energy. When the accumulated energy reaches a preset proportion, that frequency point is used as the frequency band boundary. For example, when the accumulated energy reaches a low proportion, the upper boundary of the low-frequency band is determined; when the accumulated energy reaches a medium proportion, the upper boundary of the mid-frequency band is determined; and the remaining portion is the high-frequency band range), dividing the spectrum into several energy level intervals. The system extracts features such as peak position, peak width, and in-band energy proportion within each frequency band. Simultaneously, it evaluates the coherence between the spectra of two intervals, obtaining statistical characteristics of coherence. For example, the system compares the energy change trends of the two spectra at various frequency positions within the corresponding frequency band, statistically analyzing the proportion of simultaneous energy enhancement or weakening at the same frequency, and using this proportion as an indicator of the degree of spectral co-change. When most frequency positions show similar change trends, the two spectrum intervals are considered to have a high degree of coherence; if the change directions at most frequency positions are inconsistent, the degree of coherence is considered low. The system combines and encodes the frequency band structure difference features with the spectral coherence difference features to form a frequency domain similarity feature representation, thereby obtaining frequency domain similarity feature data.

[0100] Step S14: Filter the first action segmentation data and the second action segmentation data according to the frequency domain similarity feature data to obtain action segmentation data.

[0101] In one embodiment, the system evaluates the consistency of aligned intervals formed by the first action segmentation data and the second action segmentation data based on frequency domain similarity feature data. The system compares the changes in spectral peak positions in each frequency band and makes a judgment based on the coherence between the spectra. When the spectral peak position shift is within the allowable range statistically obtained during the cold start phase of an individual, and the spectral coherence between the two intervals reaches a set standard, the system determines the interval pair as a consistent interval and retains the overlapping part of the two intervals as the action interval. When the spectral peak structure is basically consistent but the coherence is insufficient, the system identifies it as an interval with a difference in the same frequency structure and prioritizes retaining the second action segmentation interval; when the spectral coherence is high but the energy distribution difference is large, it is identified as an amplitude difference interval and prioritizes retaining the first action segmentation interval. For the retained intervals, the system applies a minimum duration constraint and merges adjacent intervals with shorter intervals to obtain action segmentation data.

[0102] Preferably, the action activation segmentation is specifically as follows:

[0103] Behavioral mutation feature data is obtained by characterizing behavioral fragment data and performing behavioral mutation feature analysis.

[0104] In one embodiment, the system preprocesses the triaxial acceleration and angular velocity signals in the behavioral segment data, including gravity component removal and bandpass filtering, to obtain motion signals. The system calculates the composite magnitude sequence of acceleration and angular velocity based on the processed motion signals and statistically analyzes the window energy and its changing trend within a fixed time window to represent the dynamic changes in behavioral intensity. The system analyzes the dominant axis with the most significant changes in the angular velocity signal and statistically analyzes the frequency of sign changes between adjacent sampling points to represent the impact or reversal characteristics occurring during motion. The system calculates the degree of difference between the peak value and the average level within the window to represent the sharpness of the signal peak. The system combines and encodes the energy change trend, sign reversal frequency, and peak sharpness characteristics to form abrupt change feature vectors at corresponding times, and uses the set of feature vectors from consecutive times to constitute behavioral abrupt change feature data.

[0105] Cold start quantile statistics were performed on behavioral mutation feature data to obtain individual activation threshold data;

[0106] In one embodiment, the system performs statistical analysis on behavioral mutation feature data during the cold start phase of newly added individuals, statistically analyzing the numerical distribution of various mutation features within a preset time range using a sliding window. The system calculates multiple quantile statistics for energy change features / energy change trends, sign flip features / sign flip frequency, and peak sharpness features to describe the individual's behavioral change level in the initial stage. The system sets higher quantile values ​​as the behavioral activation entry threshold and selects a middle quantile range as the exit threshold to form a judgment interval with hysteresis characteristics, thereby avoiding frequent triggering of segmentation. The system sets an even higher quantile level as a strong mutation judgment threshold; when the mutation feature exceeds this range, behavioral activation marking can be directly triggered. The system outputs individual activation threshold data, including entry thresholds, exit thresholds, and strong mutation thresholds corresponding to various mutation features. It also records the confidence status of the threshold statistics (when the entry and exit thresholds change little in adjacent statistical periods, it indicates that the statistical results have become stable, and the confidence level can be increased; if the thresholds fluctuate significantly in a continuous window, it indicates that the current statistics are still in the initial stage, and the system maintains a low confidence level) to reflect the impact of the current sample size on the reliability of the thresholds.

[0107] Context gating mapping is performed based on behavioral fragment data to obtain context gating data;

[0108] In one embodiment, the system synchronously acquires contextual information about the occurrence of an action based on behavioral fragment data, including the time category of the action, the livestock pen area, and the current environmental state. The system divides the time period into several time categories and combines this information with temperature, humidity, and noise level information collected by environmental monitoring equipment (the system obtains real-time temperature, humidity, and noise values ​​from the environmental monitoring equipment and then converts them into discrete levels based on preset ranges; for example, multiple level ranges can be set according to the normal comfort range of the livestock breeding environment. When the temperature or humidity is within a suitable range, it is marked as normal; when it is significantly higher or lower than that range, it is marked as high or low, respectively. Similarly, the system classifies noise intensity into different levels such as low noise, medium noise, and high noise). This collectively constructs a context identifier. The system then queries a preset gating rule table for the corresponding context gating coefficient based on this context identifier to adjust the response intensity of behavioral abrupt changes under different scenarios. For example, in nighttime or lying areas, the response weight of some low-intensity behavioral features is appropriately reduced; while in feeding areas or densely populated environments, the response weight of impact-type behavioral features is appropriately increased. The system associates the corresponding gating coefficients with the scenario identifiers and outputs them to form scenario gating data.

[0109] Activation functions are constructed based on contextual gating data and individual activation threshold data to obtain action activation probability data;

[0110] In one embodiment, the system combines individual activation threshold data with scenario gating data, adjusts the individual basic threshold according to the gating coefficient corresponding to the current scenario, thereby forming dynamic entry and exit thresholds applicable to the current scenario. The system evaluates the behavioral mutation feature vector, combines each feature based on peak sharpness, sign flipping characteristics, and energy changes to obtain the activation level (the system performs threshold determination on various indicators in the behavioral mutation feature vector, such as whether the peak sharpness exceeds the reference range, whether the sign flipping frequency reaches the preset level, and whether the energy change amplitude increases significantly. When multiple mutation features simultaneously meet the triggering conditions within the same time window, the system marks the time window as a high activation candidate and generates the corresponding activation level based on the number of features meeting the conditions or the triggering order, which can also be regarded as the activation level. For example, when only one type of mutation feature reaches the threshold, it can be marked as a low activation level, and when two or more types of features simultaneously reach the threshold, it is marked as a high activation level), and performs range restriction processing on it. The system performs interval mapping on activation levels, assigning different levels to preset probability ranges. It then combines dynamic entry and exit thresholds to generate action activation probabilities, ensuring that low activation levels correspond to low probabilities, intermediate levels to transitional probabilities, and high levels to high probabilities. When a strong mutation triggers, the system directly sets the action activation probability to a high probability range. When the activation level is below the exit threshold, the activation probability tends to be low; when the activation level is above the entry threshold, the activation probability tends to be high; and in between, it exhibits continuous variation. Simultaneously, when a strong mutation feature is detected exceeding a preset intensity threshold, the system directly determines it to be a high activation state. The system outputs action activation probability data.

[0111] The behavior segment data is segmented based on the action activation probability data to obtain the first action segmentation data.

[0112] In one embodiment, the system identifies and defines boundaries for behavioral segment data based on action activation probability data. The system performs a threshold determination on the activation probability. When the activation probability exceeds a preset entry level and remains above it for a certain duration within a continuous time period, that moment is marked as the start of action activation. When the activation probability falls below a preset exit level and remains below it for a set duration within a continuous time period, the corresponding position is marked as the end of action activation, thus forming candidate action intervals. The system applies a minimum duration constraint to the candidate intervals to avoid misjudgments caused by excessively short intervals and merges intervals with small adjacent intervals. The system checks the data integrity within each interval. When continuous signal anomalies or missing information are detected, the confidence level of that interval is reduced, and it is removed if necessary. The system outputs first action segmentation data, including the start and end positions of the action interval and associated scene identification information.

[0113] Preferably, the self-similar potential field behavior segmentation is specifically as follows:

[0114] Feature embedding mapping is performed on behavioral fragment data to obtain embedded sequence data;

[0115] In one embodiment, the system performs sliding window processing on behavioral segment data at a fixed time step, extracting multiple local behavioral features within each window, including the dominant frequency position in the signal spectrum, the stability of spectral peaks, the proportion of frequency band energy, the joint trend of acceleration and angular velocity, and the consistency of the dominant motion direction. The system combines these features to form the local feature vector for the corresponding window. The system normalizes each feature dimension using the quantile range statistically obtained during the cold start phase of the individual, and truncates and adjusts feature dimensions that exhibit abnormal saturation or excessive deviation. The system arranges the local feature vectors corresponding to each window sequentially according to time order, constructing a continuous feature embedding sequence, thereby obtaining the embedding sequence data.

[0116] Self-similar matrix is ​​constructed from the embedded sequence data to obtain self-similar matrix data;

[0117] In one embodiment, the system performs pairwise comparisons of feature vectors at each time step in the embedded sequence data to assess the degree of behavioral similarity between different time locations. The system measures the similarity between feature vectors from two aspects: consistency of vector direction and difference in feature distribution. It then combines the two similarity results (by averaging or taking the smaller of the two values ​​as the similarity evaluation value) to obtain a total similarity evaluation value. The system constructs a self-similarity matrix based on the similarity relationships between time steps, where matrix elements represent the degree of similarity between behavioral features at two time locations. The system performs local smoothing on the self-similarity matrix, adjusting the mean of the similarity values ​​within the neighborhood near the diagonal. The system outputs the smoothed self-similarity matrix data.

[0118] The self-similar matrix data is transformed into a potential field to obtain the self-similar potential field data.

[0119] In one embodiment, the system performs potential field representation processing on behavior sequences based on self-similar matrix data. The system analyzes the matrix along the time axis, statistically analyzing the similarity between the current time and surrounding time locations within the neighborhood of each time moment. By calculating the average level of similarity within the neighborhood or the proportion reaching a preset similarity standard, a density sequence representing the density of the behavior structure is obtained. The system performs potential field mapping processing based on the density sequence, representing regions with high similarity density as stable regions with low potential energy, and regions with low similarity density as changing regions with high potential energy, thereby forming a continuous potential energy representation sequence. For example, the system can regard regions with high and continuously distributed similarity density as potential energy basins to represent time segments with relatively stable behavior patterns; while locations with significantly reduced similarity density are represented as potential energy slopes or potential energy peaks to identify areas where the behavior structure may change. In a continuous walking behavior, the similarity between adjacent time frames is high, and the corresponding potential energy value is generally low; when the behavior changes from walking to eating or lying down, the similarity suddenly decreases, and the potential energy value increases significantly, thus forming a potential energy abrupt change point. The system performs trend analysis and normalization on the potential energy sequence to highlight the locations where the potential energy changes significantly, and the system obtains self-similar potential field data.

[0120] Breakpoints are selected from the self-similar potential field data to obtain potential energy breakpoint data;

[0121] In one embodiment, the system identifies the locations of behavioral structure changes based on self-similar potential field data. The system analyzes the trend of the potential field sequence; when the potential energy change amplitude significantly increases and exceeds the range of changes statistically obtained during the cold start phase, the location is marked as a candidate breakpoint. The system checks for trend reversals in potential energy change; when a change from an upward to a downward trend is detected, the location is considered a boundary point of the behavioral structure, thus confirming it as a candidate breakpoint and adding it to the list. The system constrains the time interval between adjacent candidate breakpoints; when the interval is too short, only breakpoints with more significant potential energy changes are retained. The system outputs potential energy breakpoint data, including the time location corresponding to the breakpoint and the potential energy change amplitude information at that location.

[0122] Boundary constraints are applied to the potential energy breakpoint data based on the potential energy breakpoint data to obtain the second action segmentation data.

[0123] In one embodiment, the system divides the behavioral sequence into intervals based on potential energy breakpoint data, using the time range between adjacent breakpoints as candidate action intervals. The system applies boundary constraints to the candidate intervals, retaining only intervals with a duration reaching a preset minimum, and evaluates the similarity density level within each interval. When the average similarity density within an interval is lower than the reference level statistically obtained by the individual during the cold start phase, the system classifies it as an interval with insufficient consistency and removes it. For adjacent candidate intervals, the system analyzes the similarity across intervals. When the overall similarity between two intervals is high, they are merged into the same action interval; when the cross-interval similarity is low, the original breakpoint boundary is retained. The system outputs a set of intervals after constraint processing as the second action segmentation data, including the start and end times of the intervals and the corresponding consistency evaluation index. The steps for obtaining the consistency evaluation index include, after determining the candidate intervals, extracting the sub-matrix corresponding to the interval from the self-similarity matrix and statistically analyzing the average level or stable proportion of similarity values ​​within the sub-matrix to characterize the consistency of the behavioral patterns within the interval. When most time points within an interval exhibit high similarity, it indicates that the internal structure of the interval is relatively stable, resulting in a high consistency evaluation index. Specifically, the system first extracts the pairwise similarity values ​​between all time points from the self-similar submatrix corresponding to the candidate interval and sets a similarity threshold. If the similarity between two time points exceeds this threshold, they are considered to maintain consistency in their behavioral structure. The system then counts the number of time point pairs within the interval that meet this consistency condition and compares it with the total number of time point pairs within the interval to obtain the proportion of consistent relationships / consistency evaluation index. Conversely, if the similarity distribution within the interval is relatively discrete, the consistency index is relatively low.

[0124] Preferably, the frequency domain similarity feature extraction specifically involves:

[0125] The segmented data of the first action and the segmented data of the second action are aligned to obtain interval-aligned data.

[0126] In one embodiment, the system reads the interval sets from the first action segmentation data and the second action segmentation data respectively, and compares the temporal overlap relationship between the two sets of intervals. The system calculates the degree of overlap between any two intervals, using the proportion of the overlap time in the overall coverage area as the matching basis. When the degree of overlap reaches a preset standard, the system considers it as an alignable interval and performs one-to-one matching according to the principle of prioritizing overlap. When an interval corresponds to multiple candidate intervals, the system prioritizes the interval with the highest degree of overlap as the matching object, and the remaining candidate intervals are marked as unaligned intervals. After completing the matching, the system performs consistency correction on the boundaries of the aligned intervals, taking the later start time of the two intervals as the new starting point and the earlier end time of the two intervals as the new ending point, thereby forming aligned intervals. At the same time, the original interval length and overlap information are retained as alignment quality indicators to obtain interval alignment data.

[0127] Spectrum construction is performed on the interval-aligned data to obtain dual-domain spectrum data;

[0128] In one embodiment, the system extracts the corresponding original sensor signal sequence for each alignment interval and performs spectral analysis on the acceleration magnitude signal and the angular velocity magnitude signal. The system performs short-time spectral decomposition on the signal within a fixed time window and uses a smoothing window function to reduce the impact of spectral leakage, thereby obtaining a time-varying spectral representation. A first spectrogram is generated for data from the first action segmentation interval, and a second spectrogram is generated for data from the second action segmentation interval. The system unifies the frequency axes of the two spectrograms to ensure consistent frequency resolution; when frequency distributions are inconsistent, alignment is achieved through interpolation. The system normalizes the energy of each frequency band to eliminate the influence of differences in action amplitudes, enabling direct comparison of the two types of spectra. The system outputs dual-domain spectral data, including the two spectrograms and corresponding normalization parameter information.

[0129] Individual frequency band data is obtained by dividing the dual-domain spectrum data into individual frequency bands;

[0130] In one embodiment, during the individual cold start phase, the system performs statistical analysis on dual-domain spectral data and determines individualized frequency band boundaries based on the cumulative distribution of spectral energy within the frequency range. The system gradually accumulates spectral energy from low to high frequency. When the accumulated energy reaches a preset proportion, the corresponding frequency position is used as the frequency band boundary point, thus dividing the system into three frequency intervals: low-frequency band, mid-frequency band, and high-frequency band. When environmental noise is detected causing an abnormal increase in high-frequency energy, the system restricts the high-frequency boundaries, controlling them within a preset upper frequency limit to prevent noise from dominating the frequency band division. The system generates and caches a corresponding set of frequency band boundaries for each individual, forming individual frequency band data. The system evaluates the current number of statistical samples; when the sample size is insufficient, it lowers the confidence level of the frequency band boundaries and, if necessary, uses the frequency band boundary results from the previous time period.

[0131] Frequency domain features are extracted from individual frequency band data to obtain frequency domain feature data;

[0132] In one embodiment, the system extracts frequency-band features from dual-domain spectral data based on individual frequency band data. Within each frequency band, the system acquires the dominant frequency position, corresponding amplitude level, peak width, in-band energy proportion, and spectral morphology features, and performs statistical analysis on the skewness and sharpness of the spectral distribution. The system evaluates the changes in peak position between adjacent time frames. The system extracts similar features of corresponding frequency bands from the first and second spectrograms, and eliminates the influence of amplitude differences between different actions through in-band energy normalization. The system combines and encodes the first spectral feature vector, the second spectral feature vector, and the difference features between them to form a frequency domain feature representation, thereby obtaining frequency domain feature data.

[0133] Cross-spectral consistency calculation is performed on frequency domain feature data to obtain coherent similarity data;

[0134] In one embodiment, the system performs consistency assessment based on the spectral relationship between first and second spectral data. The system calculates the joint spectral relationship between the two sets of spectra at various frequency positions, representing the degree of coordinated change of the two signals across different frequency ranges. Within each individual frequency band, the system performs statistical analysis on spectral consistency, calculating the average level of consistency and the quantile statistics of the lower quantile levels within that band, to simultaneously represent overall consistency and local weakest consistency. To avoid excessive influence of individual outliers on the results, the system smooths the consistency sequence before statistical analysis. Based on the statistical results, the system classifies the consistency level of each frequency band: strong consistency is defined as high overall consistency and low quantile consistency; moderate consistency is defined as overall consistency within a medium range; and weak consistency is defined as the remaining cases. The system outputs the consistency level and its statistical indicators for each frequency band, forming coherent similarity data.

[0135] Difference coding is performed based on frequency domain feature data and coherent similarity data to obtain frequency domain difference map data;

[0136] In one embodiment, the system combines frequency domain feature data and coherent similarity data to encode and represent the differences between two sets of spectra. The system compares the differences between the first and second spectral features within each individual frequency band, including changes in dominant frequency position, spectral peak width, in-band energy ratio, and rhythmic stability (the system can determine whether the spectral structure remains stable by observing the amplitude of changes in the dominant frequency in adjacent time frames or the drift of the spectral peak position over consecutive time periods. If the dominant frequency remains largely consistent across multiple time frames, it indicates a stable rhythm; if the dominant frequency changes frequently and significantly, it indicates low rhythmic stability). The system then evaluates each difference after applying a unified scale to obtain the degree of frequency band feature difference. Based on the spectral consistency statistics, the system calculates the degree of coherent difference, which represents the difference in the coordinated changes of the two spectra within the frequency band. The system fuses the feature differences and coherent differences to obtain the difference intensity of each frequency band in each time frame and forms a difference distribution map of the two-dimensional structure of frequency bands and time in chronological order. When the intensity of the difference in a certain frequency band exceeds the reference level obtained from the individual cold start phase statistics within a continuous time period, the system marks that time range as a divergence sub-interval. The system outputs frequency domain difference map data, including the difference distribution map and the corresponding divergence sub-interval information.

[0137] Similarity structure aggregation is performed on the frequency domain difference map data to obtain frequency domain similarity feature data.

[0138] In one embodiment, the system performs structural convergence processing on the frequency domain difference map data to extract frequency domain similarity features. The system identifies stable structural features in frequency bands where the difference intensity is below a preset threshold. These features include the location of a consistently occurring dominant frequency, stable energy distribution intervals, and coherent frequency bands with consistent spectral density. The system also calculates the temporal duration of these stable structures and their coverage ratio across the entire interval. For frequency band segments marked as divergent intervals, the system does not include them in the stable structure statistics but only records their corresponding difference type labels, such as cases where the frequency structure is consistent but the morphological differences or amplitude variations are significant. The system integrates the statistical results of stable structures with the difference label information to form a frequency domain similarity feature representation, thereby obtaining frequency domain similarity feature data.

[0139] Preferably, step S2 specifically includes:

[0140] Step S21: Filter stable segments based on the motion segmentation data to obtain stable motion segment data;

[0141] In one embodiment, the system performs a stability assessment on each action interval in the action segmentation data. The system compares the start and end times of the same action interval in two adjacent segmentation results, using the ratio of the start and end time offset to the interval length as a reference indicator of boundary stability. The system performs consistency analysis on the signals within the interval, assessing the integrity and stability of the interval data by statistically analyzing the energy change level and data missingness within the interval. When the interval boundary change is small, the data missing ratio is low, and the interval duration is within a preset range, the system classifies the interval as a stable action segment. If there is a prolonged signal saturation phenomenon within the interval, or the energy change level significantly exceeds the normal range statistically obtained during the cold start phase, the interval is discarded. The system retains the set of intervals that meet the conditions, forming stable action segment data.

[0142] Step S22: Perform frequency domain coding and motion coordination feature extraction on the stable motion segment data to obtain frequency domain coded data and motion coordination feature data, respectively;

[0143] In one embodiment, the system performs frequency domain feature encoding and motion coordination feature extraction for each stable motion segment. The system performs spectral analysis on the motion segment signal and segments the spectrum statistically according to individual frequency band boundaries. Features such as energy proportion, dominant frequency position, and frequency change stability are extracted within each frequency band and combined to form the corresponding segment's frequency domain encoding vector. The system analyzes the changing trends of acceleration and angular velocity signals. By calculating the rate-of-change sequences of these two types of signals, the system statistically analyzes the density of peak occurrences and the consistency level of the dominant motion direction, thereby obtaining motion coordination features. The system normalizes the frequency domain encoding vector according to frequency band energy and standardizes the coordination features based on the feature range statistically obtained during the cold start phase. The system outputs frequency domain encoding data and motion coordination feature data respectively.

[0144] Step S23: Select anchor points based on frequency domain coding data and motion coordination feature data to obtain individual anchor point data;

[0145] In one embodiment, the system performs anchor point screening for stable motion segments based on frequency domain coded data and motion coordination feature data. The system evaluates the stability of each segment by analyzing the stability of frequency changes and the consistency of the dominant motion direction to obtain a stability score. For example, the system statistically analyzes the changes in the dominant frequency in the spectrum of each motion segment across consecutive time frames. When the amplitude of the dominant frequency change between adjacent time frames remains within a preset range, and the spectral peak position remains consistent across most time frames, the segment is determined to have stable frequency structure characteristics. The system also statistically analyzes the consistency of the dominant direction in the motion coordination features. For example, it statistically analyzes whether the acceleration and angular velocity change directions maintain the same dominant axis direction within the segment for a long period. When the same dominant direction appears continuously at most sampling times, the segment is considered to have stable motion structure characteristics. The system only marks a segment as a stable candidate when both the above conditions of spectral stability and direction consistency are met simultaneously, thus obtaining the stability evaluation result. The system compares the feature differences of the current segment with other segments, assessing its discriminability level based on the overall difference between frequency domain features and motion coordination features. For example, the system compares the frequency domain encoded vector of the current segment with the frequency domain encoded vectors of other segments one by one, statistically analyzing the differences in dominant frequency positions, energy proportions, and spectral characteristics across each frequency band, while simultaneously comparing corresponding motion coordination features, such as joint rate of change peak density or dominant direction distribution. When a segment exhibits significant differences compared to most other segments, such as different dominant frequencies or different motion coordination patterns across multiple frequency bands, it indicates that the segment has high discriminability. The system sorts all segments according to the principle of prioritizing stability and using discriminability as an auxiliary factor, selecting a subset of the top-ranked segments as candidate anchors. The system checks the feature differences between candidate anchors; when the differences between two candidate anchors are too small, only the segment with higher stability is retained. The system outputs the filtered set of anchors, forming individual anchor data.

[0146] Step S24: Perform prototype encoding based on individual anchor data to obtain individual feature data;

[0147] In one embodiment, the system constructs a set of behavioral prototypes using individual anchor point data. The system performs cluster analysis on the joint feature vectors corresponding to the anchor points, using the central or representative nodes of densely distributed feature regions as behavioral prototypes, thus forming a prototype dictionary. For each stable action segment, the system calculates the degree of feature difference between it and each prototype node, and generates a corresponding prototype activation level based on the magnitude of the difference, with segments closer to the prototype receiving higher activation levels. The system combines the activation levels corresponding to each prototype to form the prototype encoding result for that action segment. For example, assuming three behavioral prototypes are obtained through cluster analysis, representing typical feeding behavior patterns, walking activity patterns, and lying-down stillness patterns, when the system performs prototype matching on a stable action segment, if the segment has the smallest feature difference from the feeding prototype, a certain difference from the walking prototype, and a large difference from the lying-down prototype, then the activation level of that segment on the three prototypes can be represented as a high activation value for the feeding prototype, a medium activation value for the walking prototype, and a low activation value for the lying-down prototype. The system combines these three activation levels sequentially to form the prototype encoding vector for that segment, used to describe the similarity distribution of the behavioral segment across multiple behavioral patterns. At the fragment level, activation results are statistically analyzed to calculate the average overall activation level and its degree of variation, thus summarizing the distribution characteristics of individual behavior across prototypes. The system outputs individual characteristic data, including the prototype set and corresponding activation statistics.

[0148] Step S25: Extract the scenario state based on the action segmentation data to obtain scenario state data;

[0149] In one embodiment, the system extracts corresponding scenario elements based on the time information in the action segmentation data and external state data sources. The system determines the status of the livestock's location area using field or area positioning information, and simultaneously reads trigger signals from feeding or drinking equipment to determine if there is any equipment interaction. It also combines this information with temperature, humidity, or noise levels obtained from environmental monitoring equipment to determine the current environmental status. The system combines the area status, equipment interaction status, and environmental level information to generate corresponding scenario status labels and assigns a label to each action segment. When no valid data is available for a scenario element at the current time, the system uses the most recent valid status for forward filling and records a missing flag for subsequent analysis. The system outputs the scenario status sequence corresponding to each action segment in chronological order, forming scenario status data.

[0150] Step S26: Construct a scenario transition diagram based on the scenario state data to obtain scenario transition diagram data;

[0151] In one embodiment, the system constructs a scenario transition structure for individual behavior based on scenario state data. The system statistically analyzes the time-ordered scenario state sequence, recording the number of transitions between adjacent scenario states and generating transition count relationships between them. The system normalizes the transition counts for each state, representing the transition relationship from each scenario state to other states in probabilistic form. The system filters transition relationships with low frequency, removing those with a probability below a preset level. For the remaining transition relationships, the system statistically analyzes the proportion of instances where a user returns to a given state within a finite number of steps, representing the revisit characteristics of the scenario path. The system integrates scenario state nodes, transition relationships between states, and corresponding revisit indicators to form scenario transition graph data, representing the activity path structure of an individual across different regions and behavioral scenarios.

[0152] Step S27: Perform scenario-stage processing on the scenario transition map data to obtain individual scenario data.

[0153] In one embodiment, the system performs phased analysis on scenario transition graph data within a sliding time window. The system statistically analyzes the degree of change in transition relationships between scenario states and state revisit characteristics within each time window, generating a behavioral stability curve that changes over time. When state transition relationships are relatively concentrated and revisits are frequent, the system classifies that time period as a stable phase; when state transition relationships increase significantly or revisits decrease significantly, it classifies it as a fluctuating phase. To identify phase boundaries, the system performs abrupt change detection on the aforementioned trends. When the magnitude of change in transition relationships significantly exceeds the normal range obtained from the individual cold start phase statistics, or when the revisit level significantly decreases, that moment is marked as a phase transition position. The system correlates and integrates the phase label, the scenario transition structure within the corresponding time range, and the statistical results of behavioral prototype activation within that phase to form phased scenario description information and outputs individual scenario data.

[0154] Preferably, step S3 specifically includes:

[0155] Step S31: Perform scenario matching on individual feature data and individual scenario data to obtain scenario matching data;

[0156] In one embodiment, the system performs scenario matching processing based on individual feature data and individual scenario data. The system obtains scenario stage identifiers and corresponding scenario state sequences from the individual scenario data, and constructs a scenario index identifier for the current action segment. This identifier is composed of stage information and the current scenario state. The system uses this scenario index to retrieve the corresponding scenario container in the individual memory bank to obtain a set of relevant candidate memory nodes. The individual memory bank is a historical behavioral memory storage structure established for a single animal, used to store behavioral feature nodes, prototype nodes, and related statistical information formed by the individual under different scenario conditions. The scenario container is a subdivided storage unit in the individual memory bank, used to hold behavioral memory nodes under a specific scenario index. When no matching result is found, the system adopts an adjacent state backtracking strategy, searching for neighboring states with a direct transition relationship to the current state in the scenario transition structure, and prioritizing the scenario container corresponding to the neighboring state with a higher transition probability for alternative retrieval. If no matching result is still obtained, the system backtracks to the global scenario container of the current stage for matching. The system outputs the matched scenario container identifier, the backtracking level used in the matching process, and the set of candidate memory nodes, forming scenario matching data.

[0157] Step S32: Calculate memory similarity based on individual characteristic data and context matching data to obtain memory similarity data;

[0158] In one embodiment, the system evaluates the similarity between the current action segment and candidate memory nodes based on individual feature data and context matching data. The system calculates the degree of difference from two aspects: structural change features and statistical distribution features. Structural change differences describe the consistency between behavioral evolution patterns, while statistical distribution differences reflect deviations in feature value distributions. The system normalizes the two types of difference results based on a reference range obtained statistically during the cold start phase and then fuses them (e.g., by addition or average summation) to obtain the degree of difference. The system selects the node with the smallest difference from the candidate memory nodes as the nearest neighbor node and records the corresponding difference level and node identifier. The system calculates the gap between the smallest and second smallest difference to determine the clarity of the current matching result. The system outputs the nearest neighbor node information and the difference statistics to form memory similarity data.

[0159] Step S33: Perform write gating judgment on memory similarity data to obtain individual memory data;

[0160] In one embodiment, the system performs gating judgment on whether the current action segment should be written into the individual's memory based on memory similarity data. The system compares the degree of difference between the current segment and the nearest neighbor memory node, and combines the difference between the nearest and second nearest neighbors for judgment. When the difference is significantly greater than the reference range obtained by the individual during the cold start phase, or when the distinction between the nearest and second nearest neighbors is low, the system determines it as a new behavioral pattern, creates a new memory node in the memory bank, and records the corresponding time information. When the difference is in a moderate range and the matching relationship is relatively clear, the system merges and updates the existing memory nodes, gradually adjusting the node feature representation through a smooth update method. When the difference is small and the matching relationship is relatively clear, the system does not add or update nodes, but only records the occurrence frequency and stability statistics of the behavioral pattern. The system outputs the updated individual memory data.

[0161] Step S34: Calculate the intra-contextual structure density based on individual memory data to obtain density distribution data;

[0162] In one embodiment, the system performs statistical analysis on the feature difference relationships between memory nodes within each scenario container. The system compares the degree of feature difference between memory nodes within the container, forming a difference relationship table between nodes. Based on this difference relationship, the system counts the number of neighboring nodes included in each node within a certain difference range and compares this count with the total number of nodes in the container to indicate the degree of clustering of that node in the scenario structure. The system automatically determines a reference range based on the difference distribution within the scenario container. For new nodes that appear less frequently, the system discounts their density statistics. The system outputs the density level, average neighborhood difference degree, and discount indicator information corresponding to each memory node, forming density distribution data.

[0163] Step S35: Generate an initial prototype based on the density distribution data to obtain initial prototype data;

[0164] In one embodiment, the system filters candidate prototype nodes within a scenario container based on density distribution data. The system selects nodes with high density levels and small average neighborhood differences from all memory nodes as candidate prototypes. These nodes are located in the core region of the feature distribution and can represent typical behavioral patterns in that scenario. The system checks the similarity between candidate prototypes; when the differences between two candidate nodes are small, only nodes with higher frequency and stability are retained. For the retained candidate nodes, the system statistically analyzes the feature distribution within their neighborhood and records the corresponding coverage area and the number of nodes in the neighborhood, representing the prototype's influence and support level within the memory structure. The system outputs the resulting candidate prototype / prototype set and its statistical information as initial prototype data.

[0165] Step S36: Perform cross-time stability verification based on the initial prototype data to obtain individual baseline data.

[0166] In one embodiment, the system performs cross-time stability verification on the initial prototype data to screen prototype nodes that can represent individual behavioral patterns over the long term. The system performs segmented statistical analysis on historical memory nodes according to preset time windows, calculating the matching status between memory nodes and each prototype within each time window, and statistically analyzing the corresponding number of matches and the average degree of difference, thereby forming a support change over time. When a prototype exhibits a high number of matches across multiple time windows, and the difference between it and the matched nodes remains within a small range, the system determines that the prototype is a stable prototype and writes it into the individual baseline set; if the stability condition is not met, it is marked as a candidate prototype and its weight is appropriately reduced. The system summarizes the stable prototype sets in each scenario container and records the corresponding coverage and stability indicators to form individual baseline data.

[0167] Preferably, the familiarity calculation is as follows:

[0168] Step S41: Perform dual-channel distance calculation on the action segmentation data and individual baseline data to obtain prototype distance data. The dual-channel distance calculation includes structural evolution channel distance calculation and distribution offset channel distance calculation.

[0169] In one embodiment, the system extracts two types of feature representations for each action interval in the action segmentation data: a structural evolution sequence and a statistical distribution summary. The structural evolution sequence is obtained by symbolizing the joint rate of change sequence within the action segment, classifying signal change trends into states such as rising, falling, stable, or impulsive, and forming a symbol sequence in chronological order. The statistical distribution summary is obtained by statistically analyzing frequency domain coding features and motion coordination features, extracting their average level, dispersion, and distribution morphology features, thereby forming a statistical vector. The system stores the corresponding structural evolution sequence and statistical distribution summary for each behavioral prototype in the individual baseline data. In the structural evolution channel, the system compares the symbol consistency between the two sequences, using the proportion of inconsistent symbols as the degree of structural difference; in the distribution offset channel, it evaluates the deviation between statistical features and prototype features, using the proportion of each feature deviating from the reference range to characterize the distribution difference. The system normalizes the two types of difference results and fuses them according to preset weights to obtain the degree of difference corresponding to each prototype, forming prototype distance data.

[0170] Step S42: Select the nearest prototype from the prototype distance data to obtain the optimal matching data;

[0171] In one embodiment, the system performs nearest-neighbor prototype matching on the current action segment based on prototype distance data. The system searches for the prototype with the smallest difference among all prototype distances and uses it as the initial optimal matching result, while recording the prototype identifier and its corresponding structural and distributional differences. The system compares the difference between the smallest and second-smallest differences to assess the discriminative power of the current matching result. When the difference is small, the system determines that there is uncertainty in the matching and adopts a candidate set strategy to construct a candidate set from several prototypes with small differences. The system sorts the candidate prototypes according to their frequency of occurrence in historical data and their stability over time, and selects the prototype with the highest stability as the matching result. The system outputs the prototype identifier obtained from the matching, the matching confidence / difference level, and information indicating whether there is ambiguity, forming the optimal matching data.

[0172] Step S43: Perform exponential mapping based on the optimal matching data to obtain behavioral familiarity data.

[0173] In one embodiment, the system performs familiarity mapping processing on the degree of difference between the current action segment and the behavioral prototype based on the optimal matching data. The system uses the minimum comprehensive distance as input and converts the distance into a behavioral familiarity value through exponential decay, maintaining a high level of familiarity when the difference is small and gradually decreasing familiarity as the difference increases. The system uses the matching distance distribution statistically obtained from the individual during the cold start phase to determine the mapping scale parameter, ensuring that the familiarity calculation conforms to the individual's behavioral characteristics and limiting the final result to a preset interval. When the optimal matching result contains an ambiguous marker, the system adjusts the confidence level of the familiarity value. Simultaneously, the corresponding matching prototype identifier and structural and distributional difference information are recorded as explanatory fields. The system outputs behavioral familiarity data.

[0174] Preferably, the brain-inspired reasoning processing specifically includes:

[0175] Novelty data is obtained by performing novelty mapping on behavioral familiarity data.

[0176] In one embodiment, the system transforms and represents the novelty of a behavior based on behavioral familiarity data. The system reads the familiarity value and generates a novelty index based on the inverse relationship between familiarity and novelty (one minus the normalized familiarity). When the familiarity is in a low range, the system classifies the behavior as a clearly new behavior and assigns it a high novelty; when the familiarity is in a high range, the system considers the behavior highly consistent with existing patterns and assigns it a low novelty; when the familiarity is in an intermediate range, the system calculates the corresponding novelty level according to a continuous variation rule, so that the novelty can smoothly reflect the degree of behavioral difference. The system smooths the novelty within a continuous time window, obtaining a stable novelty result by using the median novelty within the statistical window. The system retains the original novelty value and smoothing result, and records the corresponding confidence information (when the action segmentation is stable, the matching is unambiguous, and the novelty change within the window is small, it is marked as high confidence; if there is a low segmentation confidence, matching ambiguity, or large fluctuation in novelty, it is marked as low confidence. The segmentation confidence is determined when the signal within the interval is continuous and stable, there are few missing or abnormal situations, and there are obvious behavioral change characteristics near the interval boundary. The system can determine that the interval has high segmentation reliability and mark it as high segmentation confidence, and can give a preset numerical representation; conversely, if there are obvious data missing, signal saturation, or insignificant boundary changes within the interval, the segmentation result of the interval is considered to have low reliability and is marked as low segmentation confidence, and can give a preset numerical representation), forming behavioral novelty data.

[0177] Based on the novelty of the behavior data, context-gated weighting is performed to obtain the gated evidence strength data;

[0178] In one embodiment, the system performs context-gated weighted processing on abnormal behavior evidence based on behavioral novelty data and context information corresponding to the current action segment. The system retrieves the corresponding context gating coefficient from the context gating rule table based on the context index of the current action segment, and simultaneously reads the stability index of the behavioral prototype under that context from individual baseline data. The system calculates the behavioral novelty, context gating coefficient, and prototype stability to amplify small behavioral deviations in contexts with stable behavioral patterns, while appropriately suppressing deviations in contexts with large behavioral fluctuations. If the current action segment has low confidence or ambiguous matching results during segmentation, the system attenuates the evidence strength through a reliability adjustment coefficient. The system outputs the gated evidence strength value, along with the corresponding gating coefficient, stability index, and reliability information, forming gated evidence strength data.

[0179] Based on the gated evidence strength data, evidence events are generated and processed to obtain abnormal evidence event data;

[0180] In one embodiment, the system processes abnormal behavior evidence as events based on gated evidence strength data. The system continuously monitors the evidence strength level. When the evidence strength reaches a preset trigger level or the cumulative duration reaches a set threshold within a series of consecutive action segments, the system marks that position as the start of an abnormal evidence event. When the evidence strength drops to a lower level within consecutive segments and persists for a preset duration, the corresponding position is marked as the end of the event, thus forming an event interval. The system statistically analyzes the changes in evidence strength within the event interval, extracting indicators such as peak strength, average strength, duration, and frequency of occurrence, and determines the corresponding behavior type by combining this with the action category or prototype identifier attached to the action segments. When the time interval between two adjacent events is short and the behavior type is consistent, the system merges them into the same event and updates the statistical information. The system outputs the processed abnormal evidence event records, forming abnormal evidence event data.

[0181] Brain-inspired symptom node mapping is performed on anomalous evidence event data to obtain symptom evidence data.

[0182] In one embodiment, the system performs symptom node mapping processing on behavioral abnormalities based on abnormal evidence event data. The system pre-establishes mapping rules between evidence events and symptom nodes. These rules, based on information such as action type, occurrence context, and event duration characteristics, map different types of abnormal behavior to corresponding symptom node sets. For example, a high-frequency head swaying accompanied by a prolonged abnormal movement can be mapped to a neurological excitation symptom node; a behavioral pattern of reduced activity and prolonged stay in a lying position can be mapped to a weakness or decreased activity symptom node. For each abnormal evidence event, the system calculates its contribution to the relevant symptom node based on the event's average intensity, frequency of occurrence, and sensitivity to the current context, and writes this contribution value into the corresponding symptom node. When multiple evidence events simultaneously point to the same symptom node, the system accumulates their contribution values ​​and sets an upper limit to prevent a single symptom from being overemphasized. The system outputs the contribution value change sequence corresponding to each symptom node and node identification information, thereby forming symptom evidence data.

[0183] Load the state hypothesis graph onto the symptom evidence data to obtain the state hypothesis graph data;

[0184] In one embodiment, the system loads a state hypothesis graph from a pre-stored knowledge structure. This graph structure includes symptom nodes, state nodes, and association weights between nodes, where state nodes represent different types of health risk states. After loading, the system maps symptom evidence data to the corresponding symptom nodes and uses them as the initial activation values ​​of the nodes; for symptom nodes that are not triggered, their initial values ​​are set to zero. The system performs uniform normalization on the activation values ​​of all symptom nodes to keep them within a comparable range. The system reads pre-defined relational constraint information between state nodes, including mutual exclusion and co-occurrence relationships, and uses them as control parameters in subsequent inference processes. The system outputs the state hypothesis graph structure data after evidence injection and parameter loading, forming the state hypothesis graph data.

[0185] Evidence propagation reasoning was performed on the state hypothesis diagram data to obtain livestock and poultry state hypothesis data.

[0186] In one embodiment, the system performs evidence propagation and reasoning processing based on state hypothesis graph data. The system propagates the activation values ​​of symptom nodes step-by-step according to the relationships between nodes in the graph structure, passing them to connected state nodes and accumulating them. Simultaneously, a decay process is applied to the activation values ​​of state nodes during each propagation step to avoid imbalance caused by long-term accumulation. After several rounds of propagation, the system obtains the scores of each state node. The system performs competition suppression processing based on preset mutual exclusion relationships between state nodes, retaining only the higher-scoring state node for mutually exclusive nodes and weakening the score of the other node. Finally, the system compares the scores of each state node with preset triggering criteria. When the highest score meets the triggering condition, the corresponding state is output as the livestock / poultry state hypothesis, and the symptom node with the highest contribution is given as the evidence chain. If the triggering condition is not met, the observed state is output and relevant evidence summaries are recorded, thus obtaining the livestock / poultry state hypothesis data.

[0187] Preferably, this application also provides a livestock and poultry health status identification system based on brain-inspired reasoning, used to execute the livestock and poultry health status identification method based on brain-inspired reasoning as described above, the livestock and poultry health status identification system based on brain-inspired reasoning includes:

[0188] The action segmentation module is used to acquire behavior segment data; and to segment actions based on the behavior segment data to obtain action segmentation data.

[0189] The individualized feature encoding and scenario modeling module is used to encode individual features based on action segmentation data to obtain individual feature data; and to construct scenarios from the individual feature data to obtain individual scenario data.

[0190] The context memory construction and prototype aggregation module is used to write context memories into individual feature data and individual context data to obtain individual memory data; and to perform prototype aggregation processing based on individual memory data to obtain individual baseline data.

[0191] The familiarity assessment and brain-inspired reasoning module is used to calculate the familiarity of action segmentation data and individual baseline data to obtain behavioral familiarity data; based on the behavioral familiarity data, brain-inspired reasoning is performed to obtain livestock and poultry state hypothesis data.

Claims

1. A method for identifying the health status of livestock and poultry based on brain-inspired reasoning, characterized in that, Includes the following steps: Step S1: Obtain action segment data; perform action activation segmentation based on the action segment data to obtain first action segmentation data; perform self-similar potential field action segmentation based on the action segment data to obtain second action segmentation data; extract frequency domain similarity features from the first action segmentation data and the second action segmentation data to obtain frequency domain similarity feature data. Based on the frequency domain similarity feature data, the first action segmentation data and the second action segmentation data are filtered to obtain action segmentation data; Step S2: Based on the action segmentation data, perform individual feature encoding and scenario construction to obtain individual feature data and individual scenario data, respectively; Step S3: Write the individual characteristic data and individual context data into the context memory to obtain individual memory data; calculate the structure density within the context based on the individual memory data to obtain density distribution data; generate the initial prototype based on the density distribution data to obtain initial prototype data. Based on the initial prototype data, cross-time stability verification is performed to obtain individual baseline data; Step S4: Perform dual-channel distance calculation on the action segmentation data and individual baseline data to obtain prototype distance data. The dual-channel distance calculation includes structural evolution channel distance calculation and distribution offset channel distance calculation. Perform nearest neighbor prototype selection on the prototype distance data to obtain optimal matching data. Perform exponential mapping based on the optimal matching data to obtain behavioral familiarity data. Perform brain-inspired reasoning processing based on the behavioral familiarity data to obtain livestock and poultry state hypothesis data. The specific action activation segmentation is as follows: Behavioral mutation feature representation is performed on behavioral fragment data to obtain behavioral mutation feature data; cold start quantile statistics are performed on behavioral mutation feature data to obtain individual activation threshold data; scenario gating mapping is performed on behavioral fragment data to obtain scenario gating data; activation function is constructed based on scenario gating data and individual activation threshold data to obtain action activation probability data; behavioral fragment data is segmented based on action activation probability data to obtain first action segmentation data. The behavior segmentation of the self-similar potential field is specifically as follows: Feature embedding mapping is performed on the behavioral fragment data to obtain embedded sequence data; self-similar matrix is ​​constructed on the embedded sequence data to obtain self-similar matrix data; potential field transformation is performed on the self-similar matrix data to obtain self-similar potential field data; breakpoints are selected on the self-similar potential field data to obtain potential energy breakpoint data; boundary constraints are applied to the potential energy breakpoint data based on the potential energy breakpoint data to obtain the second action segmentation data.

2. The method according to claim 1, characterized in that, Frequency domain similarity feature extraction specifically involves: The segmented data of the first action and the segmented data of the second action are aligned to obtain the interval-aligned data. Spectrum construction is performed on the interval-aligned data to obtain dual-domain spectrum data; Individual frequency band data is obtained by dividing the dual-domain spectrum data into individual frequency bands; Frequency domain features are extracted from individual frequency band data to obtain frequency domain feature data; Cross-spectral consistency calculation is performed on frequency domain feature data to obtain coherent similarity data; Difference coding is performed based on frequency domain feature data and coherent similarity data to obtain frequency domain difference map data; Similarity structure aggregation is performed on the frequency domain difference map data to obtain frequency domain similarity feature data.

3. The method according to claim 1, characterized in that, Step S2 is as follows: Stable segments are selected based on the action segmentation data to obtain stable action segment data; Frequency domain coding and motion coordination feature extraction are performed on stable motion segment data to obtain frequency domain coded data and motion coordination feature data, respectively. Anchor points are selected based on frequency domain coding data and motion coordination feature data to obtain individual anchor point data; Individual feature data is obtained by prototype encoding based on individual anchor data; Context state data is obtained by extracting context state data based on action segmentation data; Scenario transition diagrams are constructed based on scenario status data to obtain scenario transition diagram data; The scenario transition map data is processed into scenario stages to obtain individual scenario data.

4. The method according to claim 1, characterized in that, Step S3 is as follows: Context matching is performed on individual characteristic data and individual context data to obtain context matching data; Memory similarity data is obtained by calculating memory similarity based on individual characteristic data and context matching data. Write-gating judgment is applied to memory similarity data to obtain individual memory data; Contextual structure density is calculated based on individual memory data to obtain density distribution data; Initial prototype data is generated based on density distribution data. Based on the initial prototype data, cross-time stability verification is performed to obtain individual baseline data.

5. The method according to claim 1, characterized in that, Brain-inspired reasoning processing specifically involves: Novelty data is obtained by performing novelty mapping on behavioral familiarity data. Based on the novelty of the behavior data, context-gated weighting is performed to obtain the gated evidence strength data; Based on the gated evidence strength data, evidence events are generated and processed to obtain abnormal evidence event data; Brain-inspired symptom node mapping is performed on anomalous evidence event data to obtain symptom evidence data. Load the state hypothesis graph onto the symptom evidence data to obtain the state hypothesis graph data; Evidence propagation reasoning was performed on the state hypothesis diagram data to obtain livestock and poultry state hypothesis data.

6. A livestock and poultry health status identification system based on brain-inspired reasoning, characterized in that, For executing the livestock and poultry health status identification method based on brain-inspired reasoning as described in claim 1, the livestock and poultry health status identification system based on brain-inspired reasoning includes: The action segmentation module is used to acquire behavior segment data; and to segment actions based on the behavior segment data to obtain action segmentation data. The individualized feature encoding and scenario modeling module is used to encode individual features based on action segmentation data to obtain individual feature data; and to construct scenarios from the individual feature data to obtain individual scenario data. The context memory construction and prototype aggregation module is used to write context memories into individual feature data and individual context data to obtain individual memory data; and to perform prototype aggregation processing based on individual memory data to obtain individual baseline data. The familiarity assessment and brain-inspired reasoning module is used to calculate the familiarity of action segmentation data and individual baseline data to obtain behavioral familiarity data; based on the behavioral familiarity data, brain-inspired reasoning is performed to obtain livestock and poultry state hypothesis data.