An animal behavior abnormal pattern recognition method, system, device and medium
By constructing multimodal behavioral feature vectors and Gaussian mixture models, the problem of the inability to capture multimodal collaborative anomalies in existing technologies is solved, enabling accurate identification and standardized measurement of animal behavioral anomalies, reducing the false negative rate, and improving the adaptability and accuracy of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG NORMAL UNIVERSITY
- Filing Date
- 2026-01-31
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies, when identifying abnormal animal behavior caused by precursors of geological disasters, are unable to capture coordinated anomalies in multimodal behaviors, resulting in high false negative and false positive rates. Furthermore, they lack the ability to express complex behavioral patterns, rely on unrealistic abnormal samples, and lack standardized anomaly metrics.
An unsupervised learning method is adopted to construct multimodal behavioral feature vectors, use a Gaussian mixture model to learn the probability distribution of normal animal behavior, calculate the log-likelihood probability and normalize it to generate a standardized abnormality index.
It achieves accurate capture of multimodal collaborative anomalies, reduces the false negative rate, improves the adaptability and accuracy of the model, and outputs standardized anomaly indices to facilitate integration with upper-level decision-making systems.
Smart Images

Figure CN122176753A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of animal behavior and pattern recognition technology, and in particular to a method, system, device and medium for recognizing abnormal patterns of animal behavior. Background Technology
[0002] The development of quantitative analysis techniques for animal behavior has roughly gone through three stages: Phase One: Manual Observation and Qualitative Description. This forms the foundation of traditional animal behaviorology, relying on researchers' field observations, recordings, and subjective interpretations. The results of this phase are mostly descriptive and difficult to analyze on a large scale using automated methods.
[0003] The second stage: Quantitative recording using single-modal sensors. With the development of GPS, accelerometers, infrared cameras, and bioacoustic recording technologies, researchers have begun to be able to objectively and continuously quantify a specific dimension of animal behavior. For example, GPS data can be used to analyze an animal's activity range, or acceleration data can be used to distinguish between basic states such as running and standing still. This marks the beginning of a data-driven era for animal behavior analysis.
[0004] Phase Three: Pattern Mining Based on Machine Learning. As the amount of data collected by sensors increases, researchers have begun to apply machine learning algorithms to automatically discover hidden behavioral patterns within the data. Currently, the forefront of this field is focused on how to automatically and accurately identify indicative "abnormal" events that deviate from their usual behavioral patterns from complex, high-dimensional, and noisy sensor data.
[0005] In existing technologies, the main technical approaches for using machine learning to detect abnormal animal behavior are as follows: Existing technology 1: Rule engine method based on fixed thresholds: This is the simplest and most direct method. Its core idea is to set fixed thresholds for one or more behavioral indicators. For example, defining "daily activity radius exceeding 1000 meters" or "continuous running for more than 30 minutes" as abnormal. This method is widely used in electronic geofencing or simple activity monitoring.
[0006] Existing technology two: Unsupervised clustering methods based on single-modality data: These methods perform unsupervised learning on a specific data source. For example, using clustering algorithms like DBSCAN on GPS trajectory data alone, outliers that do not belong to any major activity cluster can be identified as spatial anomalies. Alternatively, clustering can be performed on acceleration data alone to identify rare activity patterns.
[0007] Existing technology three, a classification method based on supervised learning: Such methods require the pre-collection and manual labeling of a large number of "normal behavior" and "abnormal behavior" samples. Then, this labeled data is used to train a classifier (such as a support vector machine or a deep neural network). During runtime, this classifier can classify new behavioral data into one of two categories: "normal" or "abnormal."
[0008] Existing technologies have the following fundamental technical shortcomings when addressing the specific problem of "identifying abnormal animal behavior triggered by precursors of geological disasters": The existing technique cannot capture the coordinated anomalies of multimodal behavior. It is an "isolated" analysis method. However, true precursory anomalies are often the coordinated manifestations of multiple behavioral modalities. For example, "rapid migration in a specific direction (spatial anomaly)" accompanied by "continuous screaming (acoustic anomaly)" and "high-intensity running (activity anomaly)" is an extremely strong anomalous signal. Analyzing any single dimension in isolation will miss this coordinated information, leading to a high false negative rate.
[0009] The existing thresholds are insufficient for representing complex behavioral patterns. The fixed thresholds in existing techniques are too rigid and simplistic to describe the complexity and dynamism of animal behavior. For example, seasonal migration is normal in itself, but it is abnormal if it occurs at the wrong time of year. Simple threshold rules cannot capture such complex patterns that depend on "context," leading to a high false positive rate.
[0010] The reliance on "abnormal" samples renders the method impractical. The fatal weakness of existing technique three (supervised learning) lies in its requirement for a large number of labeled "abnormal" samples for training. However, in the real world, abnormal animal group events triggered by precursors to geological disasters are extremely rare. It is simply impossible to collect enough data to train a reliable supervised learning model. This "data scarcity" problem makes the supervised learning approach almost unfeasible in this application scenario.
[0011] There is a lack of standardized, quantifiable measures of outliers. Existing methods typically only provide a binary (yes / no) judgment or an isolated outlier score. They fail to output a standardized, probabilistically meaningful "outlier index" that can be compared and integrated across different modalities. This makes their analytical results difficult to utilize by higher-level decision-making systems.
[0012] In conclusion, there is an urgent need for a technical solution to identify abnormal animal behavior caused by precursors to geological disasters. Summary of the Invention
[0013] To address the aforementioned issues, this disclosure provides a method, system, device, and medium for identifying abnormal animal behavior patterns. It overcomes the technical shortcomings of existing methods for detecting abnormal animal behavior, such as relying on fixed thresholds, isolated analysis of single data modalities, or dependence on unrealistic abnormal samples. This provides a scientific, robust, and engineering-feasible new method for identifying abnormal animal behavior patterns based on unsupervised learning.
[0014] Firstly, a method for recognizing abnormal animal behavior patterns includes: Based on the collected data on normal animal behavior, a structured feature vector for machine learning processing is constructed to obtain a set of normal behavior feature vectors. Establish a baseline model of normal behavior and train it based on a set of normal behavior feature vectors to obtain a trained baseline model of normal behavior, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. Animal behavior data is collected in real time, a set of real-time feature vectors is generated, and the data is input into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. The log-likelihood probability is normalized to obtain the normalized log-likelihood probability, and animal behavior patterns are determined based on the normalized log-likelihood probability.
[0015] Furthermore, constructing structured feature vectors for machine learning processing includes: Spatial behavior feature extraction, dynamic behavior feature extraction, and acoustic behavior feature extraction.
[0016] Further, spatial behavior feature extraction includes: Based on the sequence of GPS / BeiDou positioning data points within a fixed time window, statistics describing animal space usage patterns are calculated, including: The activity range is used to characterize the minimum convex hull area formed by all positioning points within the time window; Movement rate, used to characterize average and maximum movement speed; Trajectory entropy is used to quantify the randomness and unpredictability of a trajectory. Steering angle variance is used to quantify the degree of change in the direction of movement.
[0017] Further, dynamic behavioral feature extraction includes: Based on triaxial accelerometer data within a fixed time window, statistics reflecting the intensity of animal activity and posture patterns are calculated, including: Dynamic total body acceleration, used to characterize an animal's energy expenditure, is obtained by smoothing and summing triaxial acceleration data; Energy spectrum features, used to distinguish animal activity patterns, are obtained by extracting the energy distribution in different frequency bands from the acceleration signal through a fast Fourier transform. Postural stability characteristics, including the tilt angle and roll angle of the animal's body, are used to characterize the animal's posture stability and are calculated using the gravitational acceleration component.
[0018] Further, acoustic behavior feature extraction includes: Based on microphone audio data within a fixed time window, parameters characterizing the acoustic properties of animal calls are calculated, specifically including: Mel frequency cepstral coefficients are used to characterize the timbre and rhythmic features of animal calls. They are obtained by calculating the mean and covariance matrix of the Mel frequency cepstral coefficient vector.
[0019] Furthermore, a structured feature vector is constructed for machine learning processing, resulting in a set of normal behavior feature vectors, including: All feature values are concatenated in a predetermined order to form a multimodal behavioral feature vector V; Each time window T generates a corresponding multimodal behavior feature vector V. By processing all time windows, a set of normal behavior feature vectors is obtained.
[0020] Furthermore, a baseline model of normal behavior is established and trained based on a set of normal behavior feature vectors, including: A Gaussian mixture model was used as the baseline model, and the expectation-maximization algorithm was used to train the Gaussian mixture model.
[0021] Furthermore, animal behavior data is collected in real time, generating a real-time feature vector set, which is then input into a trained normal behavior baseline model. The log-likelihood probability under the trained normal behavior baseline model is calculated, including: Using the same process as the normal behavior feature vector set, a real-time feature vector set is generated based on the collected animal behavior data; Calculate the log-likelihood probability of the real-time feature vector set under the trained normal behavior baseline model, which is used to measure the degree of deviation from the trained normal behavior baseline model.
[0022] Furthermore, the log-likelihood probability is normalized to obtain the normalized log-likelihood probability, which includes: Based on the empirical cumulative distribution function, the number likelihood probability is mapped to the standardized [0,1] interval to generate the normalized log-likelihood probability.
[0023] Furthermore, the log-likelihood probability is normalized to obtain the normalized log-likelihood probability, which includes: Input all the normal behavior feature vectors used for training into the trained normal behavior baseline model one by one, calculate the corresponding log-likelihood probability, and obtain the normal behavior log-likelihood probability set. Based on the set of log-likelihood probabilities of normal behavior, we construct its empirical cumulative distribution function ECDF(L), where L represents the log-likelihood probability. For the log-likelihood probability L_new calculated in real time, the normalized log-likelihood probability I_new = 1 -ECDF(L_new) is obtained.
[0024] Furthermore, judging animal behavior patterns based on normalized log-likelihood probability includes: The degree of abnormality in animal behavior can be determined by the magnitude of the normalized log-likelihood probability.
[0025] Secondly, an animal behavior abnormality pattern recognition system includes: The unit includes a normal behavior feature vector set construction unit, a normal behavior baseline model establishment unit, a log-likelihood probability calculation unit, and an animal behavior pattern judgment unit. The normal behavior feature vector set construction unit is based on the collected animal normal behavior data and is used to construct structured feature vectors for machine learning processing, resulting in a normal behavior feature vector set. The normal behavior baseline model building unit is used to build a normal behavior baseline model and train it based on the normal behavior feature vector set to obtain a trained normal behavior baseline model, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. The log-likelihood probability calculation unit is used to collect animal behavior data in real time, generate a set of real-time feature vectors, and input them into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. The animal behavior pattern judgment unit is used to normalize the log-likelihood probability to obtain the normalized log-likelihood probability, and to judge the animal behavior pattern based on the normalized log-likelihood probability.
[0026] Thirdly, an electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, which stores computer programs; When a processor executes a computer program stored in memory, it implements the above-described method for recognizing abnormal animal behavior patterns.
[0027] Fourthly, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the above-described method for recognizing abnormal animal behavior patterns.
[0028] This disclosure includes at least the following beneficial effects: This disclosure achieves accurate capture of multimodal collaborative anomalies, significantly reducing the false negative rate. It constructs a unified high-dimensional behavioral feature vector by fusing multiple behavioral modalities, including spatial, dynamic, and acoustic modalities, at the feature level. This enables the model to learn the intrinsic correlations between different behavioral dimensions. Therefore, when a "collaborative anomaly event" triggered by disaster precursors and exhibiting anomalies simultaneously across multiple dimensions occurs, its corresponding feature vector will significantly deviate from the normal behavioral cluster in the high-dimensional space, thus being captured by the model with extremely high sensitivity. This overcomes the shortcomings of existing technologies that rely on isolated analysis of a single modality, leading to information loss and high false negative rates.
[0029] This disclosure constructs a complex behavioral pattern representation based on a probabilistic generative model, greatly improving the model's adaptability and accuracy. Instead of using a rigid, fixed threshold, this disclosure employs a Gaussian mixture model, an equally probabilistic generative model, to describe the "normal behavior space." This enables the model to automatically learn and express various normal sub-patterns of animal behavior, such as foraging and resting, and their dynamic changes. This data-driven modeling approach better adapts to behavioral changes in different species, seasons, and environments, avoiding the high false alarm rate problem caused by the "one-size-fits-all" approach of traditional rule engines, making anomaly detection more scientific and accurate.
[0030] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description and the accompanying drawings. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of the identification method flow according to an embodiment of the present disclosure; Figure 2 This is a schematic diagram illustrating the principle of the identification method in the embodiments of this disclosure; Figure 3 This is a schematic diagram of the system architecture for an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the electronic device structure according to an embodiment of the present disclosure. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0034] like Figure 1 As shown, a method for recognizing abnormal animal behavior patterns includes: S101, Based on the collected data on normal animal behavior, construct structured feature vectors for machine learning processing to obtain a set of normal behavior feature vectors; S102, Establish a normal behavior baseline model and train it based on the normal behavior feature vector set to obtain the trained normal behavior baseline model, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. S103: Collect animal behavior data in real time, generate a set of real-time feature vectors, and input them into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. S104. Normalize the log-likelihood probability to obtain the normalized log-likelihood probability, and determine the animal behavior pattern based on the normalized log-likelihood probability.
[0035] The specific implementation details are as follows: The principle and process are as follows Figure 2 As shown, the offline baseline modeling stage: S101: Feature Engineering and Vectorization of Multimodal Time Series Data This step aims to transform heterogeneous raw data streams from different sensors into unified, structured feature vectors suitable for machine learning. This step first defines a fixed time window T (T = 10 minutes). Then, for the data within each time window, the following feature extraction is performed: Spatial behavioral feature extraction: Input: The sequence of GPS / BeiDou positioning data points within this time window.
[0036] Process: Calculate a set of statistics that can describe the animal's spatial use patterns, preferably including: Activity range: The minimum convex hull area formed by all positioning points within this time window.
[0037] Movement speed: Average and maximum movement speed.
[0038] Trajectory entropy: used to quantify the randomness and unpredictability of trajectories.
[0039] Steering angle variance: used to quantify the degree of change in the direction of movement.
[0040] Dynamic behavioral feature extraction: Input: Triaxial accelerometer data within this time window.
[0041] Processing: Calculate a set of statistics that reflect the intensity and posture patterns of animal activity, preferably including: Dynamic total body acceleration: Smoothing and summing the triaxial acceleration data yields an index that is highly correlated with the animal's energy expenditure.
[0042] Energy spectrum characteristics: Fast Fourier transform is performed on the acceleration signal to extract its energy distribution in different frequency bands, which can be used to distinguish different activity modes such as running, walking, and standing still.
[0043] Postural stability: The tilt angle and roll angle of the animal's body are calculated using the components of gravitational acceleration, and its stability is analyzed.
[0044] Acoustic behavior feature extraction: Input: Microphone audio data within this time window.
[0045] Processing: A set of parameters characterizing the acoustic properties of animal calls is calculated, preferably using Mel-frequency cepstral coefficients. Mel-frequency cepstral coefficients are an acoustic feature widely used in speech recognition that can effectively simulate human auditory perception. This disclosure captures the timbre and rhythmic features of animal calls over a period of time by calculating the mean and covariance matrix of the Mel-frequency cepstral coefficient vector.
[0046] Feature vector fusion: All feature values extracted from the three modalities are concatenated in a predetermined order to form a high-dimensional, unified multimodal behavioral feature vector V. A vector V is generated for each time window T. By processing a large amount of historical normal data, a feature vector set D_normal = {V_1,V_2, ..., V_n} is finally obtained for training.
[0047] S102: Unsupervised training of the baseline model of normal behavior: This step uses the "normal behavior" feature vector set D_normal generated in the previous step to train a probabilistic generation model to learn the probability distribution P(V) of normal behavior data in a high-dimensional feature space.
[0048] This disclosure preferably uses a Gaussian mixture model as the baseline model. The reason for choosing a Gaussian mixture model is as follows: Multimodal representation ability: Animal "normal" behavior is not a single pattern, but includes multiple sub-patterns such as "foraging", "resting", and "socializing". Gaussian mixture models can use multiple Gaussian distributions to fit these sub-patterns separately, thereby more precisely characterizing the complex structure of the entire normal behavior space.
[0049] Probabilistic output: Gaussian mixture models can provide the probability density of any new input vector belonging to the model, which lays the mathematical foundation for subsequent anomaly quantification.
[0050] Training process: The Gaussian mixture model was trained using the Expectation-Maximization (EM) algorithm. The EEM algorithm iteratively finds the Gaussian mixture model parameters (i.e., the mean, covariance, and weight of each Gaussian component) that maximize the probability of occurrence of the D_normal set. After training, a complete probabilistic model M_baseline representing the "normal behavior pattern" of the animal population is obtained.
[0051] S103, Online Real-Time Recognition Stage: This stage runs in real time on the front-end device or back-end server, processes the newly received sensor data, and outputs the final anomaly index.
[0052] Real-time behavioral feature extraction: This step performs the same feature engineering process as S11 on the real-time sensing data within the latest time window T to generate a real-time multimodal behavior feature vector V_new.
[0053] Anomaly likelihood calculation: The core of this step is to measure the extent to which the new behavior vector V_new deviates from the established normal behavior baseline model M_baseline.
[0054] Calculation process: Input V_new into the trained GMM model M_baseline and calculate its log-likelihood under the model: L_new = log(P(V_new | M_baseline)).
[0055] The log-likelihood value L_new is an unprocessed raw anomaly score. The smaller the value, the lower the probability that V_new was generated by the "normal" model, and the more suspicious and abnormal its behavior is.
[0056] S104, Normalized outlier index generation: To obtain a more intuitive and universal metric, this step maps the original log-likelihood score L_new to a standardized [0,1] interval, generating the final "anomaly index I_new".
[0057] This disclosure provides a preferred normalization method: normalization based on the empirical cumulative distribution function.
[0058] Pre-computation: In the offline phase, all normal behavior feature vectors D_normal used for training are input into the model M_baseline one by one, and their respective log-likelihood scores are calculated to obtain a set of "normal scores" {L_1,L_2, ..., L_n}.
[0059] Establish the distribution: Based on this set of "normal scores", construct its empirical cumulative distribution function ECDF(L). This function represents what percentage of scores are less than or equal to L among all normal behaviors.
[0060] Real-time mapping: For a new score L_new calculated in real time, its anomaly index I_new is defined as: I_new = 1 - ECDF(L_new) The anomaly index I_new has clear statistical significance: The closer the value of I_new is to 1, the rarer and more unusual the behavior is.
[0061] For example, I_new = 0.99 means that the currently observed behavior is rarer than 99% of normal behavior in history.
[0062] The final output anomaly index I_new can be used as the result of this method and provided to the upper-level early warning decision system for further fusion analysis.
[0063] This method utilizes readily available, large-scale data of normal behavior for training, completely avoiding reliance on extremely rare and difficult-to-obtain real-world anomaly samples triggered by disaster precursors. This overcomes the "data scarcity" bottleneck faced by traditional supervised learning methods in this application scenario, enabling the method to be conveniently and economically deployed to any new monitoring area, demonstrating strong engineering practicality and scalability.
[0064] This disclosure outputs a standardized anomaly index with clear statistical significance, achieving seamless integration with the upper-level decision-making system. Through a normalization method based on the empirical cumulative distribution function, this disclosure ultimately outputs a standardized anomaly index within the [0,1] interval. This standardized output shields the complexity of the underlying algorithm, providing a stable, reliable, and easy-to-use input for upper-level multi-source data fusion models such as Bayesian networks. It is a crucial link in realizing the "end-to-end" intelligence of the entire collaborative early warning system.
[0065] like Figure 3 As shown, an animal behavior abnormality pattern recognition system includes: The unit includes a normal behavior feature vector set construction unit 301, a normal behavior baseline model establishment unit 302, a log-likelihood probability calculation unit 303, and an animal behavior pattern judgment unit 304. The normal behavior feature vector set construction unit 301 is used to construct structured feature vectors for machine learning processing based on the collected normal behavior data of animals, thereby obtaining a normal behavior feature vector set. The normal behavior baseline model establishment unit 302 is used to establish a normal behavior baseline model and train it based on the normal behavior feature vector set to obtain a trained normal behavior baseline model, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. The log-likelihood probability calculation unit 303 is used to collect animal behavior data in real time, generate a set of real-time feature vectors, and input them into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. The animal behavior pattern judgment unit 304 is used to normalize the log-likelihood probability to obtain the normalized log-likelihood probability, and to judge the animal behavior pattern based on the normalized log-likelihood probability.
[0066] Phase 1: Offline Baseline Modeling. This phase utilizes historically acquired multimodal sensor data streams, performing feature engineering and vectorization to generate a normal behavior feature vector set. Subsequently, this vector set is trained through unsupervised instruction to ultimately construct the normal behavior baseline model (M_baseline).
[0067] The second stage: Online real-time identification. This stage processes real-time multimodal sensing data streams. First, a real-time behavioral feature vector (V_new) is generated through real-time feature extraction. Then, in anomaly likelihood calculation, this real-time vector is compared with a pre-trained baseline model to calculate an original anomaly score (L_new). Finally, normalization maps this original score to a standardized anomaly index (I_new) as the final output.
[0068] This disclosure establishes a mathematical framework that can fuse and jointly analyze various heterogeneous sensor data (such as spatial, activity, acoustic, etc.) at the feature level.
[0069] This disclosure employs an unsupervised learning approach, utilizing only readily available "normal" behavioral data, to construct a baseline model that probabilistically describes the "normal behavior pattern space".
[0070] This disclosure provides a method for scientifically measuring the degree to which any new behavioral pattern deviates from the "normal space" and outputting a standardized "abnormality index" in the [0,1] interval with clear statistical significance.
[0071] This disclosure ensures that the entire identification process does not require manual setting of complex rules, does not rely on rare abnormal samples, and its output can be easily integrated and used by other systems.
[0072] like Figure 4 As shown, this disclosure provides an electronic device, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404. Memory 403 stores computer programs; The processor 401 implements the above method when executing a computer program stored in the memory 403.
[0073] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0074] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0075] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0076] The specific embodiments of this disclosure will be further described below with reference to the accompanying drawings. It should be noted that these descriptions of embodiments are intended to aid in understanding this disclosure, but do not constitute a limitation thereof: like Figure 2 As shown in Example 1: Application of Gaussian mixture model for anomaly detection in alpine marmot populations. This embodiment uses the monitoring of a marmot population as an example to illustrate the specific application of this disclosure.
[0077] Data Acquisition and Preprocessing: Subject: Fitting collars with integrated GPS, three-axis accelerometers and microphones onto 50 adult marmots.
[0078] Data period: 3 months of "normal" data were collected continuously, with sampling frequencies of: GPS - 1 time / minute, accelerometer - 10Hz, and audio - 8kHz.
[0079] Time window: Set the feature extraction time window T to 10 minutes.
[0080] Feature engineering (S11): Spatial characteristics: Calculate the activity range (square meters) and average speed (meters / second) within 10 minutes.
[0081] Dynamic characteristics: Calculate the ODBA value within 10 minutes, as well as the energy proportion of the acceleration signal in the 0.5-2Hz (walking / foraging) and 2-5Hz (running / fighting) frequency bands.
[0082] Acoustic characteristics: Calculate the mean vector of 13-dimensional Mel frequency cepstral coefficients of audio over a 10-minute period.
[0083] Vectorization: The above features are concatenated into an 18-dimensional behavioral feature vector V. The data from the three months generated approximately 650,000 normal behavioral feature vectors, forming the training set D_normal.
[0084] Baseline modeling (S12): Model selection: Gaussian mixture model is selected.
[0085] Parameter setting: The optimal number of Gaussian components K=8 is determined by the Bayesian information criterion, which represents that the marmot population has 8 main normal behavioral patterns, including deep sleep, light sleep, burrowing activity, foraging, socializing, and sunbathing.
[0086] Training: The expectation-maximization algorithm was used to train 50,000 samples to obtain the baseline model M_baseline.
[0087] Real-time recognition (S21-S23): One day, the system received a new 10-minute data window and extracted the real-time feature vector V_new.
[0088] Calculate its log-likelihood probability L_new = -250.6.
[0089] Mapping is performed using a pre-built ECDF function, ECDF(-250.6) = 0.005.
[0090] The final output anomaly index I_new = 1 - 0.005 = 0.995. This index indicates that the current behavior is rarer than 99.5% of historical normal behavior, constituting a strong anomalous signal.
[0091] Example 2: Variant Implementation Based on Depth Autoencoder This embodiment describes another technical implementation of the method disclosed herein, the core of which is to use a deep learning model to construct a baseline model, which is particularly suitable for processing higher-dimensional and more complex feature spaces.
[0092] This embodiment uses the exact same dataset and feature engineering (S11) results as Embodiment 1. The main difference lies in the subsequent steps: Limit modeling (S12): Model Structure: A variational autoencoder neural network consisting of an encoder and a decoder is constructed. The encoder consists of three fully connected layers that compress the 18-dimensional input feature vector into a 2-dimensional latent space; the decoder also consists of three fully connected layers and is responsible for reconstructing the original 18-dimensional features from the 2-dimensional latent vector.
[0093] Training process: The autoencoder is trained using the same feature vector set D_normal as in Case 1, with the objective function being to minimize the reconstruction error and KL divergence.
[0094] To enable those skilled in the art to implement it, the specific network structure and training process of the variational autoencoder in this embodiment are further detailed below: Network structure: This variational autoencoder model consists of an encoder and a decoder, both of which are composed of fully connected layers.
[0095] (1) Encoder: Input layer: Receives an 18-dimensional behavioral feature vector V.
[0096] Hidden layer 1: Fully connected layer with 12 neurons, using the Rectified Linear Unit (ReLU) as the activation function.
[0097] Hidden layer 2: Fully connected layer with 6 neurons, also using the ReLU activation function.
[0098] Latent Space Layer: The output layer of the encoder. It consists of two parallel fully connected layers, each with 2 neurons (here, the latent space dimension is set to 2). One layer outputs the mean vector (μ) of the latent distribution, and the other layer outputs the log-variance vector (log σ²) of the latent distribution. No activation function is used (or linear activation is used).
[0099] (2) Decoder: Input layer: Samples from a normal distribution consisting of mean (μ) and logarithmic variance (log σ²) to obtain a 2-dimensional latent vector z.
[0100] Hidden layer 1: Fully connected layer with 6 neurons, using the ReLU activation function.
[0101] Hidden layer 2: Fully connected layer with 12 neurons, using the ReLU activation function.
[0102] Output layer: Fully connected layer with 18 neurons, using a linear activation function to reconstruct an 18-dimensional feature vector V' with the same dimensions as the original input.
[0103] Training process: (1) Objective function: The goal of training is to minimize a composite loss function L_total, which consists of two parts: Reconstruction loss L_recon: Used to measure the difference between the input vector V and the reconstructed vector V'. In this embodiment, mean squared error is used for calculation.
[0104] KL divergence loss L_KL: As a regularization term, it measures the difference between the latent distribution generated by the encoder and the standard normal distribution, preventing the model from overfitting.
[0105] Total loss: L_total = L_recon + β * L_KL, where β is a weight hyperparameter, which can be set to 1 in this embodiment.
[0106] (2) Optimizer and hyperparameters: Optimizer: Adam optimizer is used.
[0107] Learning rate: set to 0.001.
[0108] Batch size: The training set D_normal is divided into multiple batches for training, with each batch containing 64 feature vectors.
[0109] Training cycle: 100 complete iterations of training on the entire training set.
[0110] (3) Iterative convergence: In each training cycle, the model traverses all data batches. For each batch of data, the total loss L_total is calculated, and the gradient of the loss function with respect to the network weights is calculated using the backpropagation algorithm. Finally, the Adam optimizer updates the network weights based on the gradient. At the same time, the loss value of the model on the independent validation set is monitored. When the validation loss no longer decreases significantly for several consecutive cycles, the model can be considered to have converged. At this time, the model parameters are saved as the final baseline model M_baseline.
[0111] Real-time recognition (S22-S23): Anomaly Measurement: When a new real-time behavior vector V_new is input, it is passed through a trained VAE model to obtain its reconstructed vector V'_new. Then, the reconstruction error between the two is calculated, for example, the mean squared error (MSE), as the original anomaly score. In this embodiment, an example score MSE(V_new, V'_new) = 0.87 is obtained.
[0112] Normalization: An empirical cumulative distribution function is established by analyzing the reconstruction error of all normal samples in the training set. The MSE value of 0.87 calculated in real time is substituted into the empirical cumulative distribution function for normalization to obtain the final anomaly index.
[0113] This embodiment protects a more advanced technical variant of the core idea of this disclosure, extending the scope of protection from traditional probabilistic models to the field of deep learning, thereby enhancing the technical advancement and defensive breadth of this patent.
[0114] Example 3: Simplified Implementation for Specific Behavioral Modal This embodiment describes a simplified application of the method disclosed herein to a low-power, GPS-only rosy starling migration tracker.
[0115] Feature engineering (S11): Available data: GPS location data only.
[0116] Time window: Due to the large range of activity of the rosy starling, the time window T is set to 1 hour.
[0117] Feature extraction: In this embodiment, this step only performs spatial behavior feature extraction, such as calculating the flight distance, average speed, turning angle variance, number of stopping points, etc. within 1 hour, to form a 4-dimensional behavior feature vector.
[0118] Subsequent steps (S12-S23): The subsequent baseline modeling, anomaly measurement, and normalization processes are exactly the same as in Example 1, except that they are performed in a 4-dimensional feature space with reduced dimensionality.
[0119] This method can effectively identify abnormal behaviors of rosy starlings during migration, such as deviating from normal migration corridors, starting migration too early or too late, and staying in abnormal locations for extended periods.
[0120] This embodiment aims to protect the modularity and scalability of the core method of this disclosure. It explicitly states that the core idea of this disclosure—namely, "multimodal feature fusion + unsupervised probabilistic modeling + standardized exponential output"—is not limited to a specific combination of sensors. The methodology remains valid even if one or more modalities are reduced.
[0121] The core premise of this disclosure is to transform sensor data with different physical properties, such as spatial, motion, and acoustic data, into a unified high-dimensional mathematical vector through feature engineering. This is the foundation for realizing "cooperative anomaly" analysis and a key step that distinguishes it from existing single-modal analysis techniques.
[0122] Probabilistic Modeling of "Normal" Patterns Based on Unsupervised Learning: The core algorithmic idea of this disclosure is "learning the normal state and identifying anomalies." Through unsupervised models such as Gaussian mixture models or the expectation-maximization algorithm, a "normal behavior space" is scientifically and probabilistically defined from a data-driven perspective, rather than relying on subjective or rigid rules.
[0123] Probabilistic Measurement and Standardized Output of Anomalies: This disclosure goes beyond simply providing a "yes / no" judgment. Instead, it calculates the likelihood probability or reconstruction error and normalizes it using an empirical cumulative distribution function, ultimately outputting a standardized anomaly index with clear statistical significance. This is key to modularizing the algorithm and enabling seamless integration with upper-level systems.
[0124] This method includes the following steps: Acquire sensor data streams reflecting animal behavior from at least two different modalities; Within a preset time window, behavioral features are extracted from the data stream of each modality, and the features are fused into a multimodal behavioral feature vector; Based on the historically acquired feature vectors representing normal behavior, a baseline model of normal behavior is trained through unsupervised learning. This model is able to characterize the probability distribution of the feature vectors of normal behavior. The real-time acquired multimodal behavioral feature vectors are input into the baseline model to calculate an anomaly score that measures the degree to which they deviate from the probability distribution. The anomaly scores are normalized to generate a standardized anomaly index.
[0125] At least two modalities are included: spatial behavior modality and dynamic behavior modality.
[0126] At least two modalities also include acoustic behavior modalities.
[0127] The baseline model for normal behavior is a Gaussian mixture model.
[0128] The outlier score is the log-likelihood probability calculated based on the Gaussian mixture model.
[0129] The baseline model for normal behavior is an autoencoder neural network.
[0130] The anomaly score is the reconstruction error calculated based on the autoencoder.
[0131] The normalization step is performed based on an empirical cumulative distribution function composed of anomalous scores of historical normal behavior.
[0132] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A method for recognizing abnormal animal behavior patterns, characterized in that, include: Based on the collected data on normal animal behavior, a structured feature vector for machine learning processing is constructed to obtain a set of normal behavior feature vectors. Establish a baseline model of normal behavior and train it based on a set of normal behavior feature vectors to obtain a trained baseline model of normal behavior, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. Animal behavior data is collected in real time, a set of real-time feature vectors is generated, and the data is input into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. The log-likelihood probability is normalized to obtain the normalized log-likelihood probability, and animal behavior patterns are determined based on the normalized log-likelihood probability.
2. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Constructing structured feature vectors for machine learning processing includes: Spatial behavior feature extraction, dynamic behavior feature extraction, and acoustic behavior feature extraction.
3. The method for recognizing abnormal animal behavior patterns according to claim 2, characterized in that, Spatial behavioral feature extraction, including: Based on the sequence of GPS / BeiDou positioning data points within a fixed time window, statistics describing animal space usage patterns are calculated, including: The activity range is used to characterize the minimum convex hull area formed by all positioning points within the time window; Movement rate, used to characterize average and maximum movement speed; Trajectory entropy is used to quantify the randomness and unpredictability of a trajectory. Steering angle variance is used to quantify the degree of change in the direction of movement.
4. The method for recognizing abnormal animal behavior patterns according to claim 2, characterized in that, Dynamic behavioral feature extraction, including: Based on triaxial accelerometer data within a fixed time window, statistics reflecting the intensity of animal activity and posture patterns are calculated, including: Dynamic total body acceleration, used to characterize an animal's energy expenditure, is obtained by smoothing and summing triaxial acceleration data; Energy spectrum features, used to distinguish animal activity patterns, are obtained by extracting the energy distribution in different frequency bands from the acceleration signal through a fast Fourier transform. Postural stability characteristics, including the tilt angle and roll angle of the animal's body, are used to characterize the animal's posture stability and are calculated using the gravitational acceleration component.
5. The method for recognizing abnormal animal behavior patterns according to claim 2, characterized in that, Acoustic behavior feature extraction, including: Based on microphone audio data within a fixed time window, parameters characterizing the acoustic properties of animal calls are calculated, specifically including: Mel frequency cepstral coefficients are used to characterize the timbre and rhythmic features of animal calls. They are obtained by calculating the mean and covariance matrix of the Mel frequency cepstral coefficient vector.
6. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Construct structured feature vectors for machine learning processing to obtain a set of normal behavior feature vectors, including: All feature values are concatenated in a predetermined order to form a multimodal behavioral feature vector V; Each time window T generates a corresponding multimodal behavior feature vector V. By processing all time windows, a set of normal behavior feature vectors is obtained.
7. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Establish a baseline model of normal behavior and train it based on a set of normal behavior feature vectors, including: A Gaussian mixture model was used as the baseline model, and the expectation-maximization algorithm was used to train the Gaussian mixture model.
8. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Animal behavior data is collected in real time, generating a real-time feature vector set, which is then input into a trained baseline model of normal behavior. The log-likelihood probability under the trained baseline model of normal behavior is calculated, including: Using the same process as the normal behavior feature vector set, a real-time feature vector set is generated based on the collected animal behavior data; Calculate the log-likelihood probability of the real-time feature vector set under the trained normal behavior baseline model, which is used to measure the degree of deviation from the trained normal behavior baseline model.
9. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Normalizing the log-likelihood probability yields the normalized log-likelihood probability, which includes: Based on the empirical cumulative distribution function, the number likelihood probability is mapped to the standardized [0,1] interval to generate the normalized log-likelihood probability.
10. The method for recognizing abnormal animal behavior patterns according to claim 9, characterized in that, Normalizing the log-likelihood probability yields the normalized log-likelihood probability, which includes: Input all the normal behavior feature vectors used for training into the trained normal behavior baseline model one by one, calculate the corresponding log-likelihood probability, and obtain the normal behavior log-likelihood probability set. Based on the set of log-likelihood probabilities of normal behavior, we construct its empirical cumulative distribution function ECDF(L), where L represents the log-likelihood probability. For the log-likelihood probability L_new calculated in real time, the normalized log-likelihood probability I_new = 1 - ECDF(L_new) is obtained.
11. The method for recognizing abnormal animal behavior patterns according to claim 1, characterized in that, Determining animal behavior patterns based on normalized log-likelihood probability includes: The degree of abnormality in animal behavior can be determined by the magnitude of the normalized log-likelihood probability.
12. A system for recognizing abnormal animal behavior patterns, characterized in that, include: The unit includes a normal behavior feature vector set construction unit, a normal behavior baseline model establishment unit, a log-likelihood probability calculation unit, and an animal behavior pattern judgment unit. The normal behavior feature vector set construction unit is based on the collected animal normal behavior data and is used to construct structured feature vectors for machine learning processing, resulting in a normal behavior feature vector set. The normal behavior baseline model building unit is used to build a normal behavior baseline model and train it based on the normal behavior feature vector set to obtain a trained normal behavior baseline model, so as to learn the probability distribution of animal normal behavior data in a high-dimensional feature space. The log-likelihood probability calculation unit is used to collect animal behavior data in real time, generate a set of real-time feature vectors, and input them into a trained normal behavior baseline model to calculate the log-likelihood probability under the trained normal behavior baseline model. The animal behavior pattern judgment unit is used to normalize the log-likelihood probability to obtain the normalized log-likelihood probability, and to judge the animal behavior pattern based on the normalized log-likelihood probability.
13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, which stores computer programs; A processor, when executing a computer program stored in a memory, implements the animal behavior abnormality pattern recognition method according to any one of claims 1-11.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for identifying abnormal animal behavior patterns according to any one of claims 1-11.