Big data-based pet behavior data management system and method

By employing techniques such as time synchronization, hidden Markov models, and multi-scale sliding windows, the problems of clock deviation and individual differences in pet behavior data management have been solved, achieving high-precision pet behavior management and anomaly monitoring, and improving the system's adaptability and reliability.

CN121765587APending Publication Date: 2026-03-31SHENZHEN MAXUSTECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies for pet behavior data management suffer from problems such as clock deviations in data from multiple devices, data misalignment, difficulty in extracting behavioral features, lack of modeling of individual differences, and high false alarm rates in anomaly detection. They also lack a systematic mechanism for constructing behavior blocks and the utilization of big data across pet groups.

Method used

By using time synchronization and temporal reconstruction, hidden Markov models to segment behavioral events, multi-scale sliding window modeling of individual baselines, hierarchical clustering to generate population templates, and ensemble classifiers for anomaly monitoring, unified access and personalized analysis of multimodal data can be achieved.

Benefits of technology

It enables high-precision management of cross-device, multimodal pet behavior data, reduces the rate of missed anomalies and false alarms, improves the reliability and adaptability of behavior analysis, and reduces the energy consumption of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121765587A_ABST
    Figure CN121765587A_ABST
Patent Text Reader

Abstract

The invention discloses a pet behavior data management system and method based on big data, and relates to the technical field of pet behavior intelligent monitoring. Performing time synchronization and time sequence reconstruction; carrying out preprocessing, and carrying out key frame extraction and target detection on the video frame to obtain a pet posture track; on the basis of a state switching point of a hidden Markov model, dividing the data subjected to time sequence reconstruction into a plurality of behavior events, and combining adjacent related behavior events to form behavior blocks; extracting statistical characteristics, behavior frequency and context characteristics of each behavior block, and training an individual behavior baseline model by adopting a multi-scale sliding window and a weight attenuation strategy based on historical behavior data; and comparing the real-time behavior block with the individual behavior baseline, and carrying out anomaly monitoring and warning through an integrated classifier. According to the invention, cross-device pet behavior management and abnormal early warning can be realized, and the reliability and the intelligent level of pet health monitoring and behavior analysis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent monitoring technology for pet behavior, specifically a pet behavior data management system and method based on big data. Background Technology

[0002] With the development of smart homes and the pet economy, various smart devices such as collars, smart cameras, smart feeders, and smart litter boxes are widely used in daily pet management. These devices can continuously collect multimodal behavioral data of pets, including acceleration, gyroscope readings, heart rate, body temperature, video frames, eating events, and environmental parameters, providing a foundation for pet health monitoring, behavior recognition, and abnormal warnings. However, existing technologies still have many shortcomings in data management and analysis.

[0003] First, the different sampling frequencies and inconsistent clock systems of data from multiple sources lead to significant cumulative timestamp discrepancies. The lack of an effective time synchronization and timing alignment mechanism makes it difficult to conduct unified logical analysis of pet behavior. Second, raw data from home environments is often noisy, severely incomplete, and contains numerous abrupt changes. Furthermore, the inefficient fusion of video and sensor streams makes it difficult to accurately extract behavioral features.

[0004] Furthermore, traditional methods often rely on simple threshold rules or single sensor features, which cannot provide fine-grained segmentation of pet behavior or handle continuous transitions between different states. Behavioral events are often missegmented or missed, resulting in low accuracy in identifying key behaviors such as eating, abnormal activity, and excessive stillness. The lack of a systematic behavior block construction mechanism also makes it difficult to obtain the temporal context of behavior, limiting the ability to identify high-level behavioral patterns.

[0005] Furthermore, existing behavioral analysis systems fail to fully utilize large-scale group data across pets, neglecting to model individual differences across breeds, ages, weights, and activity levels. This results in behavioral baselines lacking universality and adaptability. Existing systems also lack the ability to dynamically model long-term drift in individual behavior, making it difficult to effectively identify chronic behavioral abnormalities.

[0006] In addition, existing anomaly detection methods often rely on a single model or a single threshold, which makes it difficult to handle the diversity of behaviors in complex family environments. They also lack a mechanism for synchronously comparing real-time behavior blocks with historical baselines and group baselines, resulting in high false alarm and false negative rates in anomaly monitoring.

[0007] In summary, current technology lacks a complete big data pet behavior management system that can support unified access to multi-source data, time synchronization, automatic segmentation of behavioral events, construction of behavioral blocks, extraction of multimodal features, dual baseline modeling of individuals and groups, and real-time anomaly monitoring. Therefore, there is an urgent need for a pet behavior data management technology solution that can achieve cross-device, multimodal, scalable, and personalized analysis support. Summary of the Invention

[0008] The purpose of this invention is to provide a pet behavior data management system and method based on big data to solve the problems raised in the prior art.

[0009] To achieve the above objectives, the present invention provides the following technical solution: a pet behavior data management method based on big data, specifically including the following steps: Step S1: Access the raw pet behavior data stream from the smart device through the preset device access interface; the raw pet behavior data stream includes timestamp-marked gyroscope data, heart rate and body temperature data, video frame stream, eating events and environmental sensor data; Step S2: Perform time synchronization and timing reconstruction on the original data stream to achieve unified timeline alignment; Step S3: Preprocess the aligned data and extract keyframes and detect targets in the video frames to obtain the pet's pose trajectory. Step S4: Based on the state switching points of the Hidden Markov Model, the data that has completed temporal reconstruction is divided into several behavioral events, and adjacent related behavioral events are combined to form a behavioral block; the behavioral block includes event type, start and end time, duration and multimodal feature vector; Step S5: Extract statistical features, behavior frequency and contextual features for each behavior block, and train an individual behavior baseline model based on historical behavior data using a multi-scale sliding window and weight decay strategy. Step S6: Perform hierarchical clustering and distribution fitting on the anonymized large-scale cross-pet samples to generate behavioral templates and reference thresholds based on breed, age, weight, and activity level. Step S7: Compare the real-time behavior block with the individual behavior baseline, and perform anomaly monitoring and alarm through an integrated classifier.

[0010] Furthermore, in step S2, the time synchronization and timing reconstruction further include: calculating the clock deviation between different devices based on the mutual information estimation method, and using the deviation as a correction parameter to synchronize the data stream, thereby completing the unified time axis alignment.

[0011] Furthermore, in step S3, the preprocessing includes denoising, outlier identification, and missing data imputation; The missing data imputation includes using linear interpolation for short missing data with a sampling interval of less than T1 seconds, using Kalman filtering prediction and combining it with historical similar behavior blocks for medium missing data with a sampling interval between T1 and T2 seconds, and recording long missing data exceeding T2 seconds as unrecoverable and marking it as missing data.

[0012] Furthermore, in step S4, the state switching point based on the Hidden Markov Model divides the completed temporal reconstruction data into several behavioral events, and combines adjacent related behavioral events to form behavioral blocks, specifically: Step S4-1: Extract the k-th moment based on a unified time axis We obtain an observation vector O that has completed time series reconstruction, characterized as Where K represents the length of the observation vector; with the observation vector Using HMM as the basis, the latent discrete behavioral state sequence Q is modeled and characterized as ; , , and These represent the behavioral states at time points 1, 2, k, and K, respectively; where each behavioral state... ; M represents the set of local states, and M represents the number of behavioral states; Step S4-2: Process the potential discrete behavioral state sequence using the Baum-Welch algorithm. Estimate the HMM modeling parameters and obtain the most likely state sequence using Viterbi decoding. ; Step S4-3: Based on the most likely state sequence Time periods of consecutive identical behavior states This is recorded as a candidate event, with event attributes including start and end times, duration d, mean and variance of features within the event, and a list of corresponding devices; when the event duration d is less than a preset minimum event duration... If so, the event will be merged into the predecessor or subsequent neighboring event; Step S4-4, when two events and The gap between them is smaller than the merging threshold. Then the two events are merged into one action block; the start and end times of the action block are the minimum start and maximum end times after the two events are merged.

[0013] Furthermore, in step S5, statistical features, behavior frequency, and contextual features are extracted for each behavior block, and an individual behavior baseline model is trained based on historical behavior data using a multi-scale sliding window and weight decay strategy. Step S5-1: Extract statistical features, behavior frequency, and contextual features for each behavior block; the statistical features include performing FFT on the pet's heart rate sequence to extract the dominant frequency and obtain the harmonic ratio; the behavior frequency includes the number of times a certain pet behavior state occurs per unit time; the contextual features include the interval time between behavior events, the duration, and the delayed movement duration after the behavior state. Step S5-2: Establish a baseline for behavioral indicators using an exponentially weighted moving average. The i-th observation value of a certain behavioral indicator is denoted as... baseline The update rule is represented as: ;in, To update the weights, ; Step S5-3: Perform a normal simulation on the behavioral indicators, and construct confidence intervals on the baseline based on the normal distribution, denoted as: ;in, This is an estimate of the standard deviation corresponding to the baseline. This corresponds to the confidence level.

[0014] Furthermore, in step S6, the anonymized large-scale cross-pet sample is subjected to hierarchical clustering and distribution fitting to generate behavioral templates and reference thresholds categorized by breed, age, weight, and activity level. Specifically: Anonymous pets are stratified according to breed, age, and weight. A Gaussian mixture model is used to cluster each stratum, and the population mean, variance, and percentile threshold are output as the external baseline of the anonymized pets.

[0015] Furthermore, in step S7, the real-time behavior block is compared with the individual behavior baseline, and anomaly detection and alarm are performed through an ensemble classifier, specifically as follows: Statistical features, behavior frequency, and contextual features of real-time behavior blocks are acquired. Within a predetermined time period, these acquired statistical features, behavior frequency, and contextual features are arranged chronologically to form a real-time feature sequence, denoted as […]. ; Individual behavioral baselines were retrieved based on pet breed, and denoted as... ; When real-time feature sequence At the baseline of individual behavior confidence interval If the data is within the confidence interval of the individual's behavior baseline, it is considered normal; an alarm is issued for real-time feature sequences outside the confidence interval of the individual's behavior baseline.

[0016] Furthermore, it also includes: when it belongs to anonymized pets, obtaining an external baseline according to the method in step S6, denoted as... ; Real-time feature sequences were calculated using the Pearson correlation coefficient method. With external baseline The correlation is denoted as r; when r is less than the pre-set reference threshold An alarm will be triggered when r is not less than the preset reference threshold. It was considered normal at the time.

[0017] A pet behavior data management system based on big data includes a data access module, a time synchronization module, a data preprocessing module, a behavior segmentation and block construction module, a feature engineering and baseline modeling module, a group profiling module, and an anomaly detection module. The data access module is used to access the raw pet behavior data stream from smart devices through a preset device access interface; The time synchronization module is used to synchronize the original data stream in time and reconstruct the timing sequence to achieve unified timeline alignment. The data preprocessing module is used to preprocess the aligned data and extract keyframes and detect targets in the video frames to obtain the pet's posture trajectory. The behavior segmentation and block construction module is used to segment the completed temporal reconstruction data into several behavior events based on the state switching points of the hidden Markov model, and combine adjacent related behavior events to form behavior blocks. The feature engineering and baseline modeling module is used to extract statistical features, behavior frequency and contextual features for each behavior block, and to train an individual behavior baseline model based on historical behavior data using a multi-scale sliding window and weight decay strategy. The group profiling module is used to perform hierarchical clustering and distribution fitting on anonymized large-scale cross-pet samples to generate behavioral templates and reference thresholds based on breed, age, weight, and activity level. The anomaly detection module is used to compare real-time behavior blocks with individual behavior baselines and to perform anomaly monitoring and alarms through an integrated classifier.

[0018] Furthermore, it also includes an edge collaboration module; the edge collaboration module is deployed on smart devices and gateway devices and is responsible for executing lightweight feature extraction and compression transmission strategies to reduce terminal power consumption.

[0019] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention achieves standardized fusion of multi-source heterogeneous pet behavior data from collars, smart cameras, feeders, litter boxes, and other IoT terminals by constructing a unified data access and time synchronization mechanism, solving the problems of large clock deviations and data misalignment among multiple devices in traditional systems; by introducing keyframe extraction, target detection, and hidden Markov models, it achieves automatic segmentation and behavior block construction of continuous behavior sequences, obtaining more fine-grained and context-meaning behavior structures; this invention extracts statistical features, behavior frequency, and contextual features at the behavior block level, and combines multi-scale sliding windows and weights. The attenuation strategy establishes an individual behavior baseline, adaptively capturing short-term behavioral fluctuations and long-term behavioral drift in pets, significantly improving the accuracy and stability of behavior modeling. By performing hierarchical clustering and distribution fitting on large-scale anonymized samples, group behavior templates are constructed based on breed, age, weight, and activity level, providing an external reference baseline for anonymized pets and cold-start scenarios. The comparison mechanism between real-time behavior blocks and individual and group baselines, combined with an ensemble classifier and correlation detection methods, effectively reduces the false alarm rate and minimizes false alarms caused by environmental noise. Furthermore, this invention achieves lightweight feature extraction and data compression through an edge collaboration module, significantly reducing the power consumption of terminal devices. In summary, this invention enables cross-device, multimodal, and high-precision pet behavior management and anomaly warning, with a high degree of structure and strong adaptability, significantly improving the reliability and intelligence level of pet health monitoring and behavior analysis. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating a pet behavior data management method based on big data according to the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Example: Figure 1 As shown, this invention provides a technical solution, a pet behavior data management method based on big data, specifically including the following steps: Step S1: Access the raw pet behavior data stream from the smart device through the preset device access interface; the raw pet behavior data stream includes timestamp-marked gyroscope data, heart rate and body temperature data, video frame stream, eating events and environmental sensor data; The smart devices include raw data streams from collars, smart cameras, smart feeders, smart litter boxes, and other IoT terminals. These raw data streams include timestamp-marked accelerometer / gyroscope data, heart rate / body temperature data, video frame streams, feeding / drinking events, and environmental sensor data. It should be noted that the smart camera needs to have a preset monitoring range and acquire video frame streams within the authorized scope.

[0023] Step S2: Perform time synchronization and timing reconstruction on the original data stream to achieve unified timeline alignment; Step S3: Preprocess the aligned data and extract keyframes and detect targets in the video frames to obtain the pet's pose trajectory. The process involves using object detection (YOLO / SSD) to detect the bounding box containing the pet; then using a pose estimation network (HRNet) within the bounding box to extract key points (head, torso, limbs, tail, etc.) to obtain the pet's pose trajectory. Step S4: Based on the state switching points of the Hidden Markov Model, the data that has completed temporal reconstruction is divided into several behavioral events, and adjacent related behavioral events are combined to form a behavioral block; the behavioral block includes event type, start and end time, duration and multimodal feature vector; Step S5: Extract statistical features, behavior frequency and contextual features for each behavior block, and train an individual behavior baseline model based on historical behavior data using a multi-scale sliding window and weight decay strategy. Step S6: Perform hierarchical clustering and distribution fitting on the anonymized large-scale cross-pet samples to generate behavioral templates and reference thresholds based on breed, age, weight, and activity level. Step S7: Compare the real-time behavior block with the individual behavior baseline, and perform anomaly monitoring and alarm through an integrated classifier.

[0024] Furthermore, in step S2, time synchronization and timing reconstruction further include: calculating the clock deviation between different devices based on the mutual information estimation method, and using the deviation as a correction parameter to synchronize the data stream, thereby completing the unified time axis alignment.

[0025] The time delay deviation between device g and reference device h is estimated using the mutual information estimation method. ; In this embodiment, the cross-correlation function is used. maximum value As a deviation estimate, it is characterized as follows: ; Alternatively, the round-trip time (RTT) between the device timestamp and the server receiving time can be used for correction, employing either the Cristian algorithm or NTP-style synchronization; no restrictions are imposed here. Unified timeline ΔT is the uniform sampling interval, the value of which depends on the application scenario; in this embodiment, it is 1 second. It should be noted that for low-sampling devices, linear interpolation is used to restore the sampling interval to... For sequences with measurement noise, Kalman filtering is preferred.

[0026] Furthermore, in step S3, preprocessing includes denoising, outlier identification, and missing data imputation; Missing data imputation includes using linear interpolation for short missing data with a sampling interval of less than T1 seconds, using Kalman filtering prediction and combining it with historical similar behavior blocks for medium missing data with a sampling interval between T1 and T2 seconds, and recording long missing data exceeding T2 seconds as unrecoverable and marking it as missing data.

[0027] Denoising can be achieved through low-pass / band-pass filters or wavelet denoising. Outlier detection is based on sliding window statistics and MAD detection of extreme values, with MAD detection based on historical data; In this embodiment, the short threshold T1 is set to 5, and the long threshold T2 is set to 300. Linear interpolation for missing data imputation is an existing technique, and will not be elaborated on here; Kalman filtering is an existing technology. Its application in this embodiment is specifically as follows: This embodiment is based on the linear system assumption: The state equation is characterized as follows: ; The observation equation is characterized as follows: ; The state prediction formula based on prior estimation is represented as: ; The covariance prediction formula is characterized as follows: ; The Kalman gain formula for posterior estimation is represented as: ; The state update formula is represented as: ; The covariance update formula is represented as: ; in, Represents the state vector; Represents the state transition matrix; Indicates process noise; Represents the observation vector; Represents the observation matrix; Indicates observation noise; P represents the state estimate; P estimates the error covariance matrix. in, This represents the estimate at time k based on information from time k-1; Furthermore, in step S4, based on the state switching points of the Hidden Markov Model, the data that has completed temporal reconstruction is divided into several behavioral events, and adjacent related behavioral events are combined to form behavioral blocks, specifically: Step S4-1: Extract the k-th moment based on a unified time axis We obtain an observation vector O that has completed time series reconstruction, characterized as Where K represents the length of the observation vector; with the observation vector Using HMM as the basis, the latent discrete behavioral state sequence Q is modeled and characterized as ; , , and These represent the behavioral states at time points 1, 2, k, and K, respectively; where each behavioral state... ; M represents the set of local states, and M represents the number of behavioral states; Step S4-2: Process the potential discrete behavioral state sequence using the Baum-Welch algorithm. Estimate the HMM modeling parameters and obtain the most likely state sequence using Viterbi decoding. ; In this embodiment, a single Gaussian model is used to model the continuous observations of each state, and the model parameters are: ; The initial state distribution is as follows: , ;in, ; This represents the probability of being in state m at the initial moment; Transition probability matrix ,in, ;in, This represents the transition probability from state u to v; The observation probability matrix B is: ; Indicates that state v generates observations The probability of; The observation probability is based on a single Gaussian model, and the formula is: ;in, Let be the mean vector of state v. It is the covariance matrix; M is selected based on the expected behavior category. In this embodiment, M=6 is selected, specifically: sleep / rest, walking / low-intensity activity, vigorous exercise, eating / excretion; initial It can be set to 1 / M, or it can be initialized based on the classification statistics of the first frame of training data. There are no restrictions on this. Initially, A tends to set a high self-transition probability to reflect state persistence. In this embodiment, , ;typical Take 0.1, which is equivalent to a self-transfer of 0.9; In the initial launch distribution and K-means is used to cluster the observation vector O in the observation space and calculate the mean and covariance of each cluster. The Baum-Welch algorithm is an iterative algorithm for parameter estimation of Hidden Markov Models (HMMs), a special case of the Expectation-Maximization (EM) algorithm. Baum-Welch is a core tool for HMM parameter estimation, iteratively optimizing model parameters within the EM framework to maximize the probability of the observed sequence. Baum-Welch is existing technology and will not be elaborated upon further here. In this application, the termination condition for parameter updates is the log-likelihood. The growth is less than the predetermined threshold tol or the maximum number of iterations Z is reached; In this embodiment, Tol is 10. -4 The maximum number of iterations Z is 50.

[0028] Step S4-3: Based on the most likely state sequence Time periods of consecutive identical behavior states This is recorded as a candidate event, with event attributes including start and end times, duration d, mean and variance of features within the event, and a list of corresponding devices; when the event duration d is less than a preset minimum event duration... If so, the event will be merged into the predecessor or subsequent neighboring event; Step S4-4, when two events and The gap between them is smaller than the merging threshold. Then the two events are merged into one action block; the start and end times of the action block are the minimum start and maximum end times after the two events are merged.

[0029] In this embodiment, the set of local actions and states includes "rest / sleep", "low-intensity activity", "eating", etc.

[0030] Furthermore, in step S5, statistical features, behavior frequency, and contextual features are extracted for each behavior block, and an individual behavior baseline model is trained based on historical behavior data using a multi-scale sliding window and weight decay strategy. Step S5-1: Extract statistical features, behavior frequency, and contextual features for each behavior block; the statistical features include performing FFT on the pet's heart rate sequence to extract the dominant frequency and obtain the harmonic ratio; the behavior frequency includes the number of times a certain pet behavior state occurs per unit time; the contextual features include the interval time between behavior events, the duration, and the delayed movement duration after the behavior state. Among them, the acquisition of heart rate sequence is an existing technology, and the extraction of the main frequency by performing Fourier transform on heart rate sequence is a common technique, which will not be elaborated on here.

[0031] Step S5-2: Establish a baseline for behavioral indicators using an exponentially weighted moving average. The i-th observation value of a certain behavioral indicator is denoted as... baseline The update rule is represented as: ;in, To update the weights, ; in, To update the weights, the values ​​are related to the time scale: larger values ​​are needed for short-term sensitivity. (e.g., 0.2–0.4), take the smaller value for long-term stability. (e.g., 0.01–0.05). To support long-term drift detection, a weight decay strategy or segmented retraining can be used: when the cumulative bias exceeds a threshold and the duration exceeds [a certain value], a weight decay strategy or segmented retraining can be employed. (Recommended 7–30 days) to trigger baseline retraining.

[0032] Step S5-3: Perform a normal simulation on the behavioral indicators, and construct confidence intervals on the baseline based on the normal distribution, denoted as: ;in, This is an estimate of the standard deviation corresponding to the baseline. This corresponds to the confidence level.

[0033] in, This is an estimate of the standard deviation corresponding to the baseline. Corresponding confidence level (e.g., at 95%) ).

[0034] Furthermore, in step S6, the anonymized large-scale cross-pet sample is subjected to hierarchical clustering and distribution fitting to generate behavioral templates and reference thresholds categorized by breed, age, weight, and activity level. Specifically: Anonymous pets are stratified according to breed, age, and weight. A Gaussian mixture model is used to cluster each stratum, and the population mean, variance, and percentile threshold are output as the external baseline of the anonymized pets.

[0035] Furthermore, in step S7, the real-time behavior block is compared with the individual behavior baseline, and anomaly detection and alarm are performed through an ensemble classifier, specifically as follows: Statistical features, behavior frequency, and contextual features of real-time behavior blocks are acquired. Within a predetermined time period, these acquired statistical features, behavior frequency, and contextual features are arranged chronologically to form a real-time feature sequence, denoted as […]. ; Individual behavioral baselines were retrieved based on pet breed, and denoted as... ; When real-time feature sequence At the baseline of individual behavior confidence interval If the data is within the confidence interval of the individual's behavior baseline, it is considered normal; an alarm is issued for real-time feature sequences outside the confidence interval of the individual's behavior baseline.

[0036] Furthermore, it also includes: when it belongs to anonymized pets, obtaining an external baseline according to the method in step S6, denoted as... ; Real-time feature sequences were calculated using the Pearson correlation coefficient method. With external baseline The correlation is denoted as r; when r is less than the pre-set reference threshold An alarm will be triggered when r is not less than the preset reference threshold. It was considered normal at the time.

[0037] The Pearson correlation coefficient method is a commonly used method for calculating the correlation of sequence data. In this application, it is used to calculate the correlation between the real-time feature sequence and the baseline sequence, with a value of [-1, 1]. A reference threshold can be set empirically. .

[0038] A pet behavior data management system based on big data includes a data access module, a time synchronization module, a data preprocessing module, a behavior segmentation and block construction module, a feature engineering and baseline modeling module, a group profiling module, and an anomaly detection module. The data access module is used to access the raw pet behavior data stream from smart devices through a preset device access interface; The time synchronization module is used to synchronize and reconstruct the time sequence of the original data stream, and complete the unified time axis alignment; The data preprocessing module is used to preprocess the aligned data and extract keyframes and detect objects from video frames to obtain the pet's posture trajectory. The behavior segmentation and block building module is used to segment the temporal reconstruction data into several behavior events based on the state switching points of the Hidden Markov Model, and combine adjacent related behavior events to form behavior blocks. The feature engineering and baseline modeling module is used to extract statistical features, behavior frequency and contextual features for each behavior block, and to train an individual behavior baseline model based on historical behavior data using a multi-scale sliding window and weight decay strategy. The group profiling module is used to perform hierarchical clustering and distribution fitting on anonymized large-scale cross-pet samples to generate behavioral templates and reference thresholds based on breed, age, weight, and activity level. The anomaly detection module compares real-time behavior blocks with individual behavior baselines and uses an integrated classifier to monitor and alert on anomalies.

[0039] Furthermore, it also includes an edge collaboration module; the edge collaboration module is deployed on smart devices and gateway devices and is responsible for executing lightweight feature extraction and compression transmission strategies to reduce terminal power consumption.

[0040] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A big data-based pet behavior data management method, characterized by: Specifically comprising the following steps: Step S1, accessing pet behavior raw data stream from smart devices through a pre-set device access interface; the pet behavior raw data stream includes time-stamped heart rate and body temperature data, video frame stream and diet events; Step S2, time synchronization and time sequence reconstruction are performed on the raw data stream to complete uniform time axis alignment; Step S3, pre-processing is performed on the aligned data, and key frame extraction and target detection are performed on the video frames to obtain pet posture trajectories; Step S4, the data completed time sequence reconstruction is segmented into several behavior events based on hidden Markov model state switching points, and adjacent related behavior events are combined to form behavior blocks; the behavior blocks include event type, start and end time, duration and multi-modal feature vector; Step S5, statistical features, behavior frequency and context features are extracted for each behavior block, and an individual behavior baseline model is trained based on historical behavior data using a multi-scale sliding window and a weight decay strategy; Step S6, hierarchical clustering and distribution fitting are performed on the anonymized cross-pet large-scale samples to generate behavior templates and reference thresholds divided by breed, age, weight and activity level; Step S7, real-time behavior blocks are compared with individual behavior baseline, and integrated classifier is used for abnormal monitoring and alarm.

2. The pet behavior data management method based on big data according to claim 1, characterized in that: In step S2, the time synchronization and time sequence reconstruction further comprises: calculating the clock deviation between different devices based on mutual information estimation method, and using the deviation as a correction parameter to synchronize the data stream to complete the uniform time axis alignment. 3.The pet behavior data management method based on big data according to claim 1, characterized in that: In step S3, the pre-processing includes denoising, outlier identification and missing data filling; The missing data filling includes linear interpolation for short missing data with a sampling interval less than T1 seconds, Kalman filter prediction combined with historical similar behavior block backfilling for medium missing data with a sampling interval between T1 and T2 seconds, and recording long missing data exceeding T2 seconds as unrecoverable and marking as missing packets.

4. The pet behavior data management method based on big data according to claim 1, characterized in that: In step S4, the data completed time sequence reconstruction is segmented into several behavior events based on hidden Markov model state switching points, and adjacent related behavior events are combined to form behavior blocks, specifically: Step S4-1, extracting the kth time point based on the unified time axis , obtaining a certain completed timing reconstruction observation vector O, represented as ; wherein K represents the length of the observation vector; using the observation vector as a basis, modeling a latent discrete behavior state sequence Q using HMM, represented as ; , , and represent the behavior states corresponding to the 1st, 2nd, kth and Kth time points, respectively; wherein each behavior state ; represents a local state set, and M represents the number of behavior states; Step S4-2, estimating HMM modeling parameters by Baum-Welch algorithm on the sequence of potential discrete behavior states and obtaining the most likely sequence of states according to Viterbi decoding ; Step S4-3, based on the most likely state sequence a time period of consecutive same behavior state as a candidate event, recording event attributes including start and end time, duration d, mean and variance of features within the event, and a list of corresponding devices; when the event duration d is less than a preset minimum event duration merge the event to the adjacent event; Step S4-4, when the gap between two events and is less than a merging threshold , the two events are merged into one behavior block; the start and end time of the behavior block is the minimum start and maximum end time after merging the two events.

5. The pet behavior data management method based on big data according to claim 1, characterized in that: In step S5, statistical features, behavior frequency and context features are extracted for each behavior block, and an individual behavior baseline model is trained based on historical behavior data using a multi-scale sliding window and a weight decay strategy; Step S5-1, statistical features, behavior frequency and context features are extracted for each behavior block; the statistical features include FFT on pet heart rate sequence to extract harmonic ratio; the behavior frequency includes the number of certain pet behavior state per unit time; the context features include behavior event interval time, duration and delay movement time after behavior state; Step S5-2, a baseline is established for the behavior index by using an exponentially weighted moving average, and a certain behavior index at the ith observation value is denoted as , the baseline is updated according to the following rule: ; wherein, is an update weight, ; Step S5-3, normal simulation is performed on the behavior index, a confidence interval is constructed on the baseline according to the normal distribution, denoted as: ; wherein, is the standard deviation estimation corresponding to the baseline; is the corresponding confidence.

6. The pet behavior data management method based on big data according to claim 1, characterized in that: In step S6, hierarchical clustering and distribution fitting are performed on the anonymized cross-pet large-scale samples to generate behavior templates and reference thresholds divided by breed, age, weight and activity level, specifically: According to the breed, age and weight, the anonymized pets are stratified, and a Gaussian mixture model is used for clustering in each layer, and the group mean, variance and percentile threshold are output as the external baseline of the reference standard anonymized pet.

7. The pet behavior data management method based on big data according to claim 1, characterized in that: Step S7, comparing the real-time behavior block with the individual behavior baseline, abnormal monitoring and alarm are performed through an integrated classifier, specifically: obtaining statistical features, behavior frequencies and context features of the real-time behavior blocks, arranging the obtained statistical features, behavior frequencies and context features in time sequence to form a real-time feature sequence, denoted as ; By pet breed retrieving individual behavior baseline, noted as ; When real-time feature sequence At the baseline of individual behavior confidence interval If the data is within the confidence interval of the individual's behavior baseline, it is considered normal; an alarm is issued for real-time feature sequences outside the confidence interval of the individual's behavior baseline.

8. The pet behavior data management method based on big data according to claim 7, characterized in that: Also includes: When belonging to an anonymized pet, the external baseline is obtained according to the method in step S6, denoted as ; The real-time feature sequence is calculated by Pearson correlation coefficient method The correlation with the external baseline is denoted as r; when r is less than a preset reference threshold , an alarm is given; when r is not less than the preset reference threshold , it is considered normal.

9. A big data based pet behavior data management system, applying a big data based pet behavior data management method according to any one of claims 1-8, characterized in that: It includes a data access module, a time synchronization module, a data preprocessing module, a behavior segmentation and block construction module, a feature engineering and baseline modeling module, a group portrait module and an anomaly detection module. The data access module is used to access the pet behavior raw data stream from the intelligent device through the preset device access interface; The time synchronization module is used for time synchronization and time series reconstruction of the raw data stream, and completes the alignment of the unified time axis; The data preprocessing module is used for preprocessing the aligned data, and extracting key frames and target detection to obtain pet posture trajectories; The behavior segmentation and block construction module is used to segment the time series reconstructed data into several behavior events based on the state switching point of the hidden Markov model, and combine adjacent related behavior events to form behavior blocks; The feature engineering and baseline modeling module is used to extract statistical features, behavior frequency and context features for each behavior block, and train an individual behavior baseline model based on historical behavior data using a multi-scale sliding window and weight decay strategy; The group portrait module is used to stratify and fit the distribution of anonymized cross-pet large-scale samples, generate behavior templates and reference thresholds divided by breed, age, weight and activity level; The anomaly detection module is used to compare the real-time behavior block with the individual behavior baseline, and perform abnormal monitoring and alarm through an integrated classifier.

10. The pet behavior data management system based on big data according to claim 9, characterized in that: It also includes an edge collaboration module; the edge collaboration module is deployed in the intelligent device and the gateway device, and is responsible for performing lightweight feature extraction and compression transmission strategy to reduce terminal energy consumption.

Citation Information

Cited By

  • A multi-pet cross-device pet identity attribution and health warning method and system

    CN122245826A

  • Multi-modal based pet living area behavior detection and analysis method and system

    CN122245828A