A multi-view skeleton reconstruction method and system for digital evaluation of dog training behavior
By combining multi-view synchronous video acquisition with an individual physiological constraint database, the problems of posture detection and occlusion in the quantitative assessment of canine training behavior were solved. This enabled high-precision, personalized semantic behavior analysis and quantitative evaluation, improving the accuracy and personalized feedback capabilities of canine training behavior assessment.
Patent Information
- Application Number
- CN202610396668.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-27
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for quantitative evaluation of canine training behaviors suffer from problems such as insufficient adaptability of posture detection, poor handling of occluded scenes, neglect of individual differences in data preprocessing, lack of physical interpretability in feature extraction, and difficulty in handling complex movements in behavior recognition. These issues make it difficult to achieve high-precision, personalized, and semantic quantitative evaluation.
Multi-view synchronous video acquisition is adopted. Two-dimensional key points are detected and three-dimensional reconstruction is performed by a neural network integrating the canine body region attention mechanism. Combined with bundle adjustment optimization, an individual dynamic physiological constraint library is constructed for anomaly detection and interpolation repair. Features are extracted using a spatiotemporal graph convolutional network with physical constraint embedding, and semantic parsing and multi-dimensional deviation quantification analysis are performed based on behavioral grammar rules.
It improves the accuracy and occlusion robustness of canine motion capture, enhances personalized processing capabilities and the physical interpretability of feature representation, and realizes closed-loop feedback of semantic behavior analysis and quantitative evaluation, providing standardized data support for police performance evaluation and genetic screening.
Smart Images

Figure CN122336799A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision and canine behavior recognition, specifically to a method and system for digitally evaluating canine training behavior based on multi-view skeletal reconstruction. Background Technology
[0002] Objective and quantitative evaluation of canine training effectiveness is of great significance for the selection and training of working dogs in the military, police, search and rescue, and guide dogs. Traditional evaluation methods mainly rely on the subjective observation of trainers, which makes it difficult to achieve accurate quantification and is subject to individual differences.
[0003] With the development of computer vision technology, 3D skeleton reconstruction based on multi-view video has provided a new technical means for animal behavior analysis. However, existing methods still have the following limitations when applied to the quantitative assessment of canine behavior: General pose detection models are not adaptable to the special skeletal structure of dogs and occluded scenes; the multi-view reconstruction process lacks effective use of detection confidence; data preprocessing ignores the impact of individual physiological differences and movement states on restoration strategies; feature extraction lacks physical interpretability; behavior recognition has difficulty handling the hierarchical semantic relationships of complex actions; training evaluation remains at the level of simple classification, lacking multi-dimensional quantitative analysis and personalized feedback.
[0004] Therefore, there is a need for a digital evaluation method for canine behavior that can achieve high-precision capture, personalized processing, semantic analysis, and quantitative evaluation. Summary of the Invention
[0005] Based on the shortcomings of the prior art described above, the purpose of this invention is to provide a digital assessment method and system for canine training behavior using multi-view skeletal reconstruction, in order to solve the aforementioned technical problems.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a digital assessment method for canine training behavior based on multi-view skeletal reconstruction, comprising: S1: Image data of the dog training process is acquired through multi-view synchronous video acquisition. A neural network with an integrated dog body region attention mechanism is used to detect two-dimensional key points from each viewpoint, perform three-dimensional reconstruction, and optimize by bundle adjustment to obtain a three-dimensional skeletal key point sequence. S2: Anomaly detection is performed on the 3D skeletal keypoint sequence based on a pre-built individual dynamic physiological constraint library, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. S3: A spatiotemporal graph convolutional network based on physical constraint embedding performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; S4: Perform frame-level primitive classification based on behavioral feature vectors, and perform grammatical parsing in conjunction with preset behavioral grammar rules to obtain semantic action fragments; S5: Perform spatiotemporal alignment and deviation quantification analysis between the action segments and the pre-built training standard action digital twin model to generate phenotypic vectors and behavior evaluation reports.
[0007] The present invention is further configured such that S1 includes: The training process of dogs was synchronously captured by multiple video acquisition devices set up at different observation locations to obtain multi-view image data. Based on a neural network model with an integrated canine body region attention mechanism, two-dimensional key point detection is performed on key parts of the canine body in images from various perspectives to obtain two-dimensional skeletal key points and corresponding detection confidence scores for each perspective. Based on the detection confidence of 2D skeleton key points from various perspectives, the multi-view data is filtered using a preset confidence threshold to determine high-confidence view combinations, and triangulation processing is performed based on the high-confidence view combinations to obtain initial 3D skeleton key points. A sequence of 3D skeleton key points is generated by performing bundle adjustment optimization on the initial 3D skeleton key points.
[0008] The present invention is further configured such that S2 includes: Based on the historical movement data of dogs in the current training phase, the system automatically learns the length range of each bone segment, the range of joint movement angles, and the left-right symmetry ratio using skeletal structure statistical learning methods and biomechanical methods, and constructs and dynamically updates an individual dynamic physiological constraint library. Based on the individual dynamic physiological constraint library, the consistency of the three-dimensional skeleton key point sequence is checked, and data frames that do not meet the individual dynamic physiological constraint conditions are marked as abnormal frames; For abnormal or missing frames, the movement state of the dog is identified based on the temporal motion features of the three-dimensional skeletal key point sequence. A preset interpolation model matching the movement state is then called to repair the data. Spatial standardization processing is then performed on the repaired three-dimensional skeletal key point sequence to generate a standardized skeletal sequence.
[0009] The present invention is further configured such that S3 includes: A spatiotemporal graph structure is constructed with key points of the dog skeleton as nodes and skeletal connections as edges. A standardized three-dimensional skeleton sequence is input into a spatiotemporal graph convolutional network guided by physical constraints for feature extraction to obtain motion features. The training process of the spatiotemporal graph convolutional network introduces canine biomechanical rules as physical constraints, so that the extracted motion features satisfy the constraints of joint motion continuity and gait phase. An action feature layer is established based on the cross-attention mechanism to generate behavioral feature vectors that represent the behavioral state of dogs.
[0010] The present invention is further configured such that S4 includes: Based on the behavioral feature vector, each frame of data is classified into primitives using a pre-defined behavioral primitive classification model, and the corresponding classification confidence is generated to obtain the frame-level primitive category sequence and the corresponding classification confidence. The frame-level primitive category sequence is matched with a preset canine behavior grammar rule base, wherein the behavior grammar rule base includes a variety of defined behavior primitives and legal conversion relationships between behavior primitives; When a classification confidence score meets a preset threshold but cannot match a primitive sequence in the canine behavior grammar rule base, a confirmation command is issued, and in response to the confirmation command, the action sequence is added to the canine behavior grammar rule base, thereby achieving online adaptive expansion of the primitive base and grammar rules. The optimal parsing path that conforms to the behavior grammar rule library is found in the frame-level primitive category sequence by using a path search method. The temporal boundary of the behavior primitive is determined based on the optimal parsing path, and the frame-level primitive category sequence is divided into time intervals to obtain semantic action fragments containing 3D skeleton keypoint sequences.
[0011] The present invention is further configured such that S5 includes: a standard model matching step, a spatiotemporal alignment and deviation calculation step, and an evaluation result generation step.
[0012] The present invention is further configured such that the standard model matching step includes: Based on the training item identifier corresponding to the semantic action segment, the standard action model corresponding to the training item identifier is retrieved from the pre-built training standard action digital twin model library. The standard action model includes: skeletal structure definition, key joint nodes, standard skeletal trajectory sequence corresponding to the key joints, and action stage labels. The skeletal structure definition, key joint nodes and action stage labels in the standard action model are analyzed using the skeletal topology analysis method. Based on the connection relationship between key joint nodes, a skeletal topology diagram is constructed. The skeletal topology diagram is matched with the connection relationship of the three-dimensional skeletal key points in the semantic action segment to establish a skeletal topology mapping relationship consistent with the sequence of three-dimensional skeletal key points in the semantic action segment. Based on the skeletal topology mapping relationship, the 3D skeletal key point sequence in the semantic action segment is structurally standardized, and the semantic action segment is stage-labeled according to the action stage labels in the standard action model to form an action feature sequence to be aligned with action stage identifiers.
[0013] The present invention is further configured such that the spatiotemporal alignment and deviation calculation steps include: Based on the action feature sequence to be aligned and the standard skeletal trajectory sequence in the standard action model, a temporal alignment method is used to match the two sequences in the time dimension to obtain the temporal mapping relationship between the corresponding action stages. After completing the temporal dimension matching, the spatial pose alignment method is used to perform spatial registration of the 3D skeleton key points in the corresponding frame, so that the skeleton pose of the semantic action segment is in a unified coordinate reference system with the standard action model. After completing the spatiotemporal alignment, the differences in spatial position changes, joint angle changes, and duration of action phases of each key joint are extracted, and action execution deviation data is generated based on a preset multidimensional deviation index system. The action execution deviation data includes: key joint posture differences, action phase duration differences, and key joint spatial position change characteristics.
[0014] The present invention is further configured such that the evaluation result generation step includes: Based on the action execution deviation data, the differences in the posture of key joints, the differences in the duration of the action phase, and the spatial position changes of key joints are classified and statistically processed, and a multi-dimensional set of behavioral features for evaluating training behavior is formed by feature merging. Based on a multidimensional behavioral feature set, the range of key joint angle changes and posture stability are analyzed by joint posture deviation statistical method. The sequence and duration of action phase transitions are evaluated by action phase temporal consistency analysis method. Combined with the spatial position change characteristics of key joints, the behavioral pause characteristics of dogs during training are comprehensively analyzed by behavioral decision pattern analysis method. In this way, corresponding posture stability index, temporal coordination index, and decision hesitation index are generated to form a phenotypic vector of dog training behavior. Based on the phenotypic vectors of canine training behavior and action execution deviation data, the indicators of each dimension are comprehensively evaluated through preset training evaluation rules. The evaluation results are then structured and organized according to a preset behavior evaluation report template to generate a behavior evaluation report that includes quantitative evaluation indicators, explanations of behavior deviations, and targeted training improvement suggestions.
[0015] This invention also provides a digital assessment system for canine training behavior based on multi-view skeletal reconstruction, the system comprising: Motion capture module: It acquires image data of the dog training process through multi-view synchronous video, uses a neural network with integrated dog body region attention mechanism to detect two-dimensional key points from each view, performs three-dimensional reconstruction, and obtains a three-dimensional skeleton key point sequence through bundle adjustment optimization. Data preprocessing module: Based on a pre-built individual dynamic physiological constraint library, anomaly detection is performed on the 3D skeletal key point sequence, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. Feature extraction module: Based on a spatiotemporal graph convolutional network with physical constraint embedding, it performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; Action segmentation and recognition module: performs frame-level primitive classification based on behavioral feature vectors, and performs grammatical parsing in combination with preset behavioral grammar rules to obtain semantic action fragments; Training evaluation module: Performs spatiotemporal alignment and deviation quantification analysis on action segments and pre-built digital twin models of training standard actions to generate phenotypic vectors and behavior evaluation reports.
[0016] This invention provides a method and system for digital evaluation of canine training behavior based on multi-view skeletal reconstruction. The method comprises: S1: acquiring image data of the dog's training process through multi-view synchronous video, detecting two-dimensional key points from each viewpoint using a neural network integrating a canine body region attention mechanism, performing three-dimensional reconstruction, and optimizing using bundle adjustment to obtain a three-dimensional skeletal key point sequence; S2: performing anomaly detection on the three-dimensional skeletal key point sequence based on a pre-built individual dynamic physiological constraint library, repairing abnormal or missing frames using different interpolation models, and obtaining a standardized skeletal sequence after spatial standardization; S3: performing feature modeling on the standardized three-dimensional skeletal sequence based on a spatiotemporal graph convolutional network with physical constraint embedding, and generating behavioral feature vectors through a cross-attention mechanism; S4: performing frame-level primitive classification based on the behavioral feature vectors, and performing grammatical parsing in conjunction with preset behavioral grammar rules to obtain semantic action segments; S5: performing spatiotemporal alignment and deviation quantification analysis on the action segments and a pre-built digital twin model of training standard actions to generate phenotypic vectors and a behavior evaluation report. The beneficial effects include: Improving the accuracy and occlusion robustness of canine motion capture: Introducing a canine body region attention mechanism enhances the detection capability of key points under occluded postures such as sitting and lying down; 3D reconstruction is performed by using confidence-weighted selection of multi-view combinations, effectively suppressing interference from low-quality views and significantly improving the accuracy and stability of skeleton reconstruction in complex scenes.
[0017] Enhance personalized processing capabilities and physical interpretability of feature representation: Construct an individual dynamic physiological constraint library to achieve anomaly detection and interpolation repair based on motion state adaptation, making preprocessed data more in line with biomechanical laws; Employ a spatiotemporal graph convolutional network guided by physical constraints and combine it with a cross-attention mechanism to fuse physiological signals, so that the extracted behavioral features have both kinematic rationality and expressive power.
[0018] Achieving closed-loop feedback for semantic behavior parsing and quantitative evaluation: Frame-level primitive classification and grammatical parsing are performed based on a behavior grammar rule base, supporting online adaptive expansion to achieve hierarchical semantic segmentation of complex actions; Multi-dimensional deviation quantitative analysis is conducted by constructing a standard action digital twin model to generate phenotypic vectors and personalized training improvement suggestions, providing standardized data support for police performance evaluation and genetic screening.
[0019] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the 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. In the drawings: Figure 1 A flowchart illustrating a digital assessment method for canine training behavior based on multi-view skeletal reconstruction, as shown in an exemplary embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the structure of a multi-view skeletal reconstruction digital assessment system for dog training behavior, as an exemplary embodiment of the present invention. Detailed Implementation
[0021] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0022] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0023] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0024] Example 1: A digital assessment method for canine training behavior based on multi-view skeletal reconstruction, such as Figure 1 As shown, it includes: S1: Image data of the dog training process is acquired through multi-view synchronous video acquisition. A neural network with an integrated dog body region attention mechanism is used to detect two-dimensional key points from each viewpoint, perform three-dimensional reconstruction, and optimize by bundle adjustment to obtain a three-dimensional skeletal key point sequence. S2: Anomaly detection is performed on the 3D skeletal keypoint sequence based on a pre-built individual dynamic physiological constraint library, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. S3: A spatiotemporal graph convolutional network based on physical constraint embedding performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; S4: Perform frame-level primitive classification based on behavioral feature vectors, and perform grammatical parsing in conjunction with preset behavioral grammar rules to obtain semantic action fragments; S5: Perform spatiotemporal alignment and deviation quantification analysis between the action segments and the pre-built training standard action digital twin model to generate phenotypic vectors and behavior evaluation reports.
[0025] The present invention is further configured such that S1 includes: The training process of dogs was synchronously captured by multiple video acquisition devices set up at different observation locations to obtain multi-view image data. Based on a neural network model with an integrated canine body region attention mechanism, two-dimensional key point detection is performed on key parts of the canine body in images from various perspectives to obtain two-dimensional skeletal key points and corresponding detection confidence scores for each perspective. Based on the detection confidence of 2D skeleton key points from various perspectives, the multi-view data is filtered using a preset confidence threshold to determine high-confidence view combinations, and triangulation processing is performed based on the high-confidence view combinations to obtain initial 3D skeleton key points. A sequence of 3D skeletal keypoints is generated by performing bundle adjustment optimization on the initial 3D skeletal keypoints. Specifically, multiple industrial-grade high-definition cameras are deployed around the dog training area. All cameras are connected to the same synchronization controller via hardware trigger lines to achieve frame-level hardware synchronous acquisition, ensuring that image frames captured at the same time from different perspectives are strictly aligned in time. The camera resolution is set to 1920×1080 pixels by default, and the acquisition frame rate is set to 25 frames / second by default. The Zhang Zhengyou calibration method is used to calibrate each camera offline. The specific operation is as follows: a checkerboard calibration board is placed in the center of the training area, and 20 to 30 calibration images are taken from different angles. The intrinsic and extrinsic parameters of each camera are obtained through corner detection and optimization calculation. The intrinsic parameters include focal length, principal point coordinates, and lens distortion coefficient, while the extrinsic parameters include rotation matrix and translation vector. After calibration, the intrinsic and extrinsic parameters of all cameras are stored in the system database. Video frames simultaneously acquired from various perspectives are input into a pre-trained neural network model integrating a canine body region attention mechanism. This neural network model is based on an improved YOLOv8 architecture, embedding a canine body key region attention module in the backbone network and introducing a keypoint regression branch in the head detection part to output the two-dimensional coordinates of the canine skeletal key points. The neural network model is used to detect key points in each frame of the canine body, thereby outputting the two-dimensional pixel coordinates of 32 predefined skeletal key points. These two-dimensional key points correspond to predefined skeletal key nodes in the canine anatomy, and their corresponding three-dimensional skeletal key points include: The model identifies 32 key nodes, including the left ear tip, left ear root, right ear tip, right ear root, interfrontal bone (nose tip), mandibular tip (chin tip), first cervical vertebra (cervical joint 1), sixth cervical vertebra (cervical joint 2), third thoracic vertebra (scapular junction), first lumbar vertebra (midpoint of the spine), seventh lumbar vertebra (pelvic junction), coccyx (tail root), middle tail, tail tip, top of left scapula, left shoulder joint, left elbow joint, left wrist joint, left phalanx, top of right scapula, right shoulder joint, right elbow joint, right wrist joint, right phalanx, left hip joint, left knee joint, left tarsal joint, left metatarsophalangeal joint, right hip joint, right knee joint, right tarsal joint, and right metatarsophalangeal joint. The model calculates the detection confidence score for each key point using the probability distribution of the output layer. The confidence score ranges from 0 to 1, reflecting the reliability of the model's localization results for that key point.For the same keypoint detected by all viewpoints at the same time, the system collects the 2D coordinates and confidence scores of the keypoint under each viewpoint. Viewpoint data with confidence scores below a preset threshold (e.g., 0.6) are discarded. The remaining high-confidence viewpoints are sorted from highest to lowest confidence. The two viewpoints with the highest confidence are selected first, and the baseline angle between the optical centers of these two viewpoints is calculated. If the angle is greater than a preset threshold (e.g., 15 degrees), these two viewpoints are used for reconstruction. If the angle is less than the preset threshold (e.g., 15 degrees), the next viewpoint with the highest confidence is introduced to form a multi-view combination, ensuring that the selected viewpoint combination has both high confidence and meets geometric stability requirements. Based on the selected high-confidence viewpoint combination and its corresponding 2D keypoint coordinates, combined with the camera's intrinsic and extrinsic parameters, a direct linear transformation algorithm is used for triangulation. For the case of two viewpoints, the linear equation system is directly solved to obtain the intersection point. For three or more viewpoints, the least squares method is used to solve the overdetermined equation system to obtain the optimal 3D coordinate estimate, thus obtaining the initial 3D coordinates of each keypoint. For the initial 3D coordinates of all obtained keypoints, bundle adjustment is used for global optimization. The optimization objective is to adjust the 3D keypoint coordinates while keeping the camera calibration parameters unchanged, so as to minimize the sum of the reprojection errors of all keypoints in all viewpoints. During the optimization process, a bone length consistency constraint is introduced, that is, the distance between adjacent keypoints should conform to the basic range of canine anatomy. The optimization algorithm adopts the Levenberg-Marquardt iterative method. In each iteration, the deviation between the reprojection position of the current 3D point in each viewpoint and the actual detection position is calculated. The 3D point coordinates are adjusted according to the deviation gradient until the iteration converges, that is, the change in reprojection error is less than a preset threshold (e.g., 0.5 pixels). The optimized 3D coordinate sequence is the final output 3D skeletal keypoint sequence. Each frame contains the 3D coordinates of each keypoint in the 3D skeletal keypoint set in the training field coordinate system.
[0026] The present invention is further configured such that S2 includes: Based on the historical movement data of dogs in the current training phase, the system automatically learns the length range of each bone segment, the range of joint movement angles, and the left-right symmetry ratio using skeletal structure statistical learning methods and biomechanical methods, and constructs and dynamically updates an individual dynamic physiological constraint library. Based on the individual dynamic physiological constraint library, the consistency of the three-dimensional skeleton key point sequence is checked, and data frames that do not meet the individual dynamic physiological constraint conditions are marked as abnormal frames; For abnormal or missing frames, the system identifies the dog's motion state based on the temporal motion features of the 3D skeletal keypoint sequence, and uses a preset interpolation model matching the motion state to repair the data. The repaired 3D skeletal keypoint sequence is then spatially normalized to generate a standardized skeletal sequence. Specifically, in the initial training or initialization phase, the system collects high-quality 3D skeletal keypoint sequences of free movement for a preset duration (e.g., 5 minutes) as historical motion data. This phase requires the dog to be in an unobstructed, natural motion state, with the keypoint location reliability output by the keypoint detection model exceeding a preset threshold (e.g., 0.8). Based on this historical data, the system automatically constructs an individual dynamic physiological constraint library using a skeletal structure statistical learning method. Key nodes related to the movement of the dog's limbs and trunk posture were selected from the 3D skeletal keypoint sequence. Based on canine anatomical connections, skeletal segment structures were constructed, dividing the 3D skeletal keypoints into several skeletal segments according to canine anatomical definitions. These segments included: left forelimb upper arm, left forelimb forearm, right forelimb upper arm, right forelimb forearm, trunk, left hind limb thigh, left hind limb lower leg, right hind limb thigh, and right hind limb lower leg. The left forelimb upper arm was defined as the line connecting the left shoulder joint to the left elbow joint. The lengths of the following bone segments are defined as follows: left elbow to left wrist; right forearm upper arm to right shoulder to right elbow; right forearm to right elbow to right wrist; trunk to shoulder center to hip center; left hind limb thigh to left hip to left knee; left hind limb lower leg to left knee to left tarsal joint; right hind limb thigh to right hip to right knee; and right hind limb lower leg to right knee to right tarsal joint. For each bone segment, the numerical sequence of bone segment lengths across all frames is statistically analyzed, and the mean and standard deviation of the length sequence are calculated. The normal length range of a bone segment is defined as the mean plus or minus three times the standard deviation. For each joint angle, including shoulder pitch angle, elbow angle, and knee angle, the shoulder pitch angle was calculated from the trunk and upper arm directions, the elbow angle from the angle between the upper arm and forearm, and the knee angle from the angle between the thigh and lower leg. The maximum and minimum values of the joint angles in the entire sequence were recorded as the range of motion of the joints. Simultaneously, the bone length ratios of the left and right symmetrical limbs were calculated, including: the ratio of the length of the left forelimb upper arm to the right forelimb upper arm, the ratio of the length of the left forelimb forearm to the right forelimb forearm, the ratio of the length of the left hind limb thigh to the right hind limb thigh, and the ratio of the length of the left hind limb lower leg to the right hind limb lower leg. The mean and standard deviation of each ratio were calculated, and the normal symmetrical proportion range was defined as the mean plus or minus 2 standard deviations. These statistical results constituted an individual dynamic physiological constraint database, which was dynamically updated after each training session using a weighted average method based on newly collected high-quality data. The weight of new data was 0.3, and the weight of old data was 0.7, allowing the constraint database to adapt to physiological changes caused by canine growth and development or training.For the 3D skeletal keypoint sequence generated in real time during subsequent training, the system performs consistency checks frame by frame. For each data frame, it sequentially checks whether the length of each bone segment is within the normal length range of the corresponding bone segment, whether the angle of each joint is within the corresponding joint range of motion, and whether the length ratio of the left and right symmetrical bone segments is within the normal symmetry ratio range. If any condition is not met, the frame is marked as an abnormal frame. At the same time, if a frame is missing part or all keypoints due to occlusion or reconstruction failure, it is marked as a missing frame. Abnormal frames and missing frames are collectively referred to as frames to be repaired. For frames to be repaired, temporal motion features are first extracted based on the continuous valid data of the five frames before and after the frame to be repaired, including: keypoint velocity, keypoint acceleration, and motion periodicity features obtained through autocorrelation function analysis. The extracted features are input into a pre-trained motion state classifier. This classifier uses the random forest algorithm and is trained offline on a large dataset of canine motion states labeled with different motion states, including standing, sitting, walking forward, walking backward, lying down, and crawling. The classifier outputs the motion state category to which the current segment to be repaired belongs and the corresponding confidence score. Based on the identified motion state, the system calls the corresponding preset interpolation model for data repair. If the motion state is periodic, including forward or backward movement, a harmonic interpolation model based on periodic features is used. The fundamental frequency and periodic variation characteristics of the motion trajectory are fitted using five effective frames of data before and after the motion, generating an interpolated frame with the same periodic phase as the preceding and following frames. If the motion state is transient, including lying down or sitting down, typical trajectory templates of the same type of motion are retrieved from a pre-built motion template library. This template library consists of standard motion data annotated by experts, containing the standard motion trajectory of each key point during the motion. A dynamic time warping algorithm is used to align the template trajectory with the effective data before and after the segment to be repaired. Then, the template trajectory is filled into the missing area according to the alignment relationship and weighted and smoothed with the preceding and following frames. If the motion state is static, including standing or lying down, a linear interpolation model is used to linearly transition the key point coordinates of the missing frame over time. After restoration, spatial standardization was performed on the entire 3D skeletal keypoint sequence. First, the torso center point was determined as the origin of the coordinate system, defined as the midpoint of the line connecting the centers of the shoulder and hip joints. Then, the direction from the shoulder joint to the hip joint was used as the torso principal axis, which was rotated to be parallel to the vertical axis. Simultaneously, the torso plane normal vector was rotated to be perpendicular to the horizontal plane, thus unifying the body orientation across all frames. Next, shoulder height was calculated, defined as the vertical distance from the shoulder joint to the ground in a static standing state. The ground was determined by the ground plane model in the 3D reconstructed scene. Continuous standing frames were selected from the motion state recognition results, and the average distance from the shoulder joint to the ground in these frames was taken as the individual shoulder height. All keypoint coordinates were then scaled by dividing by the shoulder height to eliminate dimensional differences between dogs of different sizes.The standardized 3D skeleton keypoint sequence is the standardized skeleton sequence. Each frame still contains 32 keypoints, but the coordinates have been normalized to a unified reference system and scale, which can be used for feature extraction for subsequent cross-individual comparisons.
[0027] The present invention is further configured such that S3 includes: A spatiotemporal graph structure is constructed with key points of the dog skeleton as nodes and skeletal connections as edges. A standardized three-dimensional skeleton sequence is input into a spatiotemporal graph convolutional network guided by physical constraints for feature extraction to obtain motion features. The training process of the spatiotemporal graph convolutional network introduces canine biomechanical rules as physical constraints, so that the extracted motion features satisfy the constraints of joint motion continuity and gait phase. A motion feature layer is established based on a cross-attention mechanism to generate behavioral feature vectors representing the dog's behavioral state. Specifically, after obtaining the standardized skeletal sequence, the system first constructs a spatiotemporal graph structure with dog skeletal keypoints as nodes and skeletal connections as edges. The skeletal keypoints are the set of keypoints contained in the standardized skeletal sequence generated in step S2. Each frame of the skeletal sequence contains 32 keypoints, which are defined as nodes in the graph, including: left ear tip, left ear root, right ear tip, right ear root, interfrontal bone (nose tip), mandibular distal end (chin tip), and first cervical vertebra (cervical joint 1). The following vertebrae are connected in a hollow structure: sixth cervical vertebra (cervical joint 2), third thoracic vertebra (scapular junction), first lumbar vertebra (midpoint of the spine), seventh lumbar vertebra (pelvic junction), coccyx (tail root), middle tail, tail tip, left scapula tip, left shoulder joint, left elbow joint, left wrist joint, left phalanx, right scapula tip, right shoulder joint, right elbow joint, right wrist joint, right phalanx, left hip joint, left knee joint, left tarsal joint, left metatarsophalangeal joint, right hip joint, right knee joint, right tarsal joint, and right metatarsophalangeal joint; the skeletal connections are hollow. The construction of spatial edges is based on the anatomical connections of canines, establishing edge connections between nodes directly connected by bones, including: shoulder joint to elbow joint, elbow joint to wrist joint, hip joint to knee joint, and knee joint to tarsal joint. Simultaneously, to depict the overall posture of the torso, some auxiliary connections are constructed using virtual nodes calculated from existing keypoints. The shoulder joint center is defined as the midpoint of the line connecting the left and right shoulder joints, and the hip joint center is defined as the midpoint of the line connecting the left and right hip joints. These virtual nodes are only used to establish spatial structural relationships and are not included in the keypoint node set. Based on this, connections are established between the shoulder joint center to the left and right shoulder joints, the hip joint center to the left and right hip joints, the shoulder joint center to the hip joint center to form the torso's main axis, the tail root to the middle of the tail, the middle of the tail to the tail tip, and the nodes of the head. Temporal edges are constructed by establishing edge connections between the same node in adjacent frames. The time window size is set to 3 frames, meaning the current frame is connected to the same node in the previous and following frames, forming local temporal dependencies in the time dimension.The constructed spatiotemporal graph structure is input into a physically constrained, guided spatiotemporal graph convolutional network (SPCRN) for feature extraction. This SPCRN consists of nine stacked SPCRN modules, each containing a spatial graph convolutional layer and a temporal convolutional layer. The spatial graph convolutional layer employs a partitioning strategy to divide the adjacency matrix into three subsets: the root node itself, centripetal nodes, and centrifugal nodes. Each subset is assigned independent learning weights, enabling the network to distinguish the feature aggregation methods of nodes with different spatial relationships. The temporal convolutional layer uses a one-dimensional convolution with a kernel size of 9, performing convolution operations along the temporal dimension on the feature sequence of each node to capture local temporal sequences. The network's output channel count for each module is set sequentially to 64, 64, 128, 128, 256, 256, 256, 512, and 512. The training process incorporates physical constraints based on canine kinetic dynamics as part of the loss function. These constraints include joint velocity continuity constraints, gait phase consistency constraints, and ground contact stability constraints. The joint velocity continuity constraint calculates the rate of change of the velocity vector at the same joint point between adjacent frames. The velocity vector is obtained by differentiating keypoint positions, and the constraint objective is to minimize velocity abrupt changes, ensuring the trajectory conforms to biomechanical smoothness requirements. The gait phase consistency constraint, based on the canine gait cycle, divides the gait cycle into a support phase and a swing phase. The support phase is defined as the foot contacting the ground, and the swing phase is defined as the foot leaving the ground and swinging forward. An auxiliary classifier forces the network to include gait phase information in the extracted features, and the constraint objective is that the alternation sequence of the support and swing phases conforms to canine kinematics. Ground contact stability constraints are applied when the vertical coordinates of foot keypoints are detected to be close to ground height and the velocity approaches zero. This forces the frame to be marked as a support phase, with the constraint objective being to maintain foot stability during the support phase. Foot keypoints include the left wrist joint, right wrist joint, left tarsal joint, and right tarsal joint. The ground height is the ground plane height determined during the 3D reconstruction and calibration phase of the training field using a calibration board or ground reference point, and serves as a unified reference plane for subsequent skeletal coordinate determination. The weight coefficient of the physical constraint term is set to 0.3, which, together with the standard classification loss, constitutes the total loss function. End-to-end training is performed on a pre-constructed canine motion training dataset. This dataset consists of data collected from multiple dogs under different training actions and manually labeled. The training consists of 100 rounds with an initial learning rate of 0.001, and the Adam optimizer is used for parameter updates. After training, the standardized skeleton sequence is input into the network for forward propagation to obtain an action feature tensor. The time dimension of the action feature tensor is consistent with the number of time frames of the input standardized skeleton sequence, denoted as T. Therefore, the dimension of the action feature tensor is T×512 feature channels. To generate a behavior feature vector that can comprehensively represent the canine's behavioral state, a cross-attention fusion module is constructed based on the action features.Specifically, the action feature sequence is divided into sub-feature sets of different time segments, and the correlation weights between different time segments are calculated through a cross-attention mechanism to enhance the feature representation of key action stages. The action features are used as query, key, and value matrices, and projected onto a unified dimensional space through a linear transformation. Then, the dot product between the query and key matrices is calculated to obtain the attention weight matrix, which is then softmax normalized. The normalized attention weights are used to weight and aggregate the action features to obtain the enhanced action feature representation. The enhanced action features are then input into a fully connected network for feature integration, outputting the final behavior feature vector. The dimension of the behavior feature vector is the number of time frames T multiplied by 512 feature channels. The feature vector of each frame comprehensively represents the dog's posture and motion state information at that moment, and is used for subsequent action segmentation and recognition tasks.
[0028] The present invention is further configured such that S4 includes: Based on the behavioral feature vector, each frame of data is classified into primitives using a pre-defined behavioral primitive classification model, and the corresponding classification confidence is generated to obtain the frame-level primitive category sequence and the corresponding classification confidence. The frame-level primitive category sequence is matched with a preset canine behavior grammar rule base, wherein the behavior grammar rule base includes a variety of defined behavior primitives and legal conversion relationships between behavior primitives; When a classification confidence score meets a preset threshold but cannot match a primitive sequence in the canine behavior grammar rule base, a confirmation command is issued, and in response to the confirmation command, the action sequence is added to the canine behavior grammar rule base, thereby achieving online adaptive expansion of the primitive base and grammar rules. The system employs a path search method to find the optimal parsing path that conforms to the behavior grammar rule base within the frame-level primitive category sequence. Based on this optimal parsing path, the temporal boundaries of the behavior primitives are determined, and the frame-level primitive category sequence is divided into temporal intervals to obtain semantic action segments containing 3D skeletal keypoint sequences. Specifically, after obtaining the behavior feature vector sequence, the system inputs the feature vector of each frame in the behavior feature vector sequence into a preset behavior primitive classification model for classification processing. This classification model uses a temporal convolutional network architecture, consisting of six stacked one-dimensional convolutional layers. Each convolutional layer has a kernel size of 5, a stride of 1, and padding to maintain the temporal length. The first convolutional layer has 128 output channels, the second 128, the third 256, the fourth 256, the fifth 512, and the sixth 512. Each convolutional layer is followed by a batch... The network consists of a normalization layer and a ReLU activation function, followed by a fully connected layer. The output dimension is 13, corresponding to 13 behavioral primitive categories: standing, sitting, moving forward, moving backward, lying down, crawling, sniffing, warning, still, turning around, looking up, looking down, and tail wagging. A softmax function follows the fully connected layer to convert the output into probability values for each frame belonging to each behavioral primitive category. The category with the highest probability is taken as the behavioral primitive category for that frame, and this probability value is output as the classification confidence score, ranging from 0 to 1. The system performs the above classification processing on all frames in the behavioral feature vector sequence in chronological order to obtain a frame-level primitive category sequence and its corresponding classification confidence score sequence.The frame-level primitive category sequence is matched against a pre-defined canine behavior grammar rule base. This rule base is a set of rules pre-built and stored in the system database during the deployment phase. The rule base uses a context-free grammar formal representation, and during the behavior parsing phase, the grammar rules are converted into a state transition graph structure to construct a state transition mesh for path search calculation. This structure is stored in the system database in JSON format. The rule base defines various behavioral primitives and the legal transformation relationships between them. Each rule contains a non-terminal symbol on the left and a sequence or combination of terminal symbols on the right. For example, a drug detection task is defined as a search phase, a sniffing phase, and an alarm phase connected sequentially. The search phase is defined as repeating actions such as moving forward or turning around once or multiple times, and the sniffing phase is defined as... After the detection primitive, walking can be selected to continue sniffing and repeat multiple times. The warning stage is defined as sitting or lying down. The lying down action is defined as a fine-grained action stage formed by the combination of basic behavior primitives after the standing posture. The fine-grained action stage is a behavior structure formed by the combination of basic behavior primitives within a short time window. It is used to describe the internal stages of complex actions, including fine-grained action stages such as bending the hind leg, extending the front leg downward and forward, lowering the torso, and the abdomen touching the ground. The turning action is defined as a fine-grained action stage formed by the combination of basic behavior primitives after standing. It includes fine-grained action stages such as torso rotation, crossing the front leg, and adjusting the hind leg, which occur in sequence. The backward action is defined as three or more consecutive backward primitives. The static standing is defined as more than 10 consecutive standing primitives and the key point displacement is less than a preset threshold. When a system detects a sequence of five or more consecutive primitives within a continuous segment of a frame-level primitive category sequence, and the classification confidence of each frame in this sequence is higher than a preset threshold (e.g., 0.6), but the primitive sequence cannot match any rule in the behavior grammar rule base, the system identifies it as a potential new behavior pattern. It temporarily stores this primitive sequence and its corresponding 3D skeletal keypoint sequence and issues a confirmation command to the trainer via the user interface for review and confirmation. If the trainer confirms the action as a valid behavior pattern, the system responds by adding the action sequence to the canine behavior grammar rule base, automatically generating new rule entries, and adding the typical trajectory of the action sequence to the action template library, thus achieving online adaptive expansion of the primitive base and grammar rules. For primitive sequences that match the grammar rule base, the system uses a dynamic programming-based path search method to find the optimal parsing path that conforms to the behavior grammar rule base. Using the frame-level primitive category sequence as input and the behavior grammar rule base as constraints, a state transition grid is constructed, and the Viterbi algorithm is used for optimal path search. Each state in the state transition grid corresponds to a behavior stage state defined in a behavior primitive category or grammar rule.In the path search initialization phase, the probability of the behavior primitive corresponding to the first frame is used as the initial probability of each state. For each subsequent frame, the transition probability from each grammatical state in the previous frame to each grammatical state in the current frame is calculated. The transition probability is determined by the legal transformation relationship defined in the behavior grammar rule base. The transition probability of legal transformation is set to 1, and the transition probability of illegal transformation is set to 0. The cumulative probability is calculated by multiplying the cumulative probability of the state in the previous frame by the transition probability and then by the probability that the primitive in the current frame belongs to the current state. For each state in the current frame, the value with the largest cumulative probability among all possible previous states is taken as the cumulative probability of that state, and a backtracking pointer is recorded. After recursively going frame by frame to the last frame, the state with the largest cumulative probability in the last frame is taken as the endpoint state. Starting from the endpoint state, the backtracking pointer is used to traverse backward to the first frame to obtain the grammatical state sequence to which each frame belongs, which is the optimal parsing path. The temporal boundaries of action primitives are determined based on the position of state changes in adjacent frames in the optimal parsing path. Frame intervals corresponding to consecutive identical states are divided into action primitive segments. For each action primitive segment, its start and end times, action primitive category labels, and the sequence of 3D skeletal keypoints within that time interval are extracted to form semantic action segments. Each semantic action segment includes an action segment identifier, a start frame number, an end frame number, an action primitive category name, the coordinates of 32 3D skeletal keypoints in each frame within the segment, and the average of the classification confidence sequences corresponding to all frames within the segment as the average classification confidence of the segment. All semantic action segments are organized in chronological order and output for subsequent standard model matching and bias quantification analysis.
[0029] The present invention is further configured such that S5 includes: a standard model matching step, a spatiotemporal alignment and deviation calculation step, and an evaluation result generation step. Specifically, the standard model matching step involves retrieving the standard action model corresponding to the current action segment from a pre-built standard action model library based on the semantic action segment obtained in step S4. By matching the behavior primitive category, action type, and action structure, the standard action trajectory most similar to the current dog's action is determined, providing a unified comparison benchmark for subsequent action quality evaluation. The spatiotemporal alignment and deviation calculation step involves aligning the three-dimensional skeletal key point sequence of the dog's actual action with the matched standard action model in terms of time dimension and spatial posture. The time series alignment method eliminates differences in action execution speed, and the spatial posture normalization eliminates differences in position and orientation. After alignment, the posture deviation, joint angle deviation, and motion trajectory deviation between each key point trajectory are calculated to quantify the degree of difference between the dog's action and the standard action. The evaluation result generation step involves comprehensively evaluating the dog's action performance according to the calculated multiple action deviation indicators and a preset evaluation rule or scoring model, generating a behavior evaluation result including action completion degree, action standardization degree, and overall training performance level.
[0030] The present invention is further configured such that the standard model matching step includes: Based on the training item identifier corresponding to the semantic action segment, the standard action model corresponding to the training item identifier is retrieved from the pre-built training standard action digital twin model library. The standard action model includes: skeletal structure definition, key joint nodes, standard skeletal trajectory sequence corresponding to the key joints, and action stage labels. The skeletal structure definition, key joint nodes and action stage labels in the standard action model are analyzed using the skeletal topology analysis method. Based on the connection relationship between key joint nodes, a skeletal topology diagram is constructed. The skeletal topology diagram is matched with the connection relationship of the three-dimensional skeletal key points in the semantic action segment to establish a skeletal topology mapping relationship consistent with the sequence of three-dimensional skeletal key points in the semantic action segment. Based on the skeletal topology mapping relationship, the 3D skeletal keypoint sequence in the semantic action fragments is structurally standardized, and the semantic action fragments are stage-labeled according to the action stage labels in the standard action model, forming an action feature sequence to be aligned with action stage identifiers. Specifically, in the standard model matching step, the system first obtains the semantic action fragments output in step S4. Each semantic action fragment includes a training item identifier, behavior primitive category, start and end time, and corresponding 3D skeletal keypoint sequence. The training item identifier comes from the training task configuration file, is selected and recorded by the trainer through the system interface before training begins, and is associated with and stored with the generated semantic action fragments during training. The training item identifier is a predefined task type, including box poison detection, long-range listening, and pouncing. The system retrieves a standard motion model that perfectly matches the current training item identifier from a pre-built digital twin model library of standard training motions. This model library uses a database table structure for storage, with each record corresponding to a standard motion model. Each record includes the training item identifier, skeletal structure definition, a list of key joint nodes, the standard skeletal trajectory sequence corresponding to each key joint node, and a sequence of motion stage labels. The skeletal structure definition is in JSON format, describing the connection relationships between key nodes. For example, the left forelimb includes the left shoulder joint, left elbow joint, and left wrist joint; the right forelimb includes the right shoulder joint, right elbow joint, and right wrist joint; the trunk includes the center of the shoulder joint, the center of the hip joint, the anterior end of the back midline, the middle of the back midline, and the posterior end of the back midline; the left hindlimb includes the left hip joint, left knee joint, and left ankle joint; the right hindlimb includes the right hip joint, right knee joint, and right ankle joint; the head includes the tip of the nose, left eye, right eye, left ear root, and right ear root; and the tail includes the tail root and tail midline. The key joint nodes are derived from the three-dimensional skeletal key point sequence detected in step S1, or are obtained by combining and mapping the three-dimensional skeletal key points according to the canine anatomy, and are used to establish a unified skeletal structure expression system between the standard action model and the actual collected skeletal key points; the key joint node list is the key joints participating in the action quality evaluation, including the left shoulder joint, right shoulder joint, left elbow joint, right elbow joint, left hip joint, right hip joint, left knee joint, right knee joint, etc.; the standard skeletal trajectory sequence is the three-dimensional coordinates of each key joint node in each frame during the execution of the standard action, which is generated by averaging multiple excellent police dog samples and stored in units of frames; the action stage label is a semantic mark describing the action process, including the start stage, descent stage, contact stage, hold stage, release stage, recovery stage, etc., each stage corresponds to a continuous frame interval and is accompanied by a stage name.After obtaining the standard action model, the system parses the skeletal structure definition in the model and uses the breadth-first traversal method in graph theory to construct a skeletal topology graph based on the connection relationships between key joint nodes. Specifically, with the shoulder joint center as the root node, it expands layer by layer according to the connection relationships to generate a tree structure graph with the torso as the main trunk and the limbs as branches. Each node represents a key joint node, and each edge represents a skeletal connection relationship. At the same time, for the 3D skeletal key point sequence in the semantic action segment, a corresponding skeletal topology graph is constructed based on the standard connection relationships in canine anatomy. Ideally, the two have a consistent set of nodes and skeletal connection relationships, but in the actual acquisition process, the node information may not be completely consistent due to missing key point detection or naming differences. The system establishes a consistent node mapping between key joint nodes in the standard motion model and 3D skeletal key points in the semantic motion segment by indexing key point names and using node topology adjacency relationships. For cases where there may be naming differences or missing nodes, the system employs a matching algorithm based on adjacency consistency. First, the skeletal topology diagrams of the standard motion model and the semantic motion segment are converted into adjacency matrices. Then, the system calculates the similarity between the two adjacency matrices to find the optimal node correspondence. If the number of nodes is consistent and the connection relationships are completely matched, the mapping relationship is directly established. If some nodes are missing, the system uses the maximum common subgraph algorithm to find a subset of matching nodes and establishes a mapping relationship within the subset. Missing nodes are marked as unusable in subsequent processing. Based on the established skeletal topology mapping relationship, the system performs structural standardization on the 3D skeletal key point sequence in semantic action segments. Structural standardization includes two aspects: node order standardization and missing node handling. Node order standardization rearranges the coordinates of key points in semantic action segments according to the order of the key joint node list defined in the standard action model to ensure that the node order of the two sequences is consistent during subsequent calculations. Missing node handling means that the coordinates of nodes marked as unusable in the mapping are not considered in subsequent alignment and deviation calculations, and only successfully matched nodes are used in the calculation. After structural standardization, the system performs stage marking processing on semantic action segments based on the action stage labels in the standard action model. In the standard action model, the action stage labels are defined as a series of continuous frame intervals in chronological order, with each interval corresponding to a stage name. Since there may be differences in execution speed between semantic action segments and the standard action model, the same frame index cannot be directly used for stage marking. The system adopts a preliminary alignment method based on dynamic time warping to roughly align the skeletal trajectory sequence of the semantic action segment with the standard skeletal trajectory sequence in time, obtaining the corresponding position of each actual frame on the standard time axis. This rough alignment is only used to determine the approximate corresponding position of the action stage label in the actual action sequence, providing a basis for stage division for subsequent precise spatiotemporal alignment and deviation calculation.Then, each frame of the semantic action segment is assigned a corresponding stage label based on the standard action stage to which the corresponding position belongs. For boundary regions that cannot be aligned, the stage label is determined by nearest neighbor interpolation. After the above processing, the semantic action segment is transformed into a sequence of action features to be aligned with action stage identifiers. This sequence contains the coordinates of the three-dimensional skeletal keypoints of each frame and the corresponding action stage label, providing standardized input for subsequent spatiotemporal alignment and deviation calculation.
[0031] The present invention is further configured such that the spatiotemporal alignment and deviation calculation steps include: Based on the action feature sequence to be aligned and the standard skeletal trajectory sequence in the standard action model, a temporal alignment method is used to match the two sequences in the time dimension to obtain the temporal mapping relationship between the corresponding action stages. After completing the temporal dimension matching, the spatial pose alignment method is used to perform spatial registration of the 3D skeleton key points in the corresponding frame, so that the skeleton pose of the semantic action segment is in a unified coordinate reference system with the standard action model. After completing spatiotemporal alignment, the system extracts differences in the spatial position changes, joint angle changes, and duration of each action phase for key joints. Based on a pre-defined multi-dimensional deviation index system, it generates action execution deviation data, which includes differences in key joint posture, duration of action phases, and spatial position changes of key joints. Specifically, in the spatiotemporal alignment and deviation calculation steps, the system first uses a dynamic time warping algorithm to match the temporal dimension between the previously generated action feature sequence to be aligned and the standard skeletal trajectory sequence in the standard action model, to obtain the temporal mapping relationship between corresponding action phases. The action feature sequence to be aligned is a three-dimensional skeletal keypoint sequence after phase labeling, containing the three-dimensional coordinates of 32 keypoints in each frame and the corresponding action phase label. The action phase label is generated during the semantic action segmentation of the action feature sequence to be aligned in the standard model matching step and is used to identify the position of different action phases during action execution. The standard skeletal trajectory sequence consists of the three-dimensional coordinates of each key joint node in each frame pre-stored in the standard action model, also containing the corresponding action phase label. The Dynamic Time Warping (VTW) algorithm constructs a cost matrix between two sequence frames. Each element in the matrix represents the distance between a frame in the action feature sequence to be aligned and a frame in the standard skeletal trajectory sequence. The distance metric uses a weighted sum of Euclidean distances between corresponding keypoints. Weights are assigned higher weights based on the key joints defined in the key joint node list. Specifically, the weights for the left shoulder, right shoulder, left elbow, right elbow, left hip, right hip, left knee, and right knee joints are set to 2.0, while the weights for the remaining joints are set to 1.0. These weights are pre-set based on the degree of influence of each key joint on posture changes during the dog's action execution, thereby increasing the influence weight of key action joints in the time matching calculation. The VTW algorithm uses dynamic programming to search for the optimal path from the starting point to the ending point. The path satisfies boundary conditions, continuity, and monotonicity constraints to minimize the cumulative distance. The correspondence between each action frame to be aligned and the standard frame on the optimal path is the time mapping relationship. This mapping relationship eliminates the speed difference between the actual executed action and the standard action, ensuring accurate correspondence of the same action stages on the time axis. After completing temporal matching, the system uses a spatial pose alignment method to perform spatial registration of the 3D skeletal keypoints in the corresponding frames, ensuring that the skeletal pose of the motion feature sequence to be aligned is in a unified coordinate reference system with the standard motion model. Spatial registration employs a rigid transformation method, including rotation and translation transformations. For each frame, based on the temporal mapping relationship, a set of corresponding keypoint pairs between the motion frame to be aligned and the standard motion frame is found. Using the keypoint coordinates of the standard motion frame as a reference, the optimal rotation matrix and translation vector are solved using the least squares method, minimizing the difference between the keypoint coordinates of the motion frame to be aligned and the keypoint coordinates of the standard motion frame after rotation and translation.The solution process employs singular value decomposition (SVD). First, the centroids of the keypoint sets of the action frame to be aligned and the standard action frame are calculated. The two sets are then translated until their centroids coincide. Next, the covariance matrix is calculated and subjected to SVD to obtain the rotation matrix. Finally, the translation vector is calculated based on the rotated coordinates. After spatial registration, the skeletal pose of the action frame to be aligned is transformed into the coordinate system of the standard action model, eliminating positional and pose differences caused by variations in dog stance and orientation. After spatiotemporal alignment, the system extracts differences in the spatial position changes, joint angle changes, and action phase durations of each key joint, and generates action execution deviation data based on a pre-defined multi-dimensional deviation index system. The difference in the spatial position changes of key joints is calculated as the Euclidean distance between each key joint in the spatially registered action frame to be aligned and the standard action frame. The average distance across all frames is calculated for each joint as its spatial position deviation. The calculation of joint angle variation differences selects key joints, including the left shoulder pitch angle, right shoulder pitch angle, left elbow angle, right elbow angle, left hip angle, right hip angle, left knee angle, and right knee angle. Each joint angle is calculated from three adjacent key points. For example, the left elbow angle is formed by the left shoulder joint, left elbow joint, and left wrist joint. The difference in joint angles between the action frame to be aligned and the standard action frame is calculated, and the average angle difference across all frames for each joint is calculated as the angle deviation for that joint. The calculation of action phase duration difference is based on the action phase label. The number of continuous frames for each phase in the action feature sequence to be aligned is compared with the number of continuous frames for the corresponding phase in the standard skeletal trajectory sequence. The ratio of the frame difference to the standard frame number is calculated as the phase duration deviation. In addition, the system also extracts motion trajectory deviations, including differences in the motion path length of key joints in three-dimensional space and differences in motion velocity curves. The motion path length is obtained by accumulating the Euclidean distance between the three-dimensional coordinates of key joints in adjacent frames, and the motion velocity curve is calculated by the displacement and time interval of key points in adjacent frames. The above-mentioned deviation data are organized according to the preset multidimensional deviation index system to form motion execution deviation data, including key joint posture differences, motion phase duration differences, key joint spatial position change characteristics, and motion trajectory deviation, providing quantitative input for subsequent evaluation result generation steps.
[0032] The present invention is further configured such that the evaluation result generation step includes: Based on the action execution deviation data, the differences in the posture of key joints, the differences in the duration of the action phase, and the spatial position changes of key joints are classified and statistically processed, and a multi-dimensional set of behavioral features for evaluating training behavior is formed by feature merging. Based on a multidimensional behavioral feature set, the range of key joint angle changes and posture stability are analyzed by joint posture deviation statistical method. The sequence and duration of action phase transitions are evaluated by action phase temporal consistency analysis method. Combined with the spatial position change characteristics of key joints, the behavioral pause characteristics of dogs during training are comprehensively analyzed by behavioral decision pattern analysis method. In this way, corresponding posture stability index, temporal coordination index, and decision hesitation index are generated to form a phenotypic vector of dog training behavior. Based on phenotypic vectors of canine training behavior and action execution deviation data, the system comprehensively evaluates various dimensions of indicators using preset training evaluation rules. The evaluation results are then structured according to a preset behavior evaluation report template, generating a behavior evaluation report that includes quantitative evaluation indicators, explanations of behavior deviations, and targeted training improvement suggestions. Specifically, in the evaluation result generation step, the system first performs classification and statistical processing on the action execution deviation data output from the aforementioned spatiotemporal alignment and deviation calculation steps. Action execution deviation data includes key joint posture differences, action phase duration differences, key joint spatial position change characteristics, and motion trajectory deviations. Key joint posture differences are the average angular deviation value of each key joint across all frames. Key joints include eight joints: left shoulder, right shoulder, left elbow, right elbow, left hip, right hip, left knee, and right knee. Action phase duration differences are the ratio of the number of frames of each action phase in the action feature sequence to be aligned to the number of frames of the corresponding phase in the standard skeletal trajectory sequence. Action phases include six phases: initiation phase, descent phase, contact phase, hold phase, release phase, and recovery phase. The key joint spatial position change feature is the average spatial position deviation value of each key joint across all frames. Motion trajectory deviation includes differences in the motion path length and motion velocity curve of key joints. The motion path length difference is the ratio of the actual motion path length to the standard motion path length, and the motion velocity curve difference is the correlation coefficient between the actual velocity curve and the standard velocity curve. The system merges the above deviation data according to evaluation dimensions to form a multi-dimensional behavioral feature set for training behavior evaluation. The feature merging method combines multiple deviation indicators of the same evaluation dimension: the posture dimension merges the angle deviation and spatial position deviation of the eight key joints; the temporal dimension merges the duration deviation of the six action phases; the motion feature dimension merges the differences in the motion path length and motion velocity curve of key joints; and the decision dimension merges features related to behavioral pauses, including the number of consecutive frames where the inter-frame displacement change rate is below a preset threshold of 0.01 meters per frame within a specific phase. The inter-frame displacement change rate threshold is set based on a video capture frame rate of 30 frames per second. The multi-dimensional behavioral feature set includes four subsets: posture feature vector, temporal feature vector, motion feature vector, and decision feature vector. Based on a multidimensional behavioral feature set, the system analyzes the range of angle changes and posture stability of key joints using a joint posture deviation statistical method. The joint posture deviation statistical method calculates the mean, standard deviation, and maximum deviation value of the angle deviations of eight key joints. The mean is used as an indicator of the degree of posture deviation, the standard deviation as an indicator of posture stability, and the maximum deviation value as an indicator of the degree of posture anomaly. These three indicators are weighted and combined to form a posture stability index, with weights of 0.5 for the mean, 0.3 for the standard deviation, and 0.2 for the maximum deviation value. The system also evaluates the sequence and duration of movement phase transitions using a motion phase temporal consistency analysis method.The method for analyzing the consistency of action phase sequence is as follows: Check whether the actual action phase transition sequence is consistent with the standard action phase sequence. A score of 1.0 is awarded for consistency, and 0 points are awarded for inconsistency. A normalized score is calculated for the duration deviation of each phase. A score of 1.0 is awarded for an absolute value of the duration deviation less than 0.1, a score decreasing from 1.0 to 0.5 for an absolute value between 0.1 and 0.3 using linear interpolation, and a score of 0 points for an absolute value greater than 0.3. The sequence score and the duration scores of each phase are weighted and averaged to form a temporal coordination index. The sequence score has a weight of 0.4, and the duration scores of each phase have a weight of 0.6. Sub-weights are then assigned according to the importance of each phase: the descent and contact phases have a weight of 0.2, and other phases have a weight of 0.15. The behavioral decision-making pattern analysis method extracts behavioral pause features. Behavioral pause is defined as a continuous frame in which the dog's head stays between boxes for more than 0.5 seconds and the inter-frame displacement change rate is less than 0.01 meters per frame in task scenarios that require selection, such as drug detection in a box. The total number of pauses, the average duration of each pause, and the frequency of sniffing behavior are calculated. The frequency of sniffing behavior is identified and counted by detecting the back-and-forth movement trajectory of the dog's nose key points near the target area and the change in the amplitude of the head swing. The ratio of the number of pauses to the average number of pauses in the standard model and the ratio of the pause duration to the standard duration are weighted and combined to form a decision hesitation index. The weight of the number of pauses is 0.6, and the weight of the pause duration is 0.4. The above analysis generates quantitative values for three dimensions: posture stability, temporal coordination, and decision hesitation. Each indicator ranges from 0 to 1 or is normalized to a score of 0 to 100. These three indicators are combined to form a multidimensional police performance phenotypic vector. For example, a posture stability score of 85, a temporal coordination score of 92, and a decision hesitation score of 65 represent the dog's police performance in this training. Based on the multidimensional police performance phenotypic vector and action execution deviation data, the system comprehensively evaluates each dimension indicator using preset training evaluation rules. The training evaluation rules set passing thresholds for each dimension indicator: 80 for posture stability, 85 for temporal coordination, and 70 for decision hesitation. Dimensions below these thresholds are marked as requiring improvement. The system organizes the evaluation results in a structured manner according to a preset behavior assessment report template. The report template includes five parts: basic training information, scores and radar charts for each dimension's quantitative indicators, detailed data on action execution deviations, explanations of behavior deviations, and targeted training improvement suggestions. The behavioral deviation description is generated based on the action execution deviation data, such as the left elbow joint angle deviation exceeding 15 degrees, the duration of the descent phase being 20% longer than the standard, and pausing 3 times before selecting the box.Targeted training improvement suggestions are generated based on a pre-defined suggestion library matching the deviation dimensions. This library contains multiple rules, such as suggesting left forelimb stretching and strength training for insufficient left forelimb extension, reducing environmental complexity and increasing positive reinforcement for excessively long pauses during the snoring phase, and increasing incline training to improve explosive power for excessively slow descent. The final result is a behavioral assessment report containing quantitative evaluation indicators, explanations of behavioral deviations, and targeted training improvement suggestions, output in PDF or HTML format for trainers to review.
[0033] Example 2: Please see Figure 2 This exemplary multi-view skeletal reconstruction digital assessment system for canine training behavior includes: Motion capture module: It acquires image data of the dog training process through multi-view synchronous video, uses a neural network with integrated dog body region attention mechanism to detect two-dimensional key points from each view, performs three-dimensional reconstruction, and optimizes it through bundle adjustment to obtain a three-dimensional skeletal key point sequence. Data preprocessing module: Based on a pre-built individual dynamic physiological constraint library, anomaly detection is performed on the 3D skeletal key point sequence, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. Feature extraction module: Based on a spatiotemporal graph convolutional network with physical constraint embedding, it performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; Action segmentation and recognition module: performs frame-level primitive classification based on behavioral feature vectors, and performs grammatical parsing in combination with preset behavioral grammar rules to obtain semantic action fragments; Training evaluation module: Performs spatiotemporal alignment and deviation quantification analysis on action segments and pre-built digital twin models of training standard actions to generate phenotypic vectors and behavior evaluation reports.
[0034] It should be noted that the multi-view skeletal reconstruction digital evaluation system for dog training behavior provided in the above embodiments and the multi-view skeletal reconstruction digital evaluation method for dog training behavior provided in the above embodiments belong to the same concept. The specific methods of operation of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the multi-view skeletal reconstruction digital evaluation system for dog training behavior provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0035] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for digital evaluation of training behavior of a dog using multi-view skeletal reconstruction, characterized in that, include: S1: Image data of the dog training process is acquired through multi-view synchronous video acquisition. A neural network with an integrated dog body region attention mechanism is used to detect two-dimensional key points from each viewpoint, perform three-dimensional reconstruction, and optimize by bundle adjustment to obtain a three-dimensional skeletal key point sequence. S2: Anomaly detection is performed on the 3D skeletal keypoint sequence based on a pre-built individual dynamic physiological constraint library, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. S3: A spatiotemporal graph convolutional network based on physical constraint embedding performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; S4: Perform frame-level primitive classification based on behavioral feature vectors, and perform grammatical parsing in conjunction with preset behavioral grammar rules to obtain semantic action fragments; S5: Perform spatiotemporal alignment and deviation quantification analysis between the action segments and the pre-built training standard action digital twin model to generate phenotypic vectors and behavior evaluation reports.
2. The method according to claim 1, wherein, S1 includes: The training process of dogs was synchronously captured by multiple video acquisition devices set up at different observation locations to obtain multi-view image data. Based on a neural network model with an integrated canine body region attention mechanism, two-dimensional key point detection is performed on key parts of the canine body in images from various perspectives to obtain two-dimensional skeletal key points and corresponding detection confidence scores for each perspective. Based on the detection confidence of 2D skeleton key points from various perspectives, the multi-view data is filtered using a preset confidence threshold to determine high-confidence view combinations, and triangulation processing is performed based on the high-confidence view combinations to obtain initial 3D skeleton key points. A sequence of 3D skeleton key points is generated by performing bundle adjustment optimization on the initial 3D skeleton key points.
3. The method of claim 1, wherein the method is a multi-view skeletal reconstruction digital evaluation method for canine training behavior. S2 includes: Based on the historical movement data of dogs in the current training phase, the system automatically learns the length range of each bone segment, the range of joint movement angles, and the left-right symmetry ratio using skeletal structure statistical learning methods and biomechanical methods, and constructs and dynamically updates an individual dynamic physiological constraint library. Based on the individual dynamic physiological constraint library, the consistency of the three-dimensional skeleton key point sequence is checked, and data frames that do not meet the individual dynamic physiological constraint conditions are marked as abnormal frames; For abnormal or missing frames, the movement state of the dog is identified based on the temporal motion features of the three-dimensional skeletal key point sequence. A preset interpolation model matching the movement state is then called to repair the data. Spatial standardization processing is then performed on the repaired three-dimensional skeletal key point sequence to generate a standardized skeletal sequence.
4. The method of claim 1, wherein the method is a multi-view skeletal reconstruction digital evaluation method for canine training behavior. S3 includes: A spatiotemporal graph structure is constructed with key points of the dog skeleton as nodes and skeletal connections as edges. A standardized three-dimensional skeleton sequence is input into a spatiotemporal graph convolutional network guided by physical constraints for feature extraction to obtain motion features. The training process of the spatiotemporal graph convolutional network introduces canine biomechanical rules as physical constraints, so that the extracted motion features satisfy the joint motion continuity and gait phase constraints. An action feature layer is established based on the cross-attention mechanism to generate behavioral feature vectors that represent the behavioral state of dogs.
5. The digital assessment method for canine training behavior based on multi-view skeletal reconstruction according to claim 1, characterized in that, S4 includes: Based on the behavioral feature vector, each frame of data is classified into primitives using a pre-defined behavioral primitive classification model, and the corresponding classification confidence is generated to obtain the frame-level primitive category sequence and the corresponding classification confidence. The frame-level primitive category sequence is matched with a preset canine behavior grammar rule base, wherein the behavior grammar rule base includes a variety of defined behavior primitives and legal conversion relationships between behavior primitives; When a classification confidence score meets a preset threshold but cannot match a primitive sequence in the canine behavior grammar rule base, a confirmation command is issued, and in response to the confirmation command, the action sequence is added to the canine behavior grammar rule base, thereby achieving online adaptive expansion of the primitive base and grammar rules. The optimal parsing path that conforms to the behavior grammar rule library is found in the frame-level primitive category sequence by using a path search method. The temporal boundary of the behavior primitive is determined based on the optimal parsing path, and the frame-level primitive category sequence is divided into time intervals to obtain semantic action fragments containing 3D skeleton keypoint sequences.
6. The digital assessment method for canine training behavior based on multi-view skeletal reconstruction according to claim 1, characterized in that, The S5 includes: standard model matching step, spatiotemporal alignment and deviation calculation step, and evaluation result generation step.
7. The digital assessment method for canine training behavior based on multi-view skeletal reconstruction according to claim 6, characterized in that, The standard model matching steps include: Based on the training item identifier corresponding to the semantic action segment, the standard action model corresponding to the training item identifier is retrieved from the pre-built training standard action digital twin model library. The standard action model includes: skeletal structure definition, key joint nodes, standard skeletal trajectory sequence corresponding to the key joints, and action stage labels. The skeletal structure definition, key joint nodes and action stage labels in the standard action model are analyzed using the skeletal topology analysis method. Based on the connection relationship between key joint nodes, a skeletal topology diagram is constructed. The skeletal topology diagram is matched with the connection relationship of the three-dimensional skeletal key points in the semantic action segment to establish a skeletal topology mapping relationship consistent with the sequence of three-dimensional skeletal key points in the semantic action segment. Based on the skeletal topology mapping relationship, the 3D skeletal key point sequence in the semantic action segment is structurally standardized, and the semantic action segment is stage-labeled according to the action stage labels in the standard action model to form an action feature sequence to be aligned with action stage identifiers.
8. The digital assessment method for canine training behavior based on multi-view skeletal reconstruction according to claim 7, characterized in that, The spatiotemporal alignment and deviation calculation steps include: Based on the action feature sequence to be aligned and the standard skeletal trajectory sequence in the standard action model, a temporal alignment method is used to match the two sequences in the time dimension to obtain the temporal mapping relationship between the corresponding action stages. After completing the temporal dimension matching, the spatial pose alignment method is used to perform spatial registration of the 3D skeleton key points in the corresponding frame, so that the skeleton pose of the semantic action segment is in a unified coordinate reference system with the standard action model. After completing the spatiotemporal alignment, the differences in spatial position changes, joint angle changes, and duration of action phases of each key joint are extracted, and action execution deviation data is generated based on a preset multidimensional deviation index system. The action execution deviation data includes: key joint posture differences, action phase duration differences, and key joint spatial position change characteristics.
9. The digital assessment method for canine training behavior based on multi-view skeletal reconstruction according to claim 8, characterized in that, The evaluation result generation steps include: Based on the action execution deviation data, the differences in the posture of key joints, the differences in the duration of the action phase, and the spatial position changes of key joints are classified and statistically processed, and a multi-dimensional set of behavioral features for evaluating training behavior is formed by feature merging. Based on a multidimensional behavioral feature set, the range of key joint angle changes and posture stability are analyzed by joint posture deviation statistical method. The sequence and duration of action phase transitions are evaluated by action phase temporal consistency analysis method. Combined with the spatial position change characteristics of key joints, the behavioral pause characteristics of dogs during training are comprehensively analyzed by behavioral decision pattern analysis method. In this way, corresponding posture stability index, temporal coordination index, and decision hesitation index are generated to form a phenotypic vector of dog training behavior. Based on the phenotypic vectors of canine training behavior and action execution deviation data, the indicators of each dimension are comprehensively evaluated through preset training evaluation rules. The evaluation results are then structured and organized according to a preset behavior evaluation report template to generate a behavior evaluation report that includes quantitative evaluation indicators, explanations of behavior deviations, and targeted training improvement suggestions.
10. A multi-view skeletal reconstruction digital assessment system for dog training behavior, used to implement the multi-view skeletal reconstruction digital assessment method for dog training behavior as described in any one of claims 1-9, characterized in that, include: Motion capture module: It acquires image data of the dog training process through multi-view synchronous video, uses a neural network with integrated dog body region attention mechanism to detect two-dimensional key points from each view, performs three-dimensional reconstruction, and optimizes it through bundle adjustment to obtain a three-dimensional skeletal key point sequence. Data preprocessing module: Based on a pre-built individual dynamic physiological constraint library, anomaly detection is performed on the 3D skeletal key point sequence, and different interpolation models are used to repair abnormal or missing frames. After spatial standardization, a standardized skeletal sequence is obtained. Feature extraction module: Based on a spatiotemporal graph convolutional network with physical constraint embedding, it performs feature modeling on standardized 3D skeleton sequences and generates behavioral feature vectors through a cross-attention mechanism; Action segmentation and recognition module: performs frame-level primitive classification based on behavioral feature vectors, and performs grammatical parsing in combination with preset behavioral grammar rules to obtain semantic action fragments; Training evaluation module: Performs spatiotemporal alignment and deviation quantification analysis on action segments and pre-built digital twin models of training standard actions to generate phenotypic vectors and behavior evaluation reports.