Taijiquan rehabilitation action recognition method based on space-time features

By using a spatiotemporal feature-based method, the problem of motion confusion caused by occlusion and joint coordinate uncertainty in Tai Chi motion recognition was solved, achieving more accurate and reliable motion recognition results, especially improving the stability and accuracy of recognition in occluded scenarios.

CN123182298APending Publication Date: 2026-11-27XIAMEN VOCATIONAL COLLEGE OF PERFORMING ARTS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611429470.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing motion recognition technologies struggle to maintain motion continuity and accuracy when there is occlusion or insufficient confidence in joint coordinates, especially in Tai Chi movements, where confusion and fluctuations in recognition results are common.

Method used

By using a spatiotemporal feature-based method, the coordinates of human joint images are mapped to a spatiotemporal adjacency graph structure to generate a basic spatiotemporal feature matrix. Occlusion nodes are located and the Tai Chi Chuan prior knowledge graph is queried to extract the center of gravity balance constraint rules, generate spatiotemporal feature patches, and combine the kinematic laws of martial arts to perform feature weighting and dimensionality reduction pooling. Finally, hard constraint rules are used to correct the recognition results.

Benefits of technology

It improves the completeness of action recognition and the ability to distinguish similar actions in occluded scenes, enhances the credibility and physical rationality of recognition results, and reduces the interference of partial occlusion and invisible joints on recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182298A_ABST
    Figure CN123182298A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of action recognition, in particular to a Taijiquan rehabilitation action recognition method based on space-time features, comprising the following steps: acquiring a Taijiquan video frame sequence, extracting human joint image coordinates and mapping them to a preset space-time adjacency graph structure, and extracting graph node features to generate a basic space-time feature matrix; positioning a human spatial missing area according to null coordinates with a confidence level lower than a preset limit value in the basic space-time feature matrix, and generating a set of occlusion node masks. In the present application, decay correction is performed on the category score that violates the physical law, which can avoid false classification caused by only relying on local visual similarity, so that the final recognition result is simultaneously restricted by space-time motion features, human joint structure relationship, center of gravity balance relationship and action hard constraint, thereby improving the feature integrity in the occlusion scene, the distinguishing ability between similar actions, the physical rationality of category output and the credibility of Taijiquan rehabilitation action recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motion recognition technology, and in particular to a method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features. Background Technology

[0002] Action recognition technology involves collecting, extracting, analyzing, and judging the posture changes, joint displacements, limb trajectories, action sequence, and spatial structural relationships generated during human movement. It uses video images, human key points, skeletal joint coordinates, or other motion representation information to characterize the continuous action process and distinguish action categories based on the differences in time and space dimensions of different actions.

[0003] Existing motion recognition technologies primarily rely on video images, key human points, or skeletal joint coordinates to extract posture changes, joint displacements, limb trajectories, and temporal features of movements. They then classify movements based on differences in time and space. However, their actual operation is highly dependent on the completeness of the original visual information. When a trainee's arm passes in front of their torso, their hands cross, their body turns, or the shooting angle changes, some joints may be obscured. This can lead to missing, abrupt, or decreased confidence levels in the coordinates of relevant key points, resulting in breaks in subsequent temporal features. It becomes difficult to maintain consistent local posture relationships within continuous movements. For example, in Tai Chi movements, if the elbow joint is temporarily invisible, classifying movements based solely on visible coordinates in adjacent images may result in the actual continuous movements being represented as different posture fragments. Meanwhile, conventional recognition processes typically assign category scores based on statistical differences between data features, lacking direct criteria for constraints with clear physical meanings, such as shoulder-elbow height relationships, center of gravity balance, and human support relationships. When two movements are similar in local trajectories or joint displacements, the category score may be primarily driven by visual similarity. Even if the joint relationship corresponding to a candidate category does not conform to the laws of human movement, it may still receive a high score, leading to confusion between similar Tai Chi movements and fluctuations in recognition results under occlusion conditions. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a Tai Chi rehabilitation movement recognition method based on spatiotemporal features, comprising the following steps: Obtain the video frame sequence of Tai Chi, extract the human joint image coordinates and map them to a preset spatiotemporal adjacency graph structure, and extract graph node features to generate a basic spatiotemporal feature matrix; Based on the null coordinates of the basic spatiotemporal feature matrix with confidence levels below a preset limit, locate the missing areas in the human body space and generate a set of occlusion node masks. Based on the set of occluded node masks, query the preset Tai Chi Chuan prior knowledge graph to extract the position reference quantity and center of gravity balance constraint rule corresponding to the missing area of ​​the human body space; The centroid balance constraint rule is encoded into a query vector matrix, and the unoccluded node features in the basic spatiotemporal feature matrix are encoded into a key-value pair matrix; the dot product similarity weight is calculated based on the query vector matrix and the key-value pair matrix, and the unoccluded node features are aggregated to generate a spatiotemporal feature patch; The spatiotemporal feature patch is spliced ​​with the basic spatiotemporal feature matrix to reconstruct the complete spatiotemporal feature matrix; the shoulder joint height parameter and elbow joint height parameter in the complete spatiotemporal feature matrix are extracted and input into a preset Boolean logic condition formula, and a real-valued continuous function is called to relax and output the continuous logic satisfaction probability value; The probability value of the continuous logic is used as an attention weight and weighted and fused with the complete spatiotemporal feature matrix to generate a fused spatiotemporal feature matrix. Perform dimensionality reduction pooling operation on the fused spatiotemporal feature matrix to output an initial action category probability distribution vector; Calculate the feature deviation between the fused spatiotemporal feature matrix and the hard constraint rules in the preset Tai Chi Chuan prior knowledge graph, and generate a constraint penalty bias; use the constraint penalty bias to perform numerical attenuation correction on the initial action category probability distribution vector, and output the Tai Chi Chuan rehabilitation action recognition result.

[0006] Preferably, the steps for obtaining the basic spatiotemporal feature matrix are as follows: The video frame sequence of Tai Chi Chuan is obtained by the video acquisition device. The image position corresponding to the human joint is read frame by frame according to the time sequence of the video frame. The horizontal and vertical coordinate values ​​of each human joint in the current video frame are recorded. The frame number of the current video frame and the human joint identifier are associated. The horizontal and vertical coordinate values ​​of consecutive video frames are collected according to the same human joint identifier, and the frame number corresponding to each coordinate value is kept unchanged to obtain the human joint image coordinates. Based on the coordinates of the human joint images, the positions of the graph nodes corresponding to each human joint are determined according to the human joint identifiers, and the temporal positions of each graph node are determined according to the frame sequence number. Spatial adjacency relationships are established for graph nodes with human connection relationships within the same video frame, and temporal adjacency relationships are established for graph nodes with the same human joint identifiers in adjacent video frames. The coordinates of the human joint images are written into the corresponding graph nodes, and the horizontal coordinate values, vertical coordinate values, frame sequence number, and confidence scores are extracted for each node. The graph node features are arranged according to the graph node position and temporal position to generate a basic spatiotemporal feature matrix.

[0007] Preferably, the step of obtaining the occlusion node mask set is as follows: Based on the aforementioned basic spatiotemporal feature matrix, confidence values ​​are read for each graph node. Each confidence value is compared with a preset confidence limit. Graph nodes with confidence values ​​less than the preset confidence limit are marked as null coordinates. The continuous distribution position of null coordinates in human space is determined according to the human joint identifier and frame number corresponding to the null coordinates. Graph nodes with continuous spatial adjacency and corresponding null coordinates are grouped into the same missing region of human space. Occlusion markers are written item by item according to the graph node positions corresponding to the missing regions of human space to generate an occlusion node mask set.

[0008] Preferably, the steps for obtaining the query vector matrix are as follows: According to the occlusion node mask set, the graph node positions corresponding to the occlusion markers are read one by one. The human joint identifiers and frame numbers are traced back according to the graph node positions. The occlusion markers with continuous spatial adjacency are mapped to the missing human space regions. The human joint identifiers, frame numbers, and the boundary positions of the missing human space regions are used as retrieval indexes. The corresponding human joint nodes are located in the preset Tai Chi Chuan prior knowledge graph. The joint position reference information corresponding to the missing human space regions is read along the positional association between human joint nodes. The center of gravity position restriction information and the left and right body balance relationship are read along the body support relationship corresponding to human joint nodes. The joint position reference information is organized into position reference quantities. The center of gravity position restriction information and the left and right body balance relationship are organized into center of gravity balance constraint rules. The position reference quantities and center of gravity balance constraint rules are obtained. The constraint terms in the center-of-gravity balance constraint rules are arranged according to human joint identifiers and frame numbers. The joint position relationship, center-of-gravity position restriction information, and left-right body balance relationship corresponding to each constraint term are converted into numerical representations of the same dimension. The constraint terms are arranged in order to form a query vector matrix. At the same time, the unlabeled graph node positions of the occlusion node mask set in the basic spatiotemporal feature matrix are read, and the corresponding unoccluded node features are extracted. The original human joint identifiers and frame numbers of the unoccluded node features are maintained. The unoccluded node features are converted into key representations for similarity comparison and value representations for feature aggregation. The key representations and value representations are arranged in the same graph node order to obtain the query vector matrix and key-value pair matrix.

[0009] Preferably, the step of obtaining the spatiotemporal feature patch is as follows: The constraint representations in the query vector matrix are read row by row, and the key representations in the key-value pair matrix are read column by column. Values ​​with the same feature dimension are multiplied and accumulated to obtain the dot product similarity value of each unoccluded node feature corresponding to each constraint representation. The dot product similarity values ​​corresponding to the same constraint representation are normalized to obtain the dot product similarity weight corresponding to the unoccluded node feature. The value representations in the key-value pair matrix are weighted according to the dot product similarity weight. The weighted value representations belonging to the same human space missing region are aggregated according to human joint identifiers and frame numbers. The joint positions corresponding to the aggregation results are limited by the position reference. The aggregated features are rearranged according to the graph node positions in the human space missing region to generate a spatiotemporal feature patch.

[0010] Preferably, the steps for obtaining the complete spatiotemporal feature matrix are as follows: Read the human joint identifier, frame number, and graph node position corresponding to each patch feature in the spatiotemporal feature patch. Locate the corresponding null coordinates in the basic spatiotemporal feature matrix according to the human joint identifier and frame number. Write the patch features in the spatiotemporal feature patch into the graph node positions corresponding to the null coordinates in sequence. Preserve the original graph node positions and feature channel order of the unoccluded node features in the basic spatiotemporal feature matrix. Rearrange all the rewritten graph node features according to the frame number. Check whether each human joint identifier has a corresponding graph node feature under consecutive frame numbers. Concatenate the complete frame sequence of graph node features according to the unified feature channel order to reconstruct the complete spatiotemporal feature matrix.

[0011] Preferably, the step of obtaining the fused spatiotemporal feature matrix is ​​as follows: Based on the complete spatiotemporal feature matrix, the graph node positions corresponding to the left shoulder joint, right shoulder joint, left elbow joint, and right elbow joint are located according to the human joint identifiers. The coordinate components representing the vertical position of each graph node under each frame number are read. Shoulder joint height parameters and elbow joint height parameters are formed according to the same body side. The shoulder joint height parameters and elbow joint height parameters are substituted into the preset Boolean logic condition formula frame by frame. The size comparison relationship, logical connection relationship, and judgment boundary corresponding to the preset Boolean logic condition formula are read. The distance of the shoulder joint height parameters and elbow joint height parameters relative to the judgment boundary is calculated. The satisfaction direction corresponding to the original discrete judgment result is determined according to the distance direction. The satisfaction degree is determined according to the absolute value of the distance. The discrete judgment result under each frame number is converted into a value that changes continuously within the range of zero to one while maintaining the original satisfaction direction, thus obtaining a continuous logic satisfaction probability value. Establish the correspondence between the continuous logic satisfaction probability value and the complete spatiotemporal feature matrix according to the frame sequence number. Copy the continuous logic satisfaction probability value corresponding to each frame sequence number to all graph node positions of the complete spatiotemporal feature matrix under the same frame sequence number. Expand the continuous logic satisfaction probability value according to the feature channel order of the complete spatiotemporal feature matrix. Use the expanded continuous logic satisfaction probability value as the attention weight of the corresponding feature channel. Perform weight scaling on the graph node feature values ​​in the complete spatiotemporal feature matrix channel by channel, keeping the human joint identifier, frame sequence number and graph node position unchanged. Rearrange the weighted graph node features according to the original feature channel order to generate the fused spatiotemporal feature matrix.

[0012] Preferably, the steps for obtaining the Tai Chi rehabilitation movement recognition results are as follows: According to the fused spatiotemporal feature matrix, the feature values ​​of each graph node on each feature channel are read sequentially according to the frame number. The continuous feature values ​​corresponding to the same human joint identifier are collected along the time dimension. The feature values ​​corresponding to all human joint identifiers under the same frame number are collected along the graph node dimension. The value compression of each feature channel is completed, and the channel response that can represent the difference of the action is retained. The compressed channel response is converted into category score item by item according to the preset action category index. All category scores are normalized so that the sum of the corresponding values ​​of each category is kept to one, and the initial action category probability distribution vector is obtained. Based on the fused spatiotemporal feature matrix, the corresponding graph node features are read according to the human joint identifier and frame number. At the same time, the hard constraint rules corresponding to each action category in the preset Tai Chi Chuan prior knowledge graph are queried. The human joint position constraints, human joint relative order constraints, and body support relationship constraints are obtained item by item. The correspondence between graph node features and hard constraint rules is established according to the same action category. The difference between the actual graph node features and the corresponding constraint boundaries is compared frame by frame. The number of features exceeding the constraint boundaries and the corresponding deviation magnitude are counted. The deviation magnitude under each frame number is collected according to the action category to obtain the feature deviation degree. The constraint penalty bias is generated according to the action category index and deviation magnitude corresponding to the feature deviation degree. Locate the corresponding category score in the initial action category probability distribution vector according to the action category index, read the feature deviation degree corresponding to the constraint penalty bias, determine whether the corresponding action category has graph node features that exceed the limit boundary of the hard constraint law, keep the original value of the category score without feature deviation, perform numerical decay on the category score with feature deviation according to the deviation magnitude corresponding to the constraint penalty bias, renormalize the category score after numerical decay, sort the normalized category scores from largest to smallest, select the action category corresponding to the category score with the largest value as the recognition category, and output the Tai Chi rehabilitation action recognition result.

[0013] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, human joint image coordinates are mapped to a spatiotemporal adjacency graph structure. This unifies the human joint positions, joint connections, and temporal changes in continuous video frames into a basic spatiotemporal feature matrix. When occlusion occurs or the confidence of joint coordinates is insufficient, abnormal regions are not directly discarded. Instead, missing regions in human space are located based on null coordinates. Combined with the corresponding positional references and center-of-gravity balance constraints in the Tai Chi Chuan prior knowledge graph, the features of unoccluded nodes are subjected to correlation screening and weighted aggregation, thus forming spatiotemporal feature patches for missing regions. This reduces the interference of local occlusion, limb overlap, and temporary invisibility of key joints on the continuity of movement representation. After the complete spatiotemporal feature matrix is ​​formed, shoulder joint height parameters and elbow joint height parameters are further extracted. The kinematic laws of martial arts are transformed into continuous logical satisfaction probability values. This allows discrete rules, which originally could only express satisfaction or non-satisfaction, to participate in the adjustment of continuous feature weights. The continuous logical satisfaction probability values ​​strengthen feature channels that conform to the Tai Chi Chuan posture laws and suppress feature responses that deviate from human movement constraints. This ensures that the spatiotemporal features retain the actual observation information in the video while being continuously corrected by the movement norms. In the category determination stage, the feature deviation is calculated using hard constraint rules and converted into constraint penalty bias. Attenuation correction is performed on category scores that violate physical laws, which can avoid misclassification based solely on local visual similarity. The final recognition result is simultaneously constrained by spatiotemporal motion features, human joint structure relationships, center of gravity balance relationships, and hard constraints of movement. This improves the feature integrity in occluded scenes, the ability to distinguish between similar movements, the physical rationality of category output, and the credibility of Tai Chi rehabilitation movement recognition results. Attached Figure Description

[0014] Figure 1 A graph showing the relationship between preset confidence limits and F1 values ​​of occluded nodes; Figure 2 This is a graph showing the relationship between the probability value and the distance to the directional boundary for continuous logic. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0016] Please see Figure 1-2 This invention provides a technical solution: a method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features, comprising the following steps: The process involves acquiring a Tai Chi video frame sequence, extracting the coordinates of human joint images and mapping them to a preset spatiotemporal adjacency graph structure, extracting graph node features to generate a basic spatiotemporal feature matrix, locating the missing areas in human space based on the null coordinates with confidence levels below a preset limit in the basic spatiotemporal feature matrix, and generating an occlusion node mask set. Based on the occluded node mask set, query the preset Tai Chi Chuan prior knowledge graph, extract the position reference quantity and center of gravity balance constraint rules corresponding to the missing areas in human body space; encode the center of gravity balance constraint rules into a query vector matrix, and encode the unoccluded node features in the basic spatiotemporal feature matrix into a key-value pair matrix; calculate the dot product similarity weight based on the query vector matrix and the key-value pair matrix, and aggregate the unoccluded node features to generate spatiotemporal feature patches. The spatiotemporal feature matrix is ​​reconstructed by splicing spatiotemporal feature patches and the basic spatiotemporal feature matrix; the shoulder joint height parameter and elbow joint height parameter in the complete spatiotemporal feature matrix are extracted and input into a preset Boolean logic condition formula, and the continuous logic is relaxed by calling a real-valued continuous function to output the continuous logic satisfaction probability value; the continuous logic satisfaction probability value is used as attention weight and weighted and fused with the complete spatiotemporal feature matrix to generate a fused spatiotemporal feature matrix. Dimensionality reduction pooling is performed on the fused spatiotemporal feature matrix to output the initial action category probability distribution vector; the feature deviation between the fused spatiotemporal feature matrix and the hard constraint rules in the preset Tai Chi Chuan prior knowledge graph is calculated to generate the constraint penalty bias; the constraint penalty bias is used to perform numerical attenuation correction on the initial action category probability distribution vector to output the Tai Chi Chuan rehabilitation action recognition result.

[0017] The steps for obtaining the basic spatiotemporal feature matrix are as follows: The video frame sequence of Tai Chi Chuan is obtained by the video acquisition device. The image position corresponding to the human joint is read frame by frame according to the time sequence of the video frame. The horizontal and vertical coordinate values ​​of each human joint in the current video frame are recorded. The frame number of the current video frame and the human joint identifier are associated. The horizontal and vertical coordinate values ​​of consecutive video frames are collected according to the same human joint identifier, and the frame number corresponding to each coordinate value is kept unchanged to obtain the human joint image coordinates. Based on the coordinates of human joint images, the positions of graph nodes corresponding to each human joint are determined according to the human joint identifiers. The temporal positions of each graph node are determined according to the frame sequence number. Spatial adjacency relationships are established for graph nodes with human connection relationships within the same video frame. Temporal adjacency relationships are established for graph nodes with the same human joint identifiers within adjacent video frames. The coordinates of human joint images are written into the corresponding graph nodes. The horizontal coordinate values, vertical coordinate values, frame sequence number, and confidence values ​​are extracted for each node. The graph node features are arranged according to the graph node position and temporal position to generate a basic spatiotemporal feature matrix.

[0018] Specifically, based on the Tai Chi video frame sequence, the frame number, image width, image height, and human joint identifiers for each frame are read. The continuity of frame numbers is verified in ascending order according to the timestamps provided by the acquisition device. When a duplicate timestamp is encountered, the earlier arriving frame is retained; when a frame number jump occurs, the original frame number interval is retained. Then, the pixel position and corresponding confidence level of each human joint in the current frame are read. The top left corner of the image is used as the coordinate origin, with the horizontal direction to the right as the positive horizontal coordinate direction and the vertical direction downwards as the positive vertical coordinate direction. The joints are numbered according to the order of the human skeleton identifiers returned by the acquisition device. For example, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle are each uniquely numbered. For the [specific example], [further details are needed for the specific example]. The first frame Individual joint records and ,in, Representing the Frame number The horizontal pixel coordinates of an individual's joints. Representing the Frame number Vertical pixel coordinates of individual body joints. Represents the frame number. The index represents the human joint identifier. During continuous reading, the coordinates are always merged according to the same human joint identifier. For example, the left elbow coordinate of frame 120 is only associated with the left elbow records of frames 119 and 121. After all frames are read, the horizontal coordinate values, vertical coordinate values, frame number and confidence value of each frame are organized according to the human joint identifier to obtain the human joint image coordinates.

[0019] Based on the coordinates of human joint images, a single-frame spatial edge set is first established according to the anatomical connections of the human body. Spatial adjacency relationships are written for shoulder and elbow, elbow and wrist, hip and knee, knee and ankle, left and right shoulders, and left and right hips, respectively. Then, temporal edges are established according to the same human joint identifiers in adjacent frames, so that the first... Frame number Individual joints and the first Frame number When setting the spatial connections for individual body joint correspondences using an adjacency matrix, , where superscript Represents spatial dimension, Representing the Individual joints and the first Spatial adjacency values ​​of individual body joints Representing the Individual joints and the first Candidate space edges between joints in an individual body This represents the set of spatial edges formed based on the connection relationships of the human skeleton. and These represent two human joint indices. The value represents the current frame number. A value of 1 indicates that there is a spatial connection, and a value of 0 indicates that there is no spatial connection. Temporal adjacency is only written between the same human joint in adjacent frames. Then, the horizontal coordinate value, vertical coordinate value, frame number, and confidence value of each graph node are kept as four independent feature channels. They are arranged in order of ascending frame number and ascending human joint identifier within the same frame. The coordinate channel retains the original image coordinate dimensions, the frame number channel retains the integer index, and the confidence channel retains the corresponding value at the acquisition stage. The node indexes corresponding to the spatial adjacency relationship and the temporal adjacency relationship are recorded simultaneously to generate the basic spatiotemporal feature matrix.

[0020] The steps to obtain the mask set of occluded nodes are as follows: Based on the basic spatiotemporal feature matrix, confidence values ​​are read for each graph node. Each confidence value is compared with a preset confidence limit. Graph nodes with confidence values ​​less than the preset confidence limit are marked as null coordinates. The continuous distribution position of null coordinates in human space is determined according to the human joint identifier and frame number corresponding to the null coordinates. Graph nodes with continuous spatial adjacency and corresponding null coordinates are grouped into the same missing region of human space. Occlusion markers are written item by item according to the graph node positions corresponding to the missing regions of human space to generate an occlusion node mask set.

[0021] Specifically, based on the fundamental spatiotemporal feature matrix, the confidence scores of each image node are read and compared with preset confidence limits. These preset confidence limits are determined using calibration frames reserved during the acquisition phase. At least 300 joint nodes are extracted at equal intervals from different action categories. The location of each node is manually verified to ensure it is not obscured by the human body itself, sleeves, or other body parts. The device output confidence scores are scanned progressively from 0.20 to 0.80 at 0.05 intervals. For each candidate value, the detection results of obscured nodes are statistically analyzed. The candidate value with the largest F1 score for obscured nodes is selected as the preset confidence limit. For example, using 0.35 among 300 calibration nodes yields 91 correct obscuration detections, 7 false positives, and 5 false negatives, corresponding to an F1 score of approximately 0.938. Using 0.30 and 0.4... When the F1 score is 0, the corresponding F1 values ​​are 0.917 and 0.924 respectively. Therefore, 0.35 is used as the preset confidence limit for this calibration. Then, the graph node coordinates with confidence values ​​less than 0.35 are written as null coordinates, and the human joint identifier and frame number are retained. The connection status of null coordinates is checked according to the spatial adjacency relationship within the same frame. For example, if the right shoulder, right elbow and right wrist are all null and the three are connected continuously in the spatial edge set, they are classified into the same human spatial missing region. If the right wrist is null but the right elbow is not null, they are processed separately. Then, the continuation range of the same human spatial missing region is checked along the continuous frames. An occlusion mark 1 is written for each graph node in the region, and an occlusion mark 0 is written for the remaining graph nodes. All occlusion marks are arranged according to the frame number and graph node position to generate an occlusion node mask set.

[0022] The steps to obtain the query vector matrix are as follows: Based on the occlusion node mask set, the graph node positions corresponding to the occlusion markers are read one by one. The human joint identifiers and frame numbers are traced back according to the graph node positions. The occlusion markers with continuous spatial adjacency are mapped to the missing human space regions. The human joint identifiers, frame numbers, and the boundary positions of the missing human space regions are used as retrieval indexes to locate the corresponding human joint nodes in the preset Tai Chi Chuan prior knowledge graph. The joint position reference information corresponding to the missing human space regions is read along the positional association between human joint nodes. The center of gravity position constraint information and the left and right body balance relationship are read along the body support relationship corresponding to human joint nodes. The joint position reference information is organized into position reference quantities, and the center of gravity position constraint information and the left and right body balance relationship are organized into center of gravity balance constraint rules to obtain the position reference quantities and center of gravity balance constraint rules. The constraint terms in the center-of-gravity balance constraint rules are arranged according to human joint identifiers and frame numbers. The joint position relationship, center-of-gravity position restriction information, and left-right body balance relationship corresponding to each constraint term are converted into numerical representations of the same dimension. The constraint terms are arranged in order to form a query vector matrix. At the same time, the unlabeled graph node positions in the occlusion node mask set of the basic spatiotemporal feature matrix are read, and the corresponding unoccluded node features are extracted. The original human joint identifiers and frame numbers of the unoccluded node features are maintained. The unoccluded node features are converted into key representations for similarity comparison and value representations for feature aggregation. The key representations and value representations are arranged in the same graph node order to obtain the query vector matrix and key-value pair matrix.

[0023] Specifically, based on the occlusion node mask set, the positions of graph nodes marked as occlusion 1 are read sequentially, and the corresponding human joint identifiers and frame numbers are traced back. According to spatial adjacency, the interconnected occluded nodes in the same frame are grouped into human spatial missing regions. Then, the boundary graph nodes connecting each human spatial missing region and the unoccluded nodes are read. For example, when the right elbow is missing but the right shoulder and right wrist are visible, the right shoulder, right wrist, and right elbow joint identifiers, along with the current frame number, are used as search conditions. In the preset Tai Chi Chuan prior knowledge graph, the positional relationships from the right elbow human joint node outwards are read from the right shoulder to the right elbow and from the right elbow to the right wrist. The corresponding body support relationships under the current action category are also read, including the relative direction and normalized limb length in the positional relationships. The intervals and adjacent joint order are organized according to the original fields of the knowledge graph. The normalized limb length uses the shoulder width of the same frame as the scale benchmark. The shoulder width is the Euclidean distance formed by the horizontal and vertical coordinates of the left and right shoulders. The specific length difference and ratio are calculated using the corresponding values. The body support relationship continues to read the support status of the left and right feet in the current frame, the support side to which the center of gravity projection belongs, and the balance relationship of the corresponding joints of the left and right body. If the missing area of ​​the human body space spans consecutive frames, the corresponding rules of each frame are read separately and maintained independently according to the frame number. Finally, the relative position, normalized length and joint order are organized into position reference values. The support side, center of gravity position limit and left and right body balance relationship are organized into center of gravity balance constraint rules, thus obtaining the position reference values ​​and center of gravity balance constraint rules.

[0024] Based on positional reference values ​​and center of gravity balance constraints, each constraint term is expanded according to human joint identifiers and frame numbers. Relative joint direction, normalized limb length, center of gravity's supporting side, and left-right body balance relationship are encoded as numerical channels. The supporting side uses 3D mutually exclusive 0-1 encoding, and relationship terms are represented by 1 and 0. Each channel is independently mapped after standardization using the mean and standard deviation of the corresponding channels in the training samples, and a query key-value mapping relationship is used. ,in, Numerical representation of the center of gravity balance constraint rule. This represents the unoccluded node characteristics standardized per channel. Represents the query mapping matrix. Represents the key mapping matrix, Representative value mapping matrix, Represents the query vector matrix. The key characterization matrix represents the key characterization matrix. The representative value representation matrix consists of 32-dimensional query and key representations, and 2-dimensional value representations corresponding to the horizontal and vertical coordinates. For example, the constraint representation is 12-dimensional and the unoccluded node features are 4-dimensional. Initialize boundary by The calculated value is approximately 0.369. Initialize boundary by The calculated value is approximately 0.408. Initialize boundary by The calculation is 1. During the training phase, occlusion positions are generated from complete training segments acquired using the same acquisition process, based on the actual occlusion quantity distribution. Adam is used to update three mapping matrices in reverse based on the mean square error between the patch coordinates and the standardized target coordinates. During the inference phase, the mapping matrices are fixed and combined according to the graph node order. and This yields the query vector matrix and the key-value pair matrix.

[0025] The steps for obtaining the spatiotemporal feature patch are as follows: The constraint representations in the query vector matrix are read row by row, and the key representations in the key-value pair matrix are read column by column. Values ​​with the same feature dimension are multiplied and accumulated to obtain the dot product similarity value of each unoccluded node feature corresponding to each constraint representation. The dot product similarity values ​​corresponding to the same constraint representation are normalized to obtain the dot product similarity weights corresponding to the unoccluded node features. The value representations in the key-value pair matrix are weighted according to the dot product similarity weights. The weighted value representations belonging to the same human space missing region are aggregated according to human joint identifiers and frame numbers. The joint positions corresponding to the aggregation results are limited by the position reference. The aggregated features are rearranged according to the graph node positions in the human space missing region to generate a spatiotemporal feature patch.

[0026] Specifically, based on the query vector matrix and key-value pair matrix, the query representation of the missing regions in the human body space and the key representation of unoccluded nodes are read, and the dot product similarity weights are calculated using scaled dot product attention. ,in, Representing the The constraint characterization for the first The dot product similarity weights of the unoccluded nodes, Representing the Row query representation, Representing the Row key representation, Representing the Row value representation, This represents the common dimension of the query representation and the key representation. This represents the number of unobstructed nodes participating in the aggregation. The index of the unoccluded node representing the normalized summation. The representative value represents the node index of the aggregation. Represents the constraint index. This represents the vector transpose operation. Representing the The two-dimensional aggregated coordinates of each constraint term are represented, and the weights are determined according to the above formula. For example, when the integrals of the three scaling points are 1.2, 0.5, and -0.2, the normalized weights are approximately 0.574, 0.285, and 0.141. Subsequently, the weights are adjusted according to the mean and standard deviation of the horizontal and vertical coordinates during the training phase. The coordinates are restored to the original image scale. Then, the human joint identifiers, skeleton connection order and frame number are determined according to the position reference. The restored coordinates are arranged according to the graph node order of the missing human space area to generate a spatiotemporal feature patch.

[0027] The steps to obtain the complete spatiotemporal feature matrix are as follows: Read the human joint identifier, frame number, and graph node position corresponding to each patch feature in the spatiotemporal feature patch. Locate the corresponding null coordinates in the basic spatiotemporal feature matrix according to the human joint identifier and frame number. Write the patch features in the spatiotemporal feature patch into the graph node positions corresponding to the null coordinates in sequence. Preserve the original graph node positions and feature channel order of the unoccluded node features in the basic spatiotemporal feature matrix. Rearrange all the rewritten graph node features according to the frame number. Check whether each human joint identifier has a corresponding graph node feature under consecutive frame numbers. Concatenate the complete frame sequence of graph node features according to the unified feature channel order to reconstruct the complete spatiotemporal feature matrix.

[0028] Specifically, based on the spatiotemporal feature patches, the human joint identifiers, frame numbers, and graph node positions carried by the patch features are read item by item. The positions marked as 1 in the occlusion node mask set are located in the basic spatiotemporal feature matrix using the same three indices. First, it is verified that one patch feature corresponds to only one null coordinate. Then, the horizontal and vertical coordinates from the spatiotemporal feature patches are written into the two coordinate channels of the graph node. The frame number channel retains the target frame number, and the confidence channel retains the original values ​​of the basic spatiotemporal feature matrix. Graph nodes marked as 0 retain the original eigenvalues ​​and channel order of the basic spatiotemporal feature matrix. During the writing process, the spatial and temporal adjacency relationships in the basic spatiotemporal feature matrix are used. After completing the single-frame patching, the number of graph nodes is checked item by item according to the human joint identifiers. For example, the data acquisition equipment... When the skeleton contains 17 human joints, each frame in the current action segment should have 17 graph node indices. If there are fewer than 17, the index correspondence between the occlusion node mask set and the spatiotemporal feature patch of that frame is checked. If there are more than 17, the duplicate human joint identifiers are checked. After completing the single-frame check, the same human joint identifiers are checked along the time dimension to see if they cover all consecutive frame numbers of the current action segment. If frames 120 to 160 constitute the current action segment, then each human joint identifier should have a corresponding graph node feature at 41 frame positions. Then, the nodes are spliced ​​according to the ascending frame number, the fixed order of human joint identifiers in the same frame, and the original feature channel order, so that the supplemented nodes and the unoccluded nodes continue to occupy the same graph node index structure, and the complete spatiotemporal feature matrix is ​​reconstructed.

[0029] The steps for obtaining the fused spatiotemporal feature matrix are as follows: Based on the complete spatiotemporal feature matrix, the graph node positions corresponding to the left shoulder joint, right shoulder joint, left elbow joint, and right elbow joint are located according to the human joint identifiers. The coordinate components representing the vertical position of each graph node under each frame number are read. Shoulder joint height parameters and elbow joint height parameters are formed according to the same body side. The shoulder joint height parameters and elbow joint height parameters are substituted into the preset Boolean logic condition formula frame by frame. The size comparison relationship, logical connection relationship and decision boundary corresponding to the preset Boolean logic condition formula are read. The distance of the shoulder joint height parameters and elbow joint height parameters relative to the decision boundary is calculated. The satisfaction direction corresponding to the original discrete decision result is determined according to the distance direction. The satisfaction degree is determined according to the absolute value of the distance. The discrete decision result under each frame number is converted into a value that changes continuously within the range of zero to one while maintaining the original satisfaction direction, and a continuous logic satisfaction probability value is obtained. Establish a correspondence between continuous logic satisfaction probability values ​​and the complete spatiotemporal feature matrix based on frame sequence numbers. Copy the continuous logic satisfaction probability value corresponding to each frame sequence number to all graph node positions in the complete spatiotemporal feature matrix under the same frame sequence number. Expand the continuous logic satisfaction probability values ​​according to the feature channel order of the complete spatiotemporal feature matrix. Use the expanded continuous logic satisfaction probability values ​​as the attention weights of the corresponding feature channels. Perform weight scaling on the graph node feature values ​​in the complete spatiotemporal feature matrix channel by channel, keeping human joint identifiers, frame sequence numbers, and graph node positions unchanged. Rearrange the weighted graph node features according to the original feature channel order to generate the fused spatiotemporal feature matrix.

[0030] Specifically, based on the complete spatiotemporal feature matrix, the vertical coordinates of the left shoulder joint, right shoulder joint, left elbow joint, and right elbow joint in each frame are read according to the human joint identifier. The vertical pixel positions are then converted into height parameters ranging from 0 to 1 according to the image height, with the top edge of the image corresponding to a height value of 1 and the bottom edge corresponding to a height value of 0. Subsequently, the shoulder-elbow size relationship, logical AND relationship, logical OR relationship, and decision boundary in the preset Boolean logic condition formula are read frame by frame. The decision boundary is determined by statistically analyzing the shoulder-elbow height relationship in standard rehabilitation demonstration segments and then confirmed by rehabilitation movement experts. For example, if the 95th percentile of the normalized shoulder-elbow height difference in the standard sample for a certain atomic condition is 0.06, then 0.06 is written into the decision boundary of that atomic condition. A directional boundary distance is formed for each atomic condition, and then a discrete comparison relaxation is performed using the Sigmoid continuous function. ,in, Representing the Frame number The continuous satisfaction of numerical values ​​of the conditions of each atom Representing the Frame number The direction of each atom relative to the corresponding decision boundary is determined by the distance in the band direction. If the condition is met, the direction is positive; otherwise, the direction is negative. Represents the continuous relaxation temperature. Represents the frame number. The atomic condition index is represented by the continuous relaxation temperature, which is determined by comparing the action recognition accuracy of the verification fragment at three normalized height scales of 0.02, 0.05, and 0.10. For example, when the corresponding accuracy is 0.881, 0.897, and 0.889, 0.05 is used. The logical AND is obtained by multiplying the values ​​of each atomic condition that are satisfied, and the logical OR is obtained by subtracting the product of each value that is not satisfied from 1. The probability value of continuous logical condition satisfaction is obtained.

[0031] Based on the probability values ​​of continuous logic and the complete spatiotemporal feature matrix, a one-to-one correspondence is established according to the frame number. First, the [frame number] is read... The probability value of the continuous logic corresponding to the frame is then copied to the next frame. All human joint graph nodes in the frame are copied, preserving the joint identifiers and node positions. Then, the number of feature channels in the complete spatiotemporal feature matrix is ​​replicated, ensuring that each feature channel of the same graph node in the same frame receives the same continuous logical satisfaction probability value. Element-wise multiplication is used to achieve attention scaling. ,in, Representing the Frame number Personal joints Each feature channel completes the scaled feature values. Representing the The continuous logic corresponding to the frame satisfies the probability value. Represents the first element in the complete spatiotemporal feature matrix. Frame number Personal joints Original values ​​of each feature channel Represents the frame number. Represents the human joint index. The representative feature channel index is used. The attention weight is based on the continuous logic satisfaction probability value obtained in the previous step. For example, when the value corresponding to the 35th frame is 0.82 and the original value of a certain channel is 0.60, the value of that channel after scaling is 0.492. When the value corresponding to the 36th frame is 0.40 and the original value of the same type of channel is 0.60, the value after scaling is 0.24. After processing all frames, graph nodes and feature channels, they are arranged in the original order to generate the fused spatiotemporal feature matrix.

[0032] The steps for obtaining the Tai Chi rehabilitation movement recognition results are as follows: Based on the fused spatiotemporal feature matrix, the feature values ​​of each graph node in each feature channel are read sequentially according to the frame number. The continuous feature values ​​corresponding to the same human joint identifier are collected along the time dimension, and the feature values ​​corresponding to all human joint identifiers under the same frame number are collected along the graph node dimension. The value of each feature channel is compressed, and the channel response that can represent the difference of the action is retained. The compressed channel response is converted into category score item by item according to the preset action category index. All category scores are normalized so that the sum of the corresponding values ​​of each category is kept to one, and the initial action category probability distribution vector is obtained. Based on the fused spatiotemporal feature matrix, the corresponding graph node features are read according to the human joint identifier and frame number. At the same time, the hard constraint rules corresponding to each action category in the preset Tai Chi Chuan prior knowledge graph are queried. The human joint position constraints, human joint relative order constraints, and body support relationship constraints are obtained item by item. The correspondence between graph node features and hard constraint rules is established according to the same action category. The difference between the actual graph node features and the corresponding constraint boundaries is compared frame by frame. The number of features exceeding the constraint boundaries and the corresponding deviation magnitude are counted. The deviation magnitude under each frame number is collected according to the action category to obtain the feature deviation degree. The constraint penalty bias is generated according to the action category index and deviation magnitude corresponding to the feature deviation degree. Locate the corresponding category score in the initial action category probability distribution vector according to the action category index, read the feature deviation corresponding to the constraint penalty bias, determine whether the corresponding action category has graph node features that exceed the limit boundary of the hard constraint law, keep the original value of the category score without feature deviation, perform numerical decay on the category score with feature deviation according to the deviation magnitude corresponding to the constraint penalty bias, renormalize the category score after numerical decay, sort the normalized category scores from largest to smallest, select the action category corresponding to the category score with the largest value as the recognition category, and output the Tai Chi rehabilitation action recognition result.

[0033] Specifically, based on the fused spatiotemporal feature matrix, continuous frame features are aggregated along the time dimension according to human joint identifiers, and then all human joint features in the same frame are aggregated along the graph node dimension according to frame number. Temporal average pooling and graph node average pooling are performed on each feature channel to obtain a fixed-length action representation vector. Subsequently, linear class mapping is performed according to the action category index established by the training labels. The input dimension is the number of channels after pooling, and the output dimension is the number of action categories in the training labels. During the training phase, the initial values ​​of the class mapping matrix are first set using Xavier uniform initialization. For example, when the input number of channels is 64 and the number of action categories is 8, the initialization boundary is set according to... The calculated value is approximately 0.289. The initial matrix values ​​are sampled from -0.289 to 0.289, and the initial bias parameter is set to 0. Then, the classification cross-entropy is used to calculate the error between the action category label and the predicted category. The class mapping matrix and bias parameters are updated using Adam based on the backpropagation gradient. The learning rate is selected from 0.0005, 0.001, and 0.002 based on the validation set classification loss. For example, when the three lowest validation losses are 0.286, 0.241, and 0.268 respectively, 0.001 is chosen. During the inference phase, the trained class mapping matrix and bias parameters are fixed to obtain the category score, which is then normalized using Softmax. ,in, Representing the The probability of each action category. Representing the Scores for each action category Represents the total number of action categories. This represents the category index during normalized summation. This represents the index of the current action category, yielding the initial action category probability distribution vector.

[0034] Based on the fused spatiotemporal feature matrix, the joint position relationships, relative joint order, and body support status of each graph node are read according to human joint identifiers and frame numbers. Then, the hard constraint rules corresponding to the same category in the preset Tai Chi Chuan prior knowledge graph are queried according to the action category index. For position constraints, the joint coordinates are first converted to dimensionless relative positions based on the shoulder width in the same frame, and then compared with the constraint boundaries defined using the same human body scale in the knowledge graph. For joint relative order constraints, the height and front-back relationships specified by the hard constraint rules are checked frame by frame to see if they are satisfied. For body support relationship constraints, the support side and the support area to which the center of gravity projection belongs are consistent frame by frame. The constraint boundaries in the hard constraint rules are confirmed by rehabilitation movement experts after statistical analysis of standard action demonstration samples during the establishment phase of the preset Tai Chi Chuan prior knowledge graph. For example, for a certain joint... When the 2.5 percentile of the height standard sample is 0.12 and the 97.5 percentile is 0.28, 0.12 and 0.28 are recorded as the corresponding limit boundaries for the action category. When the actual value is 0.31, it is recorded as exceeding the upper limit by 0.03, and when the actual value is 0.20, it is recorded as 0 deviation. For order constraints and support relationship constraints, 0 is used to indicate satisfaction and 1 is used to indicate violation. The position deviation magnitude is divided by the width of the corresponding limit interval and limited to the range of 0 to 1. The result greater than 1 is recorded as 1. Then, the deviation records of all frames are collected according to the same action category. The number of graph nodes that exceed the limit boundary is calculated and the normalized deviation magnitude is averaged. The resulting value is used as the feature deviation degree of the action category. At the same time, the non-negative constraint penalty bias amount of the same value is written according to the action category index to generate the feature deviation degree and constraint penalty bias amount.

[0035] Based on the initial action category probability distribution vector, feature deviation, and constraint penalty bias, the initial category probabilities and corresponding non-negative constraint penalty biases are aligned item by item according to the action category index. When the constraint penalty bias is 0, the original relative strength of the category is retained. When the constraint penalty bias is greater than 0, subtraction correction is performed in the logarithmic probability domain, which is equivalent to uniform normalization after exponential decay. ,in, Representing the The probability of completing constraint correction for each action category Represents the first action in the initial action category probability distribution vector. The probability of each action category. Representing the The constraint penalty bias amount corresponding to each action category. Represents the total number of action categories. The index representing the action category traversed during normalized summation. This represents the index of the current corrected action category. The negative sign in the exponential function indicates that the probability of the corresponding category decreases by a non-negative penalty as the deviation increases. For example, if the initial probabilities of the three candidate categories are 0.52, 0.36, and 0.12, and the corresponding constraint penalty biases are 0.40, 0.05, and 0, the unnormalized values ​​after exponential decay are approximately 0.349, 0.342, and 0.120, and after renormalization, they are approximately 0.430, 0.422, and 0.148. Subsequently, the corrected category probabilities are arranged from largest to smallest, and the action category with the largest value is selected as the recognition category. The Tai Chi rehabilitation action recognition result is then output along with the corresponding corrected probability.

[0036] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features, characterized in that, Includes the following steps: Obtain the video frame sequence of Tai Chi, extract the human joint image coordinates and map them to a preset spatiotemporal adjacency graph structure, and extract graph node features to generate a basic spatiotemporal feature matrix; Based on the null coordinates of the basic spatiotemporal feature matrix with confidence levels below a preset limit, locate the missing areas in the human body space and generate a set of occlusion node masks. Based on the set of occluded node masks, query the preset Tai Chi Chuan prior knowledge graph to extract the position reference quantity and center of gravity balance constraint rule corresponding to the missing area of ​​the human body space; The centroid balance constraint rule is encoded into a query vector matrix, and the unoccluded node features in the basic spatiotemporal feature matrix are encoded into a key-value pair matrix; the dot product similarity weight is calculated based on the query vector matrix and the key-value pair matrix, and the unoccluded node features are aggregated to generate a spatiotemporal feature patch; The spatiotemporal feature patch is spliced ​​with the basic spatiotemporal feature matrix to reconstruct the complete spatiotemporal feature matrix; the shoulder joint height parameter and elbow joint height parameter in the complete spatiotemporal feature matrix are extracted and input into a preset Boolean logic condition formula, and a real-valued continuous function is called to relax and output the continuous logic satisfaction probability value; The probability value of the continuous logic is used as an attention weight and weighted and fused with the complete spatiotemporal feature matrix to generate a fused spatiotemporal feature matrix. Perform dimensionality reduction pooling operation on the fused spatiotemporal feature matrix to output an initial action category probability distribution vector; Calculate the feature deviation between the fused spatiotemporal feature matrix and the hard constraint rules in the preset Tai Chi Chuan prior knowledge graph, and generate a constraint penalty bias; use the constraint penalty bias to perform numerical attenuation correction on the initial action category probability distribution vector, and output the Tai Chi Chuan rehabilitation action recognition result.

2. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the basic spatiotemporal feature matrix are as follows: The video frame sequence of Tai Chi Chuan is obtained by the video acquisition device. The image position corresponding to the human joint is read frame by frame according to the time sequence of the video frame. The horizontal and vertical coordinate values ​​of each human joint in the current video frame are recorded. The frame number of the current video frame and the human joint identifier are associated. The horizontal and vertical coordinate values ​​of consecutive video frames are collected according to the same human joint identifier, and the frame number corresponding to each coordinate value is kept unchanged to obtain the human joint image coordinates. Based on the coordinates of the human joint images, the positions of the graph nodes corresponding to each human joint are determined according to the human joint identifiers, and the temporal positions of each graph node are determined according to the frame sequence number. Spatial adjacency relationships are established for graph nodes with human connection relationships within the same video frame, and temporal adjacency relationships are established for graph nodes with the same human joint identifiers in adjacent video frames. The coordinates of the human joint images are written into the corresponding graph nodes, and the horizontal coordinate values, vertical coordinate values, frame sequence number, and confidence scores are extracted for each node. The graph node features are arranged according to the graph node position and temporal position to generate a basic spatiotemporal feature matrix.

3. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the mask set of occluded nodes are as follows: Based on the aforementioned basic spatiotemporal feature matrix, confidence values ​​are read for each graph node. Each confidence value is compared with a preset confidence limit. Graph nodes with confidence values ​​less than the preset confidence limit are marked as null coordinates. The continuous distribution position of null coordinates in human space is determined according to the human joint identifier and frame number corresponding to the null coordinates. Graph nodes with continuous spatial adjacency and corresponding null coordinates are grouped into the same missing region of human space. Occlusion markers are written item by item according to the graph node positions corresponding to the missing regions of human space to generate an occlusion node mask set.

4. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the query vector matrix are as follows: According to the occlusion node mask set, the graph node positions corresponding to the occlusion markers are read one by one. The human joint identifiers and frame numbers are traced back according to the graph node positions. The occlusion markers with continuous spatial adjacency are mapped to the missing human space regions. The human joint identifiers, frame numbers, and the boundary positions of the missing human space regions are used as retrieval indexes. The corresponding human joint nodes are located in the preset Tai Chi Chuan prior knowledge graph. The joint position reference information corresponding to the missing human space regions is read along the positional association between human joint nodes. The center of gravity position restriction information and the left and right body balance relationship are read along the body support relationship corresponding to human joint nodes. The joint position reference information is organized into position reference quantities. The center of gravity position restriction information and the left and right body balance relationship are organized into center of gravity balance constraint rules. The position reference quantities and center of gravity balance constraint rules are obtained. The constraint terms in the center-of-gravity balance constraint rules are arranged according to human joint identifiers and frame numbers. The joint position relationship, center-of-gravity position restriction information, and left-right body balance relationship corresponding to each constraint term are converted into numerical representations of the same dimension. The constraint terms are arranged in order to form a query vector matrix. At the same time, the unlabeled graph node positions of the occlusion node mask set in the basic spatiotemporal feature matrix are read, and the corresponding unoccluded node features are extracted. The original human joint identifiers and frame numbers of the unoccluded node features are maintained. The unoccluded node features are converted into key representations for similarity comparison and value representations for feature aggregation. The key representations and value representations are arranged in the same graph node order to obtain the query vector matrix and key-value pair matrix.

5. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the spatiotemporal feature patch are as follows: The constraint representations in the query vector matrix are read row by row, and the key representations in the key-value pair matrix are read column by column. Values ​​with the same feature dimension are multiplied and accumulated to obtain the dot product similarity value of each unoccluded node feature corresponding to each constraint representation. The dot product similarity values ​​corresponding to the same constraint representation are normalized to obtain the dot product similarity weight corresponding to the unoccluded node feature. The value representations in the key-value pair matrix are weighted according to the dot product similarity weight. The weighted value representations belonging to the same human space missing region are aggregated according to human joint identifiers and frame numbers. The joint positions corresponding to the aggregation results are limited by the position reference. The aggregated features are rearranged according to the graph node positions in the human space missing region to generate a spatiotemporal feature patch.

6. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the complete spatiotemporal feature matrix are as follows: Read the human joint identifier, frame number, and graph node position corresponding to each patch feature in the spatiotemporal feature patch. Locate the corresponding null coordinates in the basic spatiotemporal feature matrix according to the human joint identifier and frame number. Write the patch features in the spatiotemporal feature patch into the graph node positions corresponding to the null coordinates in sequence. Preserve the original graph node positions and feature channel order of the unoccluded node features in the basic spatiotemporal feature matrix. Rearrange all the rewritten graph node features according to the frame number. Check whether each human joint identifier has a corresponding graph node feature under consecutive frame numbers. Concatenate the complete frame sequence of graph node features according to the unified feature channel order to reconstruct the complete spatiotemporal feature matrix.

7. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the fused spatiotemporal feature matrix are as follows: Based on the complete spatiotemporal feature matrix, the graph node positions corresponding to the left shoulder joint, right shoulder joint, left elbow joint, and right elbow joint are located according to the human joint identifiers. The coordinate components representing the vertical position of each graph node under each frame number are read. Shoulder joint height parameters and elbow joint height parameters are formed according to the same body side. The shoulder joint height parameters and elbow joint height parameters are substituted into the preset Boolean logic condition formula frame by frame. The size comparison relationship, logical connection relationship, and judgment boundary corresponding to the preset Boolean logic condition formula are read. The distance of the shoulder joint height parameters and elbow joint height parameters relative to the judgment boundary is calculated. The satisfaction direction corresponding to the original discrete judgment result is determined according to the distance direction. The satisfaction degree is determined according to the absolute value of the distance. The discrete judgment result under each frame number is converted into a value that changes continuously within the range of zero to one while maintaining the original satisfaction direction, thus obtaining a continuous logic satisfaction probability value. Establish the correspondence between the continuous logic satisfaction probability value and the complete spatiotemporal feature matrix according to the frame sequence number. Copy the continuous logic satisfaction probability value corresponding to each frame sequence number to all graph node positions of the complete spatiotemporal feature matrix under the same frame sequence number. Expand the continuous logic satisfaction probability value according to the feature channel order of the complete spatiotemporal feature matrix. Use the expanded continuous logic satisfaction probability value as the attention weight of the corresponding feature channel. Perform weight scaling on the graph node feature values ​​in the complete spatiotemporal feature matrix channel by channel, keeping the human joint identifier, frame sequence number and graph node position unchanged. Rearrange the weighted graph node features according to the original feature channel order to generate the fused spatiotemporal feature matrix.

8. The method for recognizing Tai Chi rehabilitation movements based on spatiotemporal features according to claim 1, characterized in that, The steps for obtaining the Tai Chi rehabilitation movement recognition results are as follows: According to the fused spatiotemporal feature matrix, the feature values ​​of each graph node on each feature channel are read sequentially according to the frame number. The continuous feature values ​​corresponding to the same human joint identifier are collected along the time dimension. The feature values ​​corresponding to all human joint identifiers under the same frame number are collected along the graph node dimension. The value compression of each feature channel is completed, and the channel response that can represent the difference of the action is retained. The compressed channel response is converted into category score item by item according to the preset action category index. All category scores are normalized so that the sum of the corresponding values ​​of each category is kept to one, and the initial action category probability distribution vector is obtained. Based on the fused spatiotemporal feature matrix, the corresponding graph node features are read according to the human joint identifier and frame number. At the same time, the hard constraint rules corresponding to each action category in the preset Tai Chi Chuan prior knowledge graph are queried. The human joint position constraints, human joint relative order constraints, and body support relationship constraints are obtained item by item. The correspondence between graph node features and hard constraint rules is established according to the same action category. The difference between the actual graph node features and the corresponding constraint boundaries is compared frame by frame. The number of features exceeding the constraint boundaries and the corresponding deviation magnitude are counted. The deviation magnitude under each frame number is collected according to the action category to obtain the feature deviation degree. The constraint penalty bias is generated according to the action category index and deviation magnitude corresponding to the feature deviation degree. Locate the corresponding category score in the initial action category probability distribution vector according to the action category index, read the feature deviation degree corresponding to the constraint penalty bias, determine whether the corresponding action category has graph node features that exceed the limit boundary of the hard constraint law, keep the original value of the category score without feature deviation, perform numerical decay on the category score with feature deviation according to the deviation magnitude corresponding to the constraint penalty bias, renormalize the category score after numerical decay, sort the normalized category scores from largest to smallest, select the action category corresponding to the category score with the largest value as the recognition category, and output the Tai Chi rehabilitation action recognition result.