A pet action recognition and health monitoring method and system based on deep learning
By combining deep learning with 3D pose estimation, topological data analysis, and Lie group manifold spatial graph convolution techniques, the shortcomings of feature extraction and fusion in pet action recognition and health monitoring are solved, enabling accurate representation of pet behavior and comprehensive monitoring of health status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广州佳可电子科技股份有限公司
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-05
Smart Images

Figure CN122157365A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for pet motion recognition and health monitoring based on deep learning. Background Technology
[0002] With the rapid development of artificial intelligence technology, deep learning is increasingly widely used in computer vision, especially in action recognition and health monitoring, where it has made significant progress. In recent years, deep learning-based action recognition methods have expanded from traditional two-dimensional image processing to three-dimensional pose estimation and spatiotemporal feature extraction. For example, by combining convolutional neural networks (CNNs) and recurrent neural networks (RNNs), existing technologies can classify and predict human actions with high accuracy. Furthermore, topological data analysis (TDA), as an emerging data analysis tool, has been introduced into the study of complex motion patterns to capture the global structural characteristics of data. Simultaneously, the application of Lie group manifold theory provides a mathematical framework for describing the dynamic changes of skeletal keypoints, enabling accurate modeling of the geometric features of motion trajectories in non-Euclidean space. However, despite the excellent performance of these technologies in human behavior analysis, their application in pet action recognition and health monitoring is still in its early stages. As non-verbal expressive entities, pets exhibit highly complex and individually diverse behavioral patterns, making it difficult for traditional methods to effectively capture their subtle movement features and correlate them with their health status.
[0003] However, existing technologies have several shortcomings in pet motion recognition and health monitoring. First, most existing methods rely on single feature extraction techniques, such as using only skeletal keypoint coordinate sequences or simple temporal models. This results in insufficient representational power when dealing with complex pet movements, especially when facing multi-scale, multimodal behavioral data. Second, existing technologies often neglect the topological information of motion trajectories, failing to comprehensively characterize the global characteristics of pet movements, thus limiting the accurate identification of abnormal behaviors. Furthermore, traditional methods typically perform feature extraction operations in Euclidean space, ignoring the nonlinear geometric characteristics of skeletal motion. This may lead to the loss of differential geometric features, thereby affecting the accuracy of health status assessment. Finally, existing technologies often employ simple concatenation or weighted summation methods in the feature fusion stage, failing to fully explore the potential correlations between different features and reducing the overall performance of the model. Therefore, designing a pet motion recognition and health monitoring method that comprehensively considers topological structure, differential geometric characteristics, and spatiotemporal dynamic features has become an urgent technical challenge.
[0004] Existing pet action recognition and health monitoring technologies suffer from the following problems: First, feature extraction methods are limited and fail to fully capture the complexity of pet behavior; second, there is a lack of in-depth analysis of the topological structure and differential geometric properties of movement trajectories, resulting in insufficient feature representation capabilities; third, the feature fusion mechanism is simple and cannot fully leverage the synergistic effect of multi-source features. This invention proposes a deep learning-based pet action recognition and health monitoring method that addresses these problems by combining 3D pose estimation, topological data analysis, and Lie group manifold spatial graph convolution techniques. This method not only generates high-dimensional spatiotemporal topological feature vectors and differential geometric feature vectors but also achieves efficient integration of multi-source features through tensor product fusion, ultimately enabling accurate assessment of abnormal pet biological behaviors and physiological indicators. This invention belongs to the interdisciplinary field of artificial intelligence and animal health management, providing a novel solution for pet health monitoring. Summary of the Invention
[0005] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0006] In view of the aforementioned existing problems, the present invention is proposed.
[0007] Therefore, the present invention provides a method and system for pet action recognition and health monitoring based on deep learning, which can solve the problems mentioned in the background art.
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for pet action recognition and health monitoring based on deep learning, which includes acquiring biological behavior image data of a target object, extracting the coordinate sequence of skeletal key points in the image frame through a three-dimensional pose estimation model, and generating temporal three-dimensional pose data. A topology data analysis unit is constructed to convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. Construct a graph convolution unit in a manifold space to map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operation under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion; The spatiotemporal topological feature vector and the differential geometric feature vector are fused by tensor product, and then input into a preset classification model for health status identification to obtain the biological behavior abnormality type and physiological indicator evaluation results.
[0009] As a preferred embodiment of the deep learning-based pet motion recognition and health monitoring method of the present invention, the extraction of the skeletal key point coordinate sequence from the image frame includes: A pre-trained model based on the HRNet architecture is invoked. The model contains cascaded high-resolution convolutional modules and a top-down keypoint regression branch. The weights of the pre-trained model are obtained by optimization using a publicly available animal pose dataset. The pre-trained image sequence is input into the three-dimensional pose estimation model, which outputs the two-dimensional coordinate sequence and confidence score of the pet's skeletal key points in each frame of the image. The skeletal key points include 16 predefined anatomical nodes, including the head, spine, and limb joints.
[0010] As a preferred embodiment of the deep learning-based pet motion recognition and health monitoring method of the present invention, the conversion of the temporal three-dimensional pose data into a topological complex structure includes: The temporalized 3D pose data is divided into overlapping subsequences according to a preset time window. The length of the time window is 64 frames, and the overlap rate of adjacent time windows is 50%. The overlapping subsequences are stored as tensors of M×16×3, where M is the number of frames in the time window. For each subsequence, multi-scale simplicial complex generation is performed, including: constructing a zero-dimensional simplicial complex based on spatial proximity, wherein the zero-dimensional simplicial complex represents a set of key points; constructing a one-dimensional simplicial complex based on motion trajectory similarity, wherein the one-dimensional simplicial complex represents the edges connecting key points; and generating a two-dimensional simplicial complex through a dynamic threshold algorithm, wherein the two-dimensional simplicial complex represents motion patches, and the dynamic threshold is adjusted according to the variance of the subsequence.
[0011] As a preferred embodiment of the deep learning-based pet motion recognition and health monitoring method of the present invention, the topological invariants for calculating the motion trajectory include: Persistent cohomology analysis is performed on the multiscale simple complex to generate a persistent barcode containing birth-death time pairs. The persistent cohomology analysis is implemented using the Ripser algorithm. The persistent barcode is processed by: extracting zero-dimensional topological features, which represent the connectivity lifetime of key points; extracting one-dimensional topological features, which represent the closure lifetime of the motion trajectory; and generating an enhanced topological feature vector through weighted fusion, wherein the weights of the enhanced topological feature vector are dynamically allocated according to the feature variance.
[0012] As a preferred embodiment of the deep learning-based pet action recognition and health monitoring method of the present invention, the generation of the spatiotemporal topological feature vector includes: The enhanced topological feature vector is aligned with the timestamp of the time window, and a global spatiotemporal topological feature vector is generated by splicing the time windows. The global spatiotemporal topological feature vector has a dimension of K×(D+1), where K is the number of time windows and D is the dimension of the enhanced topological feature. The spatiotemporal topological feature vectors are stored in a circular buffer in chronological order. The buffer capacity is adjusted according to the input length of the classification model, and a fixed-dimensional feature tensor is output.
[0013] As a preferred embodiment of the deep learning-based pet action recognition and health monitoring method of the present invention, the step of performing graph structure data convolution operation within the Riemannian geometric framework includes: An adjacency matrix is constructed based on the spatial topological relationships of skeletal keypoints. The element values of the adjacency matrix represent the connection weights between skeletal keypoints, and the connection weights are calculated by normalizing the Euclidean distance. The connection weights are adjusted using the Riemann gradient descent algorithm; Perform convolution operations on graph-structured data within the Riemannian geometric framework.
[0014] As a preferred embodiment of the deep learning-based pet action recognition and health monitoring method of the present invention, the step of inputting a preset classification model to identify the health status includes: The pre-trained classification model based on deep learning is invoked. The pre-trained classification model contains multiple layers of convolutional neural networks and fully connected layers. The weights of the pre-trained classification model are obtained through a publicly available pet behavior dataset, which contains labels for normal and abnormal behaviors. The dimensionality-reduced feature vectors are input into the classification model, and the input features are subjected to batch normalization. High-order features are extracted using convolutional layers; Classification results are generated through fully connected layers, and the results of biological behavior abnormality type and physiological index assessment are output. Generate behavior labels based on the anomaly type; A health score is generated based on the assessment results of physiological indicators; Store behavioral tags and health scores in a database and output a health status report.
[0015] Secondly, the present invention provides a pet action recognition and health monitoring system based on deep learning, which includes: a data acquisition and preprocessing module for acquiring biological behavior image data of the target object, extracting the skeletal key point coordinate sequence in the image frame through a three-dimensional pose estimation model, and generating time-series three-dimensional pose data. The topology data analysis module is used to construct a topology data analysis unit, convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. The manifold space graph convolution module is used to construct manifold space graph convolution units, map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operations under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion. The feature fusion classification module is used to fuse the spatiotemporal topological feature vector and the differential geometric feature vector through tensor product, and input the fusion into a preset classification model to identify the health status, thereby obtaining the biological behavior abnormality type and physiological indicator evaluation results.
[0016] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a deep learning-based pet motion recognition and health monitoring method.
[0017] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements the steps of a deep learning-based pet motion recognition and health monitoring method.
[0018] Compared with existing technologies, the beneficial effects of this invention are that it achieves a closed-loop process for pet motion recognition and health monitoring through four core steps, each demonstrating unique technical advantages and synergistic effects. First, using a 3D pose estimation model based on the HRNet architecture, it accurately extracts the coordinate sequences of skeletal key points and generates temporal 3D pose data, providing high-quality basic data support for subsequent analysis and significantly improving the accuracy and robustness of motion capture. Second, using a topological data analysis unit, it transforms the temporal 3D pose data into a topological complex structure and calculates the topological invariants of the motion trajectory, generating a spatiotemporal topological feature vector. This reveals the implicit characteristics of pet movement patterns from a global perspective, overcoming the shortcomings of traditional methods that only focus on local features. Third, by constructing a manifold space graph convolution unit, it maps skeletal key points to a Lie group manifold space and performs graph convolution operations within a Riemannian geometric framework, accurately characterizing the nonlinear geometric properties of skeletal motion and enhancing the modeling capability for complex joint movements. Finally, by integrating spatiotemporal topological features and differential geometric features through tensor product fusion technology and combining them with a pre-trained classification model, health status identification is achieved. This fully utilizes the complementarity of multi-source features, significantly improving the accuracy of abnormal behavior classification and physiological indicator assessment. The overall solution not only achieves precise representation of pet actions and comprehensive monitoring of health status, but also provides intuitive quantitative indicators and real-time monitoring capabilities for pet health management, possessing significant application value and technical significance. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a method and system for pet motion recognition and health monitoring based on deep learning, provided as an embodiment of the present invention; Figure 2 A schematic diagram of a deep learning-based pet motion recognition and health monitoring method and system provided in one embodiment of the present invention; Figure 3 A system module diagram of a deep learning-based pet action recognition and health monitoring method and system provided in one embodiment of the present invention; Figure 4 This is an internal structural diagram of a computer device for a deep learning-based pet motion recognition and health monitoring method and system, as provided in one embodiment of the present invention. Detailed Implementation
[0021] To make the above-mentioned objects, features, and advantages of the present invention more readily understood, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of this disclosure.
[0024] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not necessarily drawn according to actual scale.
[0025] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0026] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0027] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0028] Furthermore, in the description of this disclosure, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or order. Similarly, although operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring such operations to be performed in the specific order shown or in sequential order, or requiring the execution of all illustrated operations to achieve the desired result. In some cases, multitasking and parallel processing can be advantageous.
[0029] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a deep learning-based method for pet action recognition and health monitoring, including: Figure 1 A flowchart illustrating a deep learning-based method and system for pet motion recognition and health monitoring is provided, including: S1: Acquire biological behavior image data of the target object, extract the skeletal key point coordinate sequence in the image frame through a three-dimensional pose estimation model, and generate temporal three-dimensional pose data. Furthermore, acquiring biological behavioral image data of the target object includes, A continuous video stream of a pet in a preset scene is captured using an RGB camera. The video stream contains 30 frames of image data per second, and the preset scene covers the pet's daily activity area. The video stream is cropped and normalized frame by frame to generate a fixed-resolution image sequence. The cropped area is dynamically adjusted according to the pet's body size parameters. The normalization process uses a standardization method with a mean of 0 and a variance of 1.
[0030] In an optional embodiment, a fixed RGB camera is used to capture a continuous video stream of the pet in a preset scene. The video stream has a frame rate of 30fps. The preset scene is a square activity area with a side length of 2 meters. The RGB camera is installed 1.8 meters directly above the activity area.
[0031] In an optional embodiment, the cropping area is dynamically adjusted according to the pet's body shape parameters, specifically through the following steps: calculating the cropping time window size as 1.2L×1.2H based on the pet's body length L and body height H; locating the pet's center coordinates using the YOLOv5 object detection model; and generating a cropping time window with a fixed ratio based on the center coordinates.
[0032] In an optional embodiment, the normalization process employs a channel-by-channel Z-Score normalization method, wherein the normalization parameters are dynamically updated by statistically analyzing the mean and variance of the first 200 frames of images using a sliding time window, with a step size of 50 frames.
[0033] Furthermore, the extraction of skeletal keypoint coordinate sequences from image frames using a 3D pose estimation model includes, A pre-trained model based on the HRNet architecture is invoked. The model contains cascaded high-resolution convolutional modules and a top-down keypoint regression branch. The weights of the pre-trained model are obtained by optimization using a public animal pose dataset. The pre-trained image sequence is input into the three-dimensional pose estimation model, which outputs the two-dimensional coordinate sequence and confidence score of the pet's skeletal key points in each frame of the image. The skeletal key points include 16 predefined anatomical nodes, including the head, spine, and limb joints.
[0034] In an optional embodiment, the HRNet model includes four cascaded high-resolution convolutional modules with channel numbers of 64, 128, 256, and 512 respectively, and the top-down keypoint regression branch uses deconvolutional layers for upsampling.
[0035] In an optional embodiment, the pre-trained model weights are obtained through optimization using the Animal-Pose-10K dataset, which contains 100,000 labeled images covering four typical pet behaviors: running, jumping, lying down, and eating.
[0036] In an optional embodiment, the confidence score is normalized to a range of 0-1 using the Softmax function. For keypoint coordinates with a confidence score below 0.6, a forward-backward optical flow algorithm is used for trajectory interpolation. The optical flow algorithm uses a TV-L1 solver and the number of iterations is set to 200.
[0037] Furthermore, generating temporally sequenced 3D pose data includes, The two-dimensional coordinate sequence is converted into three-dimensional spatial coordinates by camera calibration parameters, and a time-series three-dimensional skeleton key point coordinate sequence is generated by combining timestamp information. The three-dimensional coordinate system takes the optical center of the camera as the origin and outputs data in the form of an N×16×3 tensor, where N is the length of the time series.
[0038] In an optional embodiment, the camera calibration parameters are obtained using the Zhang Zhengyou calibration method. The calibration board is an 8×6 checkerboard with each square having a side length of 12cm. The calibration process involves acquiring 30 sets of calibration board images from different angles, and the reprojection error is less than 0.3 pixels.
[0039] In an optional embodiment, the three-dimensional coordinate transformation is achieved through triangulation, specifically using the OpenCV function cv2.triangulatePoints. The function takes the projection matrix of the binocular camera and the coordinates of the matched key points as input and outputs three-dimensional spatial points in homogeneous coordinates.
[0040] In an optional embodiment, the temporalized 3D pose data is stored as an HDF5 format file, which contains three datasets: a timestamp sequence (N×1), a keypoint coordinate sequence (N×16×3), and a confidence sequence (N×16), wherein N is dynamically adjusted according to a preset time window length.
[0041] It should be noted that by acquiring continuous video streams of pets' daily activity areas using RGB cameras, and combining dynamic cropping and channel-by-channel Z-Score normalization, precise preprocessing of the image data was achieved, significantly improving data quality and model robustness. Subsequently, a 3D pose estimation model based on the HRNet architecture was used to extract the coordinate sequence of skeletal key points. Through multi-scale feature fusion, confidence scoring, and optical flow interpolation algorithms, high-precision detection and trajectory integrity under complex poses were ensured. Finally, using camera calibration parameters and triangulation, the 2D coordinates were converted into 3D spatial coordinates, generating temporal 3D pose data, providing high-quality structured data support for subsequent behavior analysis. The overall solution forms a closed loop from data acquisition to 3D reconstruction, which not only significantly reduces environmental interference and hardware deployment difficulty, but also achieves efficient and accurate digital representation of pet behavior through end-to-end automated processes. It can be widely used in fields such as intelligent monitoring, health monitoring, and scientific research, and has significant technological innovation and practical value.
[0042] S2: Construct a topology data analysis unit to convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. Furthermore, converting the temporally sequenced 3D pose data into a topological complex structure includes: The temporalized 3D pose data is divided into overlapping subsequences according to a preset time window. The length of the time window is 64 frames, and the overlap rate of adjacent time windows is 50%. The subsequences are stored as tensors of M×16×3, where M is the number of frames in the time window. Multi-scale simplicial complex generation is performed on each subsequence, including the following steps: constructing a zero-dimensional simplicial complex based on spatial proximity, wherein the zero-dimensional simplicial complex represents a set of key points; constructing a one-dimensional simplicial complex based on motion trajectory similarity, wherein the one-dimensional simplicial complex represents the edges connecting key points; and generating a two-dimensional simplicial complex through a dynamic threshold algorithm, wherein the two-dimensional simplicial complex represents a motion patch, and the dynamic threshold is adjusted according to the variance of the subsequence.
[0043] In an optional embodiment, the time window length is dynamically adjusted according to the pet's movement speed, specifically through the following steps: calculating the standard deviation of the displacement of key points in the subsequence; if the standard deviation exceeds a preset threshold, the time window length is shortened to thirty-two frames; if the standard deviation is lower than the preset threshold, the time window length is kept at sixty-four frames.
[0044] In an optional embodiment, the zero-dimensional simplex is constructed using a keypoint Euclidean distance threshold, which is set to 15% of the pet's body length; the one-dimensional simplex is constructed using motion trajectory cosine similarity, which is set to a similarity threshold of 0.85.
[0045] In an optional embodiment, the dynamic thresholding algorithm is implemented through the following steps: calculating the variance of the displacement of key points in the subsequence; adjusting the generation threshold of the two-dimensional simplex proportionally according to the size of the variance, with a lower threshold for a larger variance; and determining the threshold adjustment coefficient by a grid search method, wherein the coefficient ranges from 0.5 to 1.5.
[0046] In an optional embodiment, the multi-scale simple complex generation further includes the following steps: constructing a three-dimensional simple complex based on a two-dimensional simple complex, wherein the three-dimensional simple complex represents a multi-joint cooperative motion mode; filtering noise patches using an Alpha complex algorithm, wherein the Alpha parameter is set to 1.2 times the average spacing between key points.
[0047] In an optional embodiment, the division into overlapping subsequences further includes the following steps: synchronously acquiring accelerometer data and dividing time windows; aligning the timestamps of the three-dimensional attitude data and the accelerometer data; and merging the aligned multimodal data into an extended tensor containing three-dimensional coordinates and acceleration information.
[0048] Furthermore, the topological invariants for calculating the motion trajectory include: Persistent cohomology analysis is performed on the multiscale simple complex to generate persistent barcodes containing birth-death time pairs. The analysis is implemented using the Ripser algorithm, with the algorithm parameters set to coefficient domain GF2 and maximum dimension 2. Processing the persistent barcode includes the following operations: extracting zero-dimensional topological features, which represent the connectivity lifetime of key points; extracting one-dimensional topological features, which represent the closure lifetime of the motion trajectory; and generating an enhanced topological feature vector through weighted fusion, wherein the weights of the enhanced topological feature vector are dynamically allocated according to the feature variance.
[0049] Specifically, traditional geometric analysis methods can only capture local features and are sensitive to noise; linear dimensionality reduction methods cannot preserve nonlinear topological structures; rule-based anomaly detection methods lack adaptability; and standard persistent cohomology algorithms have limitations in real-time performance and multimodal data fusion. In contrast, the persistent cohomology algorithm employed in this invention, through innovative designs such as multi-scale topological feature extraction, dynamic threshold adjustment, anomaly score calculation, and distributed optimization, not only comprehensively models the complex topological patterns of pet skeletal movement but also possesses unique advantages such as noise robustness, high-dimensional manifold mapping capability, adaptive anomaly behavior detection, and real-time optimization. These characteristics give this algorithm an irreplaceable core competitiveness in the field of pet motion recognition and health monitoring.
[0050] In an optional embodiment, the persistent cohomology analysis is implemented using the Ripser algorithm, with the algorithm parameters set to coefficient domain GF2, maximum dimension 2, and sparsity parameter 0.3, and the output is a persistent barcode containing birth-death time pairs.
[0051] In an optional embodiment, processing the persistent barcode further includes the following steps: deleting invalid barcodes with a death time of zero; smoothing the birth-death time curve using a moving average method; and performing outlier detection and filtering on the barcode.
[0052] In an optional embodiment, the enhanced topological feature vector weights are optimized through the following steps: constructing a fully connected neural network with feature variance as input and weight vector as output; training the network with classification accuracy as the loss function; and storing the trained weight mapping relationship as a lookup table.
[0053] Furthermore, the generation of spatiotemporal topological feature vectors includes: The enhanced topological feature vector is aligned with the timestamp of the time window, and a global spatiotemporal topological feature vector is generated by concatenating the time windows. The vector dimension is K×(D+1), where K is the number of time windows and D is the dimension of the enhanced topological feature. The spatiotemporal topological feature vectors are stored in a circular buffer in chronological order. The buffer capacity is dynamically adjusted according to the input length of the classification model, and a fixed-dimensional feature tensor is output.
[0054] In an optional embodiment, the alignment of the enhanced topological feature vector with the timestamp of the time window is achieved through the following steps: reading the original timestamp sequence from the temporally sequenced 3D pose data; establishing a subsequence timestamp mapping table based on the time window partitioning index; and binding the topological feature vector of each time window with the start-end time in the mapping table.
[0055] In an optional embodiment, the global spatiotemporal topological feature vector is generated through the following steps: aligning the enhanced topological feature vector with a timestamp; sliding and stitching the vector at a step of one-quarter of the time window length; and outputting a feature vector with dimension K×(D+1), where K is the number of time windows and D is the dimension of the enhanced topological feature vector.
[0056] In an optional embodiment, storing the spatiotemporal topological feature vectors in chronological order into a circular buffer further includes the following steps: calculating anomaly scores for the feature vectors of each time window; dynamically adjusting the cache priority based on the scores, with higher anomaly scores resulting in longer retention times.
[0057] It should be noted that by converting temporally sequenced 3D pose data into a topological complex structure, calculating the topological invariants of the motion trajectory, and generating spatiotemporal topological feature vectors, high-dimensional topological modeling and nonlinear feature extraction of complex pet movement patterns are achieved. Specifically, the dynamic time window partitioning and multi-scale simple complex generation method comprehensively capture the spatial proximity and coordination characteristics of skeletal motion, significantly improving the flexibility and robustness of topological modeling. Persistent homology analysis combined with a dynamic weight allocation mechanism quantifies the lifetime characteristics of keypoint connectivity and trajectory closure, overcoming the problems of noise sensitivity and local feature limitations of traditional methods. Furthermore, by generating global spatiotemporal topological feature vectors through sliding time window splicing and combining a circular buffer and anomaly scoring mechanism to optimize storage efficiency, the stability and consistency of the output feature tensor are ensured. The overall solution not only achieves multi-level motion modeling from local to global and from space to time, but also possesses unique advantages such as noise robustness, real-time optimization, and adaptive capabilities for abnormal behavior detection, providing high-quality data support and innovative technical paths for fields such as pet motion recognition, health monitoring, and scientific research.
[0058] S3: Construct a graph convolution unit in a manifold space, map the coordinate sequence of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operation under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion; Furthermore, mapping the skeletal keypoint coordinate sequence to a preset Lie group manifold space includes, The sequence of coordinates of the key points of the skeleton is mapped to the special orthogonal group SO(3) manifold space, which is used to describe the geometric constraints of joint rotation. The SO(3) manifold is composed of three-dimensional rotation matrices and satisfies the constraints of orthogonality and determinant of 1. Perform multi-scale mapping on each skeletal keypoint; specifically, transform the local coordinate system of the skeletal keypoint into the global coordinate system. The rotation vector in the global coordinate system is projected onto the SO(3) manifold space by exponential mapping; The output mapped skeletal keypoints are represented as tangent space vectors on SO(3).
[0059] In an optional embodiment, the sequence of skeletal keypoint coordinates is projected onto the SO(3) manifold space via an exponential mapping, the formula for which is: ; Where I is the identity matrix, serving as the initial term for the exponential mapping. For rotation matrix, Let be the rotation vector. It is an antisymmetric matrix.
[0060] In an optional embodiment, multi-scale mapping for each skeletal keypoint includes: scaling the local coordinate system of the skeletal keypoint; projecting it into the SO(3) and SE(3) manifold spaces respectively to generate a multi-scale manifold representation; and fusing the multi-scale representation into an enhanced manifold feature.
[0061] Furthermore, performing convolution operations on graph-structured data within the Riemannian geometric framework includes, An initial adjacency matrix is constructed based on the spatial topological relationship of skeletal keypoints. The element values of the adjacency matrix represent the connection weights between skeletal keypoints, and the weights are calculated by Euclidean distance normalization. The adjacency matrix weights are dynamically adjusted using the Riemann gradient descent algorithm. Specifically, the tangent space gradient of the adjacency matrix is calculated on the SO(3) manifold. The weight parameters are updated along the gradient direction with a learning rate of 0.001. The updated weights are then reprojected onto the SO(3) manifold to ensure geometric constraint consistency. Perform graph-structured data convolution operations within the Riemannian geometric framework; specifically, perform Laplacian normalization on the adjacency matrix; use tangent space convolution kernels to locally aggregate skeletal keypoint features; and return the convolution results to the SO(3) manifold space via exponential mapping.
[0062] In an optional embodiment, the adjacency matrix is constructed by the following steps: calculating the Euclidean distance between skeletal keypoints; normalizing the distance to a range of 0-1; and using the normalized distance as the weight value of the adjacency matrix.
[0063] In an optional embodiment, the adjacency matrix weights are dynamically adjusted through the following steps: calculating the tangent space gradient of the adjacency matrix on the SO(3) manifold; updating the weight parameters along the gradient direction with a learning rate of 0.001; and reprojecting the updated weights onto the SO(3) manifold to ensure geometric constraint consistency.
[0064] Furthermore, the extraction of differential geometric feature vectors of skeletal motion includes, Extract the tangent space velocity field and curvature tensor of key points in the skeleton; The modulus of the tangential velocity field is calculated as a characteristic of the motion intensity. The trace of the curvature tensor is calculated as a feature of motion smoothness. The above features are concatenated into a differential geometric feature vector with dimensions P×Q, where P is the number of skeletal keypoints and Q is the feature dimension. The differential geometric feature vectors are stored in a circular buffer in chronological order. The buffer capacity is dynamically adjusted according to the input length of the classification model, and a fixed-dimensional feature tensor is output.
[0065] In an optional embodiment, the differential geometric feature vector further includes the following steps: calculating an anomaly score for the feature vector of each key point; dynamically adjusting the buffer priority based on the score, with a higher anomaly score resulting in a longer retention time.
[0066] It should be noted that by mapping the skeletal keypoint coordinate sequence to the SO(3) Lie group manifold space and performing graph structure data convolution operations under the Riemannian geometric framework to extract differential geometric feature vectors, high-precision modeling and nonlinear feature extraction of pet joint rotational motion are achieved. Specifically, multi-scale manifold mapping combined with exponential mapping technology comprehensively captures the geometric constraints and multi-level characteristics of skeletal motion, significantly improving modeling accuracy; dynamic weight adjustment and Riemann gradient descent algorithm optimize the learning process of adjacency matrix, ensuring geometric constraint consistency and enhancing feature representation ability; quantization design of tangent space velocity field and curvature tensor efficiently describes motion intensity and smoothness characteristics, and combined with circular buffer and anomaly scoring mechanism, further optimizes storage efficiency and real-time performance. The overall solution not only solves the limitations of traditional methods in geometric constraint modeling and dynamic weight learning, but also provides high-quality data support and innovative technical paths for pet action recognition, health monitoring, and abnormal behavior detection.
[0067] S4: The spatiotemporal topological feature vector and the differential geometric feature vector are fused by tensor product, and then input into a preset classification model for health status identification to obtain the biological behavior abnormality type and physiological indicator evaluation results.
[0068] Furthermore, the tensor product fusion of the spatiotemporal topological feature vector and the differential geometric feature vector includes: The spatiotemporal topological feature vector and the differential geometric feature vector are fused using a tensor product operation, specifically as follows: ; in, Let K be the spatiotemporal topological feature vector with dimension K×(D+1). Let P be a differential geometric eigenvector with dimension P×Q. The fused feature tensor has dimensions K×P×(D+Q+1); Perform dimensionality reduction processing on the fused feature tensor; specifically, use principal component analysis algorithm to reduce the dimensionality of the tensor; compress the feature dimension to the input dimension requirement of the preset classification model, and output a feature vector of fixed dimension.
[0069] In an optional embodiment, the tensor product operation includes: element-wise multiplying the spatiotemporal topological feature vector with the differential geometric feature vector; concatenating the multiplication result into a three-dimensional tensor with dimensions K×P×(D+Q+1); and outputting the fused feature tensor as input to a subsequent classification model.
[0070] In an optional embodiment, the tensor product operation further includes the following steps: calculating weight coefficients for the spatiotemporal topological feature vector and the differential geometric feature vector respectively; adjusting the feature vectors according to the weight coefficients; and fusing the weighted feature vectors through the tensor product operation.
[0071] In an optional embodiment, the principal component analysis algorithm is implemented through the following steps: calculating the covariance matrix of the fused feature tensor; extracting the first N principal components, where N is the input dimension of the preset classification model; and storing the dimensionality-reduced feature vectors in a fixed-dimensional input format.
[0072] In an optional embodiment, the dimensionality reduction process further includes the following steps: performing incremental principal component analysis on the newly input feature tensor; dynamically updating the principal component matrix to adapt to real-time data changes; and outputting the updated dimensionality-reduced feature vector.
[0073] Furthermore, the health status identification process, which involves inputting a pre-defined classification model, includes: A pre-trained classification model based on deep learning is invoked. The model contains multiple layers of convolutional neural networks and fully connected layers. The pre-trained weights are obtained by optimization through a publicly available pet behavior dataset, which contains labels for normal and abnormal behaviors.
[0074] The dimensionality-reduced feature vectors are input into the classification model to perform feature input and inference; specifically, the input features are batch normalized; high-order features are extracted through convolutional layers; and classification results are generated through fully connected layers, outputting the biological behavior abnormality type and physiological indicator evaluation results. Generate behavior labels based on the type of anomaly, such as fall, limping, joint stiffness, etc. A health score is generated based on the results of physiological indicator assessment, with a range of 0-100. Behavioral tags and health scores are stored in a database, and health status reports are output for subsequent querying and analysis.
[0075] In an optional embodiment, the health score is calculated by the following steps: weighted summation of the anomaly probabilities in the classification results; mapping the weighted results to a range of 0-100; and outputting the health score and storing it in a database.
[0076] In an optional embodiment, the output health status report further includes the following steps: calculating a priority score for each anomaly type; sorting the anomaly types according to the scores; and storing the sorting results in a circular buffer for real-time querying.
[0077] It should be noted that by efficiently fusing spatiotemporal topological feature vectors and differential geometric feature vectors through tensor product operations, and then using principal component analysis (PCA) to reduce the dimensionality of the fused feature tensors, seamless integration and dimensionality optimization of multimodal features are achieved. Subsequently, a pre-trained classification model based on deep learning is used to identify the health status of the dimensionality-reduced feature vectors, accurately classifying abnormal behaviors and quantifying them to generate health scores, outputting an intuitive health status report. Finally, by calculating priority scores for abnormal types and combining them with a circular buffer storage mechanism, real-time monitoring and efficient management of abnormal behaviors are achieved. The overall solution not only significantly improves the multimodal feature representation capability and the accuracy of classification tasks, but also optimizes the system's real-time performance and practicality through dynamic updating of the principal component matrix, health score quantification, and priority ranking design, providing high-quality technical support and innovative solutions for pet health monitoring, abnormal behavior early warning, and scientific research.
[0078] Example 2, refer to Figures 2-4 This is the second embodiment of the present invention. This embodiment also provides a pet action recognition and health monitoring system based on deep learning, including: a data acquisition and preprocessing module, used to acquire biological behavior image data of the target object, extract the skeletal key point coordinate sequence in the image frame through a three-dimensional pose estimation model, and generate temporal three-dimensional pose data; The topology data analysis module is used to construct a topology data analysis unit, convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. The manifold space graph convolution module is used to construct manifold space graph convolution units, map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operations under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion. The feature fusion classification module is used to fuse the spatiotemporal topological feature vector and the differential geometric feature vector through tensor product, and input the fusion into a preset classification model to identify the health status, thereby obtaining the biological behavior abnormality type and physiological indicator evaluation results.
[0079] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a deep learning-based method for pet motion recognition and health monitoring. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0080] This embodiment also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it performs the following steps: acquiring biological behavior image data of a target object, extracting the skeletal key point coordinate sequence in the image frame through a three-dimensional pose estimation model, and generating temporally sequenced three-dimensional pose data. A topology data analysis unit is constructed to convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. Construct a graph convolution unit in a manifold space to map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operation under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion; The spatiotemporal topological feature vector and the differential geometric feature vector are fused by tensor product, and then input into a preset classification model for health status identification to obtain the biological behavior abnormality type and physiological indicator evaluation results.
[0081] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
[0082] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0083] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0086] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0087] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for pet motion recognition and health monitoring based on deep learning, characterized in that: include, Acquire biological behavior image data of the target object, extract the skeletal key point coordinate sequence in the image frame through a 3D pose estimation model, and generate temporal 3D pose data. A topology data analysis unit is constructed to convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. Construct a graph convolution unit in a manifold space to map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operation under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion; The spatiotemporal topological feature vector and the differential geometric feature vector are fused by tensor product, and then input into a preset classification model for health status identification to obtain the biological behavior abnormality type and physiological indicator evaluation results.
2. The deep learning-based pet action recognition and health monitoring method as described in claim 1, characterized in that: The extracted sequence of skeletal keypoint coordinates from the image frame includes: A pre-trained model based on the HRNet architecture is invoked. The model contains cascaded high-resolution convolutional modules and a top-down keypoint regression branch. The weights of the pre-trained model are obtained by optimization using a publicly available animal pose dataset. The pre-trained image sequence is input into the three-dimensional pose estimation model, which outputs the two-dimensional coordinate sequence and confidence score of the pet's skeletal key points in each frame of the image. The skeletal key points include 16 predefined anatomical nodes, including the head, spine, and limb joints.
3. The deep learning-based pet action recognition and health monitoring method as described in claim 2, characterized in that: Converting the temporally sequenced 3D pose data into a topological complex structure includes: The temporalized 3D pose data is divided into overlapping subsequences according to a preset time window. The length of the time window is 64 frames, and the overlap rate of adjacent time windows is 50%. The overlapping subsequences are stored as tensors of M×16×3, where M is the number of frames in the time window. For each subsequence, multi-scale simplicial complex generation is performed, including: constructing a zero-dimensional simplicial complex based on spatial proximity, wherein the zero-dimensional simplicial complex represents a set of key points; constructing a one-dimensional simplicial complex based on motion trajectory similarity, wherein the one-dimensional simplicial complex represents the edges connecting key points; and generating a two-dimensional simplicial complex through a dynamic threshold algorithm, wherein the two-dimensional simplicial complex represents motion patches, and the dynamic threshold is adjusted according to the variance of the subsequence.
4. The deep learning-based pet action recognition and health monitoring method as described in claim 3, characterized in that: The topological invariants used to calculate the motion trajectory include: Persistent cohomology analysis is performed on the multiscale simple complex to generate a persistent barcode containing birth-death time pairs. The persistent cohomology analysis is implemented using the Ripser algorithm. The persistent barcode is processed by: extracting zero-dimensional topological features, which represent the connectivity lifetime of key points; extracting one-dimensional topological features, which represent the closure lifetime of the motion trajectory; and generating an enhanced topological feature vector through weighted fusion, wherein the weights of the enhanced topological feature vector are dynamically allocated according to the feature variance.
5. The deep learning-based pet action recognition and health monitoring method as described in claim 4, characterized in that: The generated spatiotemporal topological feature vector includes: The enhanced topological feature vector is aligned with the timestamp of the time window, and a global spatiotemporal topological feature vector is generated by splicing the time windows. The global spatiotemporal topological feature vector has a dimension of K×(D+1), where K is the number of time windows and D is the dimension of the enhanced topological feature. The spatiotemporal topological feature vectors are stored in a circular buffer in chronological order. The buffer capacity is adjusted according to the input length of the classification model, and a fixed-dimensional feature tensor is output.
6. The deep learning-based pet action recognition and health monitoring method as described in claim 5, characterized in that: The operation of convolution on graph-structured data within the Riemannian geometric framework includes, An adjacency matrix is constructed based on the spatial topological relationships of skeletal keypoints. The element values of the adjacency matrix represent the connection weights between skeletal keypoints, and the connection weights are calculated by normalizing the Euclidean distance. The connection weights are adjusted using the Riemann gradient descent algorithm; Perform convolution operations on graph-structured data within the Riemannian geometric framework.
7. The deep learning-based pet action recognition and health monitoring method as described in claim 6, characterized in that: The health status identification process using the input preset classification model includes: The pre-trained classification model based on deep learning is invoked. The pre-trained classification model contains multiple layers of convolutional neural networks and fully connected layers. The weights of the pre-trained classification model are obtained through a publicly available pet behavior dataset, which contains labels for normal and abnormal behaviors. The dimensionality-reduced feature vectors are input into the classification model, and the input features are subjected to batch normalization. High-order features are extracted using convolutional layers; Classification results are generated through fully connected layers, and the results of biological behavior abnormality type and physiological index assessment are output. Generate behavior labels based on the anomaly type; A health score is generated based on the assessment results of physiological indicators; Store behavioral tags and health scores in a database and output a health status report.
8. A deep learning-based pet motion recognition and health monitoring system, based on the deep learning-based pet motion recognition and health monitoring method according to any one of claims 1 to 7, characterized in that: include, The data acquisition and preprocessing module is used to acquire biological behavior image data of the target object, extract the coordinate sequence of skeletal key points in the image frame through a three-dimensional pose estimation model, and generate temporal three-dimensional pose data. The topology data analysis module is used to construct a topology data analysis unit, convert the temporal three-dimensional attitude data into a topological complex structure, calculate the topological invariants of the motion trajectory, and generate a spatiotemporal topological feature vector. The manifold space graph convolution module is used to construct manifold space graph convolution units, map the sequence of coordinates of the skeletal key points to a preset Lie group manifold space, perform graph structure data convolution operations under the Riemannian geometric framework, and extract the differential geometric feature vector of skeletal motion. The feature fusion classification module is used to fuse the spatiotemporal topological feature vector and the differential geometric feature vector through tensor product, and input the fusion into a preset classification model to identify the health status, thereby obtaining the biological behavior abnormality type and physiological indicator evaluation results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the deep learning-based pet motion recognition and health monitoring method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the deep learning-based pet motion recognition and health monitoring method according to any one of claims 1 to 7.