A knee joint injury postoperative rehabilitation action recognition method, device and storage medium
By using a method for recognizing rehabilitation movements after knee joint injury surgery, static zero-position calibration and limb parameter estimation are performed using wearable inertial, imaging, or pressure data. A preprocessed sequence is generated, and posture observation and skeleton calculation are performed. Temporal features are extracted, and hierarchical motion map matching and sequence discrimination model inference are conducted. This solves the problems of temporal instability and individual differences in multi-source data, and achieves stable determination and evaluation of movement categories and completion scores.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FIRST HOSPITAL AFFILIATED TO GENERAL HOSPITAL OF PLA
- Filing Date
- 2025-11-14
- Publication Date
- 2026-05-08
AI Technical Summary
Existing methods for recognizing rehabilitation movements after knee injuries are unstable in terms of the temporal sequence and source mapping of multi-source data. This leads to the loss of alignment indexes, unclear coupling between static zero-position calibration and limb parameter estimation, and insufficient consistency between skeleton calculation and gait phase recognition. Consequently, it is difficult to achieve reusability and traceability of stable movement matching and completion scoring in rehabilitation training scenarios.
By acquiring wearable inertial, image, or pressure data, static zero-position calibration, limb parameter estimation and binding configuration are performed to generate preprocessed sequences. Posture observation extraction and drift suppression are performed, skeleton calculation and gait phase recognition are executed, temporal features are extracted, hierarchical motion map matching and sequence discrimination model inference are performed, motion categories and completion scores are generated, and quality weight calculation and safety threshold linkage comparison are performed.
It achieves stable determination and output of motion matching sequences in rehabilitation training scenarios, and linkage between quality assessment and alarms, alleviating the problems of multi-source input and individual differences, and is suitable for home training and device-side processing.
Smart Images

Figure CN121512502B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of physiological motion detection in medical devices, and more particularly to a method, device and storage medium for recognizing rehabilitation movements after knee joint injury surgery. Background Technology
[0002] In the field of physiological motion detection in medical devices, existing solutions for recognizing rehabilitation movements after knee injuries typically revolve around acquiring data from wearable inertial, imaging, or pressure channels. They establish a unified temporal basis through temporal correlation, perform static zero-position calibration and limb parameter estimation, then proceed with skeletal calculation and gait phase recognition. Based on this, they attempt segment boundary detection and motion map-based matching, ultimately providing a training process record. These solutions suffer from limitations such as the instability of multi-source data in temporal and source mapping leading to volatile alignment indices; unclear coupling between static zero-position calibration and limb parameter estimation resulting in individual parameter shifts; and insufficient consistency between posture sequences and knee angle sequences caused by the separation of skeletal calculation and gait phase recognition. Existing methods often rely on single-channel thresholds or empirical rules for motion candidate generation and matching. The hierarchical motion map constraints for the rehabilitation stage are incomplete. Sequence discrimination models lack joint processing of intra-segment features and inter-segment features. Quality weight calculation and safety threshold linkage comparison lack a write-back channel mapped to the strategy. Parameter update packages do not form a closed loop throughout the data acquisition configuration. In data acquisition and home training scenarios with constraints, segment boundary detection is often sensitive to noise and phase sequence label drift is common, making it difficult to stably support the continuous processing of motion matching sequence input to sequence discrimination model inference. Regarding the joint processing of generating motion categories and completion scores based on motion matching sequences and inference through sequence discrimination models under data acquisition configurations, existing technologies generally suffer from disconnects in multi-source fusion, time alignment, rule constraints, and strategy write-back, making it difficult to establish a consistent process of acquisition, alignment, judgment, control, and recording in rehabilitation training applications. This results in insufficient reusability and traceability of motion categories and completion scores across segments and stages. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a method for recognizing rehabilitation movements after knee joint injury surgery, comprising:
[0004] Acquire wearable inertial, optional image, or pressure data and correlate it with time; perform acquisition channel registration, data integrity verification, and timestamp standardization; perform static zero-position calibration, limb parameter estimation, and binding configuration processing; and generate a preprocessed sequence.
[0005] Based on the preprocessed sequence, attitude observation extraction and drift suppression are performed, and skeleton calculation including individual parameters and alignment index is executed. Gait phase recognition is then performed to generate attitude and phase sequences.
[0006] The pose sequence and phase sequence are acquired, and segment boundary detection and action candidate generation processing with unified time base and phase coherence constraints are performed to obtain the action candidate set. Temporal features including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence and cross-segment connection relationship are extracted. Hierarchical motion graph matching following top-down order and checking according to node sequence constraints and necessary events is performed, and sequence discrimination model inference including context window, inter-segment dependency gating and anomaly ratio suppression is used to generate action category and completion score.
[0007] The system acquires the action category and completion score, performs quality weight calculation and grading processing including the aggregation of weight factor table to identify confidence, phase coherence and structural verification elements, extracts key indicators such as completion trajectory fluctuation amplitude, phase dwell time distribution and joint angle envelope offset, compares them with safety thresholds, and performs policy mapping processing by selecting action-level and system-level policies from the policy library, generating parameter update packages.
[0008] Furthermore, the process of segment boundary detection and action candidate generation also includes:
[0009] Based on the order and time interval of phase labels, key turning points within the same segment are initially screened. Key turning points refer to local extremes, abrupt changes in the rate of change, and phase boundaries of the knee joint angle over time. Segment boundary detection is then performed, adhering to the constraints of temporal continuity and phase coherence. When the interval between adjacent key turning points exceeds the segment threshold or when the quality label indicates accumulated interference, it is recorded as a suspicious boundary and enters the review stage. In the review stage, the stable intervals of relative limb displacement in the posture sequence are read, and neighborhood consistency checks are performed on suspicious boundaries. Those that fail are reverted to ordinary turning points, while those that pass are registered as segment boundaries. After the boundary set is constructed, action candidate generation is carried out. Action candidate generation refers to the formation of candidate segments between adjacent segment boundaries. Each segment carries the start and end times, trigger phase, segment number, and boundary source marker. At the same time, three basic attributes are extracted from the posture sequence: angle envelope, angle change sequence, and phase dwell time within the segment.
[0010] Furthermore, the action candidate generation process also includes:
[0011] If the missing test mask covers the core area of the candidate segment, a check mark is added to the candidate segment and the original time and position information is retained; if the segment session is interrupted, the generated candidate segment and the first segment of the next segment are attempted to be spliced across segments. If the splicing fails, they are retained separately and a split mark is added to the candidate segment.
[0012] Furthermore, the process of extracting temporal features including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, chronological order of key events, and cross-segment connectivity also includes:
[0013] The program extracts computable elements describing the sequential relationships within and between candidate segments, covering segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence, and cross-segment connectivity. The extraction process slides along a unified time base, using a fixed window and a segment adaptive window to generate feature sets in parallel. When segmentation markers exist, intra-segment features are calculated only within the range that does not cross the markers, and cross-mark relationships are separately registered as inter-segment features.
[0014] Furthermore, the hierarchical action graph matching process also includes:
[0015] Loading a hierarchical motion map for rehabilitation stages, the hierarchical motion map refers to a multi-layered node structure based on the rehabilitation plan. The upper layer consists of stage nodes, the middle layer consists of motion category nodes, and the bottom layer consists of motion instance templates. Each node is configured with sequence constraints, required events, optional events, and allowable deviation ranges. The matching process follows a top-down order: first, within the stage nodes, combinations of candidate segments whose features satisfy the sequence constraints are selected; then, at the motion category node level, the features within the segments are compared with the required events, and candidate segments that do not meet the required events are returned to their original positions to wait for merging with neighboring segments; once a candidate segment meets the threshold of the category node, it enters the motion instance template verification stage, where each item is verified according to the event position and angle envelope shape in the template. The allowable deviation range is jointly pruned by the confidence level and quality label of the candidate segment.
[0016] Furthermore, the hierarchical action graph matching process also includes:
[0017] The local order relationship is reconstructed using a neighboring segment supplementation strategy. If the reconstruction fails, the unmatched state is maintained in the matching result and the reason code is recorded.
[0018] Furthermore, the reasoning process of the sequence discrimination model also includes:
[0019] The input receives a time-ordered set of category candidates and features. Internally, it sets up three sub-units: context window, inter-segment dependency gating, and anomaly suppression. During operation, candidates are first rearranged within the context window, following the permissible order and jump tolerance allowed by the stage nodes. Then, the necessary connection between adjacent candidates is checked in the inter-segment dependency gating. If the connection is missing, backtracking and merging are triggered. Anomaly suppression is used to handle intervals with low confidence levels in candidate segments. When the anomaly percentage exceeds the window threshold, the window output is set to pending. After completing window-level inference, the model performs total order verification across the entire segment, downgrading local outputs that do not meet the total order requirement.
[0020] Furthermore, the process of generating action categories and completion scores also includes:
[0021] The completion score is derived from two parts: the overlap between intra-segment features and instance templates, and the fit between inter-segment features and stage constraints. The two are combined according to the internal weights of the model.
[0022] Furthermore, a knee joint injury postoperative rehabilitation movement recognition device, applied to any of the above-described methods, includes:
[0023] The data acquisition and time correlation module is used to acquire wearable inertial sensor data, image data, or pressure data and correlate them with time, generate raw multi-source data and data acquisition configuration, and provide them to the static zero-position calibration and limb parameter estimation module and the binding configuration and preprocessing module.
[0024] The static zero-position calibration and limb parameter estimation module is used to extract the static standing segment from the original multi-source data, complete the static zero-position calibration and limb parameter estimation, output individual parameters and alignment index and provide them to the binding configuration and preprocessing module and the skeleton calculation and joint angle generation module;
[0025] The binding configuration and preprocessing module is used to bind and configure individual parameters and alignment indices, generate preprocessed sequences, and provide them to the attitude observation extraction and drift suppression module.
[0026] The attitude observation extraction and drift suppression module is used to construct an attitude observation sequence from the preprocessed sequence and provide it to the skeleton solution and joint angle generation module;
[0027] The skeleton calculation and joint angle generation module is used to extract joint angle candidates from the posture observation sequence, perform skeleton calculation based on individual parameters and alignment index, and output posture sequence and knee joint angle sequence to the gait phase recognition and action candidate generation module.
[0028] The gait phase recognition and action candidate generation module is used to perform periodic segmentation and gait phase recognition on the knee joint angle sequence. After obtaining the posture sequence, it completes segment boundary detection and action candidate generation, outputs the action candidate set and provides it to the hierarchical action graph matching and sequence discrimination model module.
[0029] The hierarchical motion map matching and sequence discrimination model module is used to extract temporal features from the motion candidate set, complete the matching with the hierarchical motion map for the rehabilitation stage, perform sequence discrimination model inference, generate motion category and completion score, and provide them to the quality assessment and threshold linkage alarm and strategy write-back module.
[0030] The quality assessment and threshold linkage alarm and policy write-back module is used to calculate quality weights and classify data based on action category and completion score, perform linkage comparison with safety threshold to generate anomaly prompts, complete policy mapping and training suggestion generation processing, form parameter update package and write back to data acquisition configuration.
[0031] Furthermore, a computer-readable storage medium is characterized in that a computer program is stored on the storage medium, and the computer program is called and executed by a computer to realize any of the above-mentioned methods for recognizing rehabilitation movements after knee joint injury surgery.
[0032] The key innovations of this invention include:
[0033] (1) Based on the reasoning and processing of the hierarchical motion map matching and sequence discrimination model for rehabilitation stage, a continuous link is constructed from the motion candidate set to the motion matching sequence and then to the motion category and completion score. The link organizes data objects and judgment objects on the same time basis.
[0034] (2) Based on the quality weight calculation and safety threshold linkage comparison and strategy mapping processing, an evaluation and strategy linkage link is formed from action category and completion score to quality weight, grade label, abnormal prompt and parameter update package. The linkage link corresponds to the integrated organization of evaluation object and control object.
[0035] (3) To acquire wearable inertial and optional image or pressure data and correlate them with time, and to perform static zero-position calibration, limb parameter estimation and binding configuration processing, a standardized data organization is constructed for the original multi-source data, data acquisition configuration, individual parameters, alignment index and preprocessing sequence, so as to provide a unified input for subsequent posture observation extraction, skeleton calculation and gait phase recognition processing.
[0036] The following are its main beneficial effects:
[0037] (1) Regarding the determination and output of action matching sequences, under the constraints of segment boundary detection and hierarchical action graph matching for rehabilitation stage, the sequence discrimination model infers and generates time-ordered action categories and completion scores. The problems of rule fragmentation and link interruption in the existing scheme are compressed, which is suitable for home training and device-side processing scenarios.
[0038] (2) Regarding the linkage between assessment and alarm, based on the action category and completion score, the quality weight calculation and safety threshold linkage comparison generate graded labels and abnormal prompts, and the parameter update package is formed by policy mapping. The problem of scattered assessment and control in the existing scheme is converged, which is suitable for training process recording and device-side policy management scenarios.
[0039] (3) For the pre-processing of multi-source input and individual differences, the original multi-source data and data acquisition configuration are processed by static zero-position calibration, limb parameter estimation and binding configuration to form individual parameters, alignment index and preprocessing sequence. The problems of unstable time correlation and inconsistent input in the existing scheme are alleviated, which is suitable for wearable acquisition and parallel scenarios of image or pressure channels. Attached Figure Description
[0040] Figure 1 A flowchart illustrating a method for recognizing postoperative rehabilitation movements in knee joint injuries, provided in an embodiment of this application;
[0041] Figure 2 This is a structural block diagram of a knee joint injury postoperative rehabilitation movement recognition device provided in an embodiment of this application. Detailed Implementation
[0042] Example 1: Refer to Figure 1 This is a flowchart illustrating a method for recognizing rehabilitation movements after knee joint injury according to an embodiment of the present invention. The flowchart may include at least steps S100-S400:
[0043] S100: Acquire wearable inertial, optional image or pressure data and associate it with time; perform acquisition channel registration, data integrity verification and timestamp standardization processing; perform static zero-position calibration, limb parameter estimation and binding configuration processing; and generate a preprocessed sequence.
[0044] S200: Based on the preprocessed sequence, perform attitude observation extraction and drift suppression processing, execute skeleton calculation including individual parameters and alignment index, perform gait phase recognition processing, and generate attitude sequence and phase sequence;
[0045] S300: Obtain the posture sequence and phase sequence, perform segment boundary detection and action candidate generation processing with unified time base and phase coherence constraints to obtain the action candidate set; extract the temporal features including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence and cross-segment connection relationship, perform hierarchical motion graph matching that follows top-down order and checks according to node sequence constraints and necessary events, and perform sequence discrimination model inference with context window, inter-segment dependency gating and anomaly ratio suppression to generate action category and completion score;
[0046] S400: Obtain action category and completion score, perform quality weight calculation and grading processing including weight factor table aggregation identification confidence, phase coherence and structural verification elements, extract key indicators such as completion trajectory fluctuation amplitude, phase dwell time distribution, and joint angle envelope offset, compare them with safety thresholds, and perform policy mapping processing by selecting action-level and system-level policies from the policy library to generate parameter update package.
[0047] S100: Acquire wearable inertial, optional image or pressure data and associate it with time; perform acquisition channel registration, data integrity verification and timestamp standardization processing; perform static zero-position calibration, limb parameter estimation and binding configuration processing; and generate a preprocessed sequence.
[0048] Specifically, wearable inertial sensor data and optional image or pressure data are used as inputs. Wearable inertial sensors refer to inertial measurement units (IMUs) worn on the thighs and calves or shoe uppers. Image data refers to two-dimensional video sequences acquired by fixed or handheld terminals. Pressure data refers to time series output by foot pressure pads or pressure insoles. After input is connected, the acquisition channel is first registered, including sensor identification, mounting location, sampling frequency, clock source, data path, and anomaly flag fields. Then, data integrity verification is initiated. Data integrity verification identifies missing segments, duplicate segments, out-of-bounds timestamps, and abnormal amplitudes within a window. The triggering condition is the appearance of consecutive missing or duplicate records or amplitudes exceeding the boundaries set in the acquisition channel registration within the window. Anomalies are written to an anomaly record, and a correction strategy label is generated simultaneously. Timestamp standardization is performed after a unified time base is established via network or host time synchronization. The unified time base refers to a monotonically increasing time series shared by the device and the mobile terminal. All collected records are rewritten with timestamps according to this time series. Simultaneously, source records are resampled and merged according to the sampling frequency, and cross-source records are paired according to the minimum time difference to form time pairs. Further, after source deduplication and completion, each record is labeled with its limb source and channel category according to the assembly position code set in the acquisition channel registration, forming the original data frame. If the device has a parameter update package generated in the previous training iteration, it is loaded and overridden in this step, allowing subsequent sub-steps to use the updated acquisition strategy. Understandably, after verification and standardization, the original data frames are integrated into original multi-source data, and the acquisition channel registration and synchronization strategies are summarized into data acquisition configuration, which is written to the device cache before the end of this step. The original multi-source data is used as the output field for original multi-source data access, and the data acquisition configuration is used as the output field for subsequent main steps of cross-stage recording and traceability. In summary, the technical effect of this step is that through acquisition channel registration, data integrity verification, and timestamp standardization, the original input is normalized into a structured sequence that can be directly used for attitude calculation, forming a traceable snapshot of the acquisition-side configuration.
[0049] Specifically, static standing segments are retrieved from the raw multi-source data, and static zero-position calibration and limb parameter estimation are performed. A static standing segment refers to the time interval during which the subject's feet are on the ground, body posture is relatively stable, and limb angular velocity fluctuations are at a low level. The retrieval method involves statistically analyzing the distribution of angular velocity and acceleration amplitudes within a time window and searching for stable intervals. The triggering condition is that a continuous window meets the stability threshold condition and the image data or pressure data shows no significant change in the support state. The retrieval results are written into the static segment index. Static zero-position calibration refers to calculating the initial orientation of the sensor coordinate system relative to the human anatomical coordinate reference for each sensor at each assembly position within the static segment index range and outputting the assembly angle correction amount, which is written into the assembly angle table. Limb parameter estimation involves calculating the length parameters of the thigh and lower leg segments, the joint center reference point, and the sensor assembly offset relative to the limb segment based on the subject's basic information and the distribution of key points or pressure contact areas in the image. The estimation results are written into the limb parameter table. Furthermore, an alignment index is constructed. The alignment index refers to the mapping structure between multi-source time pairs, assembly angle tables, limb parameter tables, and a unified time base, used for subsequent attitude observation and skeleton solution. During the construction process, if image data is missing, the time mapping is generated by cross-checking gait trigger events and inertial peak-valley events in the stress data. If image data exists, frame-level pairing records are established between keypoint sequences and inertial peak-valley events. Understandably, after static null calibration and limb parameter estimation, two outputs are generated: individual parameters and the alignment index. Individual parameters refer to the set of limb parameter tables and assembly angle tables, while the alignment index refers to the set of unified time base mappings and channel mappings. Individual parameters and the alignment index are written to the storage medium as output fields for use by both individual parameters and the alignment index. Simultaneously, individual parameters and the alignment index will also be read by the skeleton solution at the cross-main step level. The technical effect of this step can be summarized as follows: through static segment retrieval, assembly angle correction, and limb parameter estimation, individualized initial attitude correction is completed, and an alignment mapping that can be universally applied across multi-source data is generated.
[0050] Specifically, individual parameters and alignment indices are bound and configured to generate a preprocessed sequence structure. Binding configuration refers to writing limb length, joint center reference point, and assembly angle correction from the individual parameters into the binding area of the data acquisition configuration according to the channel mapping in the alignment index. Simultaneously, a segment template is constructed in the device cache. The segment template includes segment numbers, start and end times, source channel sets, and quality flags under a unified time base. Serialization processing is then performed. Serialization processing involves time-paired playback, channel rearrangement, and field normalization of the original multi-source data on a unified time base. This maps three-axis angular velocity, three-axis acceleration, image keypoint trajectories, or pressure contact area trajectories to the sampling points defined in the segment template, and simultaneously writes them into the quality flags. Further, attitude coarse solution and quality annotation are performed. Attitude coarse solution refers to obtaining the preliminary attitude quadruple trajectory of each sampling point through channel fusion under the constraint of assembly angle correction. Quality annotation refers to adding availability level and missing measurement mask to each sampling point based on abnormal records and noise statistics on the acquisition side. If a channel is missing for a long time in a segment, its time position information is retained and marked with a missing measurement mask during the serialization stage using a channel rearrangement strategy. Understandably, after binding configuration, serialization processing and attitude coarse solution are completed, a preprocessed sequence structure is generated. The preprocessed sequence structure includes segment number, unified time base, three-axis angular velocity, three-axis acceleration, attitude coarse solution trajectory, quality annotation and missing measurement mask, and is solidified into storage medium and device cache at the end of this step. The preprocessed sequence is used as the output field preprocessed sequence for direct use by the preprocessed sequence, while individual parameters and alignment indexes remain as shared resources across main steps for the skeleton solution stage to read. In summary, the technical effects of this step are as follows: By binding configuration, serialization, and attitude coarse solution, individualized correction results and time mapping are implemented on a unified data carrying structure, providing stable input for subsequent attitude observation extraction and skeleton calculation.
[0051] S200: Based on the preprocessed sequence, perform attitude observation extraction and drift suppression processing, execute skeleton calculation including individual parameters and alignment index, perform gait phase recognition processing, and generate attitude sequence and phase sequence;
[0052] Specifically, the preprocessing sequence is used as input. This preprocessing sequence originates from the unified time-base support structure generated in the preceding steps and includes segment numbers, triaxial angular velocities, triaxial accelerations, coarse attitude trajectory, quality annotations, and missing measurement masks. Simultaneously, individual parameters and alignment indices generated in the preceding steps and shared across the main steps are read. Individual parameters refer to the set of limb lengths, joint center reference points, and assembly angle corrections, while alignment indices refer to the set of multi-source time mappings and channel mappings. This step first establishes a segment-level processing session on the device side. For each segment, the alignment index is called to complete time-base verification and channel readiness determination. The triggering condition is the presence of available quality annotations within the segment and the missing measurement mask not covering all sampling points. If the triggering condition is not met, a segment skip flag is recorded in the session, and the processing state of the previous segment is retained. Subsequently, attitude observation extraction and drift suppression processing are performed. Attitude observation extraction involves channel fusion and amplitude consistency comparison between the coarse attitude trajectory and the original triaxial signal. Based on the channel mapping in the alignment index, combined observations are established for each sampling point, including acceleration-gravity components, stable angular velocity intervals, and attitude coarse confidence markers. Drift suppression processing involves performing sequential operations on the combined observations, including steady-state anchor alignment, zero-velocity updates, and gravity direction constraints. For channels with long-term biases, intra-segment bias rollback is added. Further, attitude observation frames are constructed at the sampling point level. These frames are time-ordered sets of observations, containing timestamps, channel identifiers, combined observation values, and segment-embedded confidence levels. When a channel is temporarily missing, a missing indicator is registered in the attitude observation frame based on the missing mask, and the time and position information is retained without interpolation. Understandably, after the above processing, an attitude observation sequence is output. This sequence, named "Attitude Observation Sequence" as an output field, is configured as the input for the attitude observation sequence. Simultaneously, this output is recorded in the device cache within this main step for cross-segment retrieval and backtracking. In summary, the technical effects of this step are as follows: through the conversational processing and combined observation construction of the preprocessed sequence, the attitude observation obtains a stable temporal representation, the drift is controlled and suppressed, and an input carrier that can be directly entered into the skeleton solution is formed.
[0053] Specifically, candidate joint angles are extracted from the attitude observation sequence, and skeleton calculation is performed based on individual parameters and alignment indices. Candidate joint angles refer to the preliminary angle sequence of knee flexion, extension, and rotation derived from the attitude observation frames in the limb reference frame. The extraction method involves relative orientation of the observation directions of the thigh and lower leg segments under assembly angle correction constraints, forming limb coordinate pairs based on the limb length and joint center reference point in the individual parameters, thereby obtaining the candidate angle trajectories within the segment. Skeleton calculation involves consistency verification based on the candidate joint angles according to limb link constraints. For transient anomalies within the segment, an out-of-window observation reprojection strategy is used for backtracking. For long-term deviations within the segment, time mapping in the alignment index is used to perform inter-segment translation alignment. When image or pressure channels exist, keypoint trajectories or contact events are used as external references under the guidance of the alignment index for event alignment and boundary convergence of the candidate angle trajectories. Furthermore, a pose estimation frame is constructed for each segment. This frame consists of limb spatial poses and joint angle pairs, with confidence levels and source identifiers added at the sampling point level. When a break exists in the candidate angle trajectory, the channel with the higher source confidence level is prioritized for observation backfilling of that interval. Points that cannot be backfilled retain break markers and are avoided as trigger events during phase determination in downstream processes. Understandably, at the end of skeleton computation, pose sequences and knee joint angle sequences are output. The former is a time-ordered set of limb spatial poses, and the latter is a time-ordered set of knee joint angles. The pose sequences and knee joint angle sequences are synchronously written to the storage medium as output field names and are also used as inputs to the knee joint angle sequences. The pose sequences also serve as cross-major step inputs to the acquired pose sequences, providing pose basis for subsequent segment boundary detection and action candidate generation. In summary, this step achieves the following technical effects: through joint angle candidate construction and link constraint computation, pose sequences and knee joint angle sequences consistent with individual parameters and multi-source time mapping are obtained. Anomalies and missing measurements are handled in a bounded manner, and the output possesses a structured expression that can be directly referenced downstream.
[0054] Specifically, the knee joint angle sequence is periodically segmented and gait phase is identified, generating a phase sequence structure. Periodic segmentation refers to dividing the joint cycle in the temporal trajectory of the knee joint angle based on a combination rule of local extrema, rate of change, and confidence level. The combination rule sets a trigger threshold at the segment level and performs threshold adaptation based on quality labels at the sampling point level. When the quality label indicates the presence of noise accumulation within a segment, the periodic segmentation adopts a longer time window and a higher extremum significance requirement, and the time period in which the segmentation fails is registered as a pending segment. Gait phase identification involves finding key phase events in the periodic segmentation results and assigning phase labels. Key events include the start of the support phase, the end of the support phase, and the boundary of the swing phase. The identification order follows the chronological order and is cross-checked in conjunction with the stable intervals of relative displacement of limb segments in the posture sequence. If an external reference exists, the occurrence time of the key event is compared with the ground contact or ground lift event in the external reference at the frame level. If the difference between the two exceeds the segment-level threshold, a check mark is added to the phase label and the comparison deviation is recorded for use by the upper-level strategy. Furthermore, for the aforementioned pending segments and verification mark intervals, a consistency check between segments is performed. This check includes the stability of the period length and the consistency of the event sequence between adjacent segments. If the check passes, the phase label is completed; if it fails, the interval is transferred to the boundary relaxation strategy for subsequent hierarchical motion graph matching. In essence, after assigning phase labels, the time-ordered phase label frames are concatenated to form a phase sequence. This phase sequence includes a timestamp, segment number, phase label, and confidence level. The phase sequence is recorded as an output field name in the storage medium and also serves as input for segment boundary detection and action candidate generation. Simultaneously, the phase sequence, along with the pose sequence, is stored in the device cache within this main step, supporting traceability and replay across main steps. In summary, the technical effect of this step is that through period segmentation and phase label assignment, the knee joint angle sequence is converted into a structured phase temporal expression. Key events obtain temporal localization and confidence annotations, and the output directly enters the subsequent hierarchical motion graph matching and sequence discrimination model inference stages.
[0055] S300: Obtain the posture sequence and phase sequence, perform segment boundary detection and action candidate generation processing with unified time base and phase coherence constraints to obtain the action candidate set; extract the temporal features including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence and cross-segment connection relationship, perform hierarchical motion graph matching that follows top-down order and checks according to node sequence constraints and necessary events, and perform sequence discrimination model inference with context window, inter-segment dependency gating and anomaly ratio suppression to generate action category and completion score;
[0056] Step S300 includes at least steps S310-S330:
[0057] S310. Obtain the pose sequence and phase sequence, perform segment boundary detection and action candidate generation processing to obtain the action candidate set;
[0058] Specifically, the attitude sequence and phase sequence formed in the preceding steps are used as synchronous inputs. Both share a unified time base and carry segment numbers, phase labels, and confidence levels. At the start of processing, a segment session is created on the device side. First, based on the order and time interval of the phase labels, key inflection points within the same segment are initially screened. Key inflection points refer to local extrema of the knee joint angle over time, points of abrupt changes in the rate of change, and phase boundaries. Subsequently, segment boundary detection is performed, adhering to constraints of temporal continuity and phase coherence. When the interval between adjacent key inflection points exceeds the segment threshold or the quality label indicates accumulated interference, it is recorded as a suspicious boundary and enters the review stage. The review stage reads the stable intervals of relative limb displacements in the attitude sequence and performs neighborhood consistency checks on suspicious boundaries. Those that fail are reverted to ordinary inflection points, while those that pass are registered as segment boundaries. After constructing the boundary set, action candidate generation is performed. Action candidate generation refers to forming candidate segments between adjacent segment boundaries. Each segment carries a start and end time, trigger phase, segment number, and boundary source marker. Simultaneously, three basic attributes are extracted from the attitude sequence: angle envelope, angle change sequence, and phase dwell time, which are used as the basis for subsequent matching and discrimination. For anomaly handling, if a missing measurement mask covers the core area of a candidate segment, a check mark is added to the candidate segment, and the original time and position information is retained for further decision-making in subsequent steps. If a segment session is interrupted, the generated candidate segment and the first segment of the next segment are attempted to be spliced across segments. If splicing fails, both segments are retained, and a segmentation marker is added to the candidate segment. Understandably, after completing the above processing, the output field is named "Action Candidate Set." This set is written to the storage medium and device cache in the order of segment number and timestamp, and serves as input for subsequent steps. Specifically, it enters the action candidate set and shares the same time base and segment index with the S400 traceability record at the cross-main step level. In summary, the technical effects of this step are as follows: through boundary detection and candidate generation, continuous attitude and phase data are transformed into structured candidate segments, the temporal organization relationship is stabilized and solidified, abnormal intervals are explicitly marked, and subsequent matching has inputs that can be directly called upon.
[0059] S320. Extract temporal features from the action candidate set, match them with the hierarchical action map for the rehabilitation stage, and generate action matching sequences.
[0060] Specifically, the action candidate set is used as input, containing the start and end times, trigger phases, angle envelopes, change order, and segmentation markers of candidate segments. First, temporal feature extraction is performed. Temporal features refer to computable elements describing the sequential relationships within and between candidate segments, covering segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence, and cross-segment connectivity. The extraction process slides along a unified time base, using a fixed window and segment adaptive window to generate feature sets in parallel. When segmentation markers exist, intra-segment features are calculated only within the range that does not cross the markers, and cross-mark relationships are separately registered as inter-segment features. Subsequently, a hierarchical motion map oriented towards rehabilitation stages is loaded. The hierarchical motion map refers to a multi-layered node structure divided according to the rehabilitation plan: the upper layer is stage nodes, the middle layer is action category nodes, and the bottom layer is action instance templates. Each node has sequential constraints, mandatory events, optional events, and allowable deviation ranges. The matching process follows a top-down order: first, within each stage node, combinations of candidate segments whose features satisfy the sequential constraints are selected; then, at the action category node level, the features within a segment are compared with the required events. Candidate segments that do not meet the required events are returned to their original positions to await merging with neighboring segments. Once a candidate segment meets the category node threshold, it enters the action instance template verification stage, where each event position and angle envelope shape in the template is checked item by item. The allowable deviation range is jointly pruned by the confidence level and quality label of the candidate segment. Furthermore, for candidate segments with a pending verification mark, a neighboring segment supplementation strategy is used to reconstruct the local sequence relationship. If the reconstruction fails, the segment remains unmatched in the matching result, and a reason code is recorded for unified processing by the subsequent discrimination model. Understandably, after matching is completed, a time-ordered action matching sequence is generated. The action matching sequence consists of candidate segment identifiers and action category identifiers, and includes the matching confidence level and node path record. This output is written to the storage medium and pushed to the action matching sequence. Simultaneously, at the cross-main step level, the node path summary is written back to the device cache, reserving associations for S400's post-event traceability and strategy analysis. In summary, the technical effects of this step are as follows: through the structured constraints and hierarchical verification of the hierarchical action graph, the temporal features are given a regularized interpretation, the candidate segments are initially merged into action categories, and the output has continuous temporal sequence and node path readability.
[0061] S330. Perform sequence discrimination model inference on the action matching sequence to generate action category and completion score structure;
[0062] Specifically, the action matching sequence is taken as input, and intra-segment features and inter-segment features retained in the action candidate set are used as supplementary context. The sequence discrimination model refers to a discriminative inference component built for data with sequential relationships. The input receives a time-ordered set of category candidates and features, and internally sets up three types of sub-units: context window, inter-segment dependency gating, and anomaly ratio suppression. During operation, candidates are first rearranged within the context window, following the permissible order and jump tolerance allowed by the stage node. Then, the necessary connection between adjacent candidates is checked in the inter-segment dependency gating. If the connection is missing, backtracking and merging are triggered, and the corresponding candidate is marked as weakly connected and its local contribution is reduced. Anomaly ratio suppression is used to handle intervals with low confidence levels in candidate segments. When the anomaly ratio exceeds the window threshold, the window output is set to pending and awaits subsequent window supplementation. Intervals that cannot be supplemented are placed as unallocated placeholders in the final result. After completing window-level inference, the model performs a total order check across the entire segment. The total order check verifies the start and end points of stage nodes and the order of action categories. Local outputs that do not meet the total order requirement are downgraded and marked with a check flag. Subsequently, an action category and completion score structure is generated. This structure is a time-ordered record containing an action category identifier, completion score, window confidence level, and check flag. The completion score is derived from two parts: the overlap between intra-segment features and instance templates, and the fit between inter-segment features and stage constraints. These two parts are synthesized according to the model's internal weights. Understandably, the action category and completion score are written to storage and sent to subsequent main steps as output field names. Specifically, the check flag and window confidence level summary are written to the device cache at the cross-main step level for weight allocation and threshold linkage during quality weight calculation and hierarchical processing. In summary, the technical effects of this step are as follows: through contextual reasoning and full sequence verification of the sequence discrimination model, the action category is stably determined, the completion score is formed into a reusable quantitative expression, and it forms a coherent connection with the subsequent quality assessment stage.
[0063] S400: Obtain action category and completion score, perform quality weight calculation and grading processing including weight factor table aggregation identification confidence, phase coherence and structural verification elements, extract key indicators such as completion trajectory fluctuation amplitude, phase dwell time distribution, and joint angle envelope offset, compare them with safety thresholds, and perform strategy mapping processing by selecting action-level and system-level strategies from the strategy library to generate parameter update package.
[0064] Using action category and completion score as input, and reading window confidence level and verification markers recorded in previous steps, a segment-level evaluation session is constructed by connecting quality annotations and missing test masks in the pose sequence and phase sequence. Upon session startup, synchronization is completed according to segment number and timestamp. For each candidate segment, elements from recognition results, data quality, and structure verification are aggregated to form evaluation items. Evaluation items include completion value trajectory, node path depth, phase coherence rate, missing test percentage, anomaly suppression traces, and verification marker status. Subsequently, quality weights are calculated. Quality weights refer to the confidence level given for a single candidate segment or consecutive candidate segments. The calculation process follows a weight factor table, which consists of five categories of factors: recognition confidence, phase coherence, structure consistency, missing test penalty, and anomaly penalty. These factors are merged within the segment session. After weight aggregation, data grading is performed. This grading process maps candidate segments to high, medium, or low levels according to thresholds and outputs corresponding labels. When the window confidence level is in the boundary neighborhood and the verification mark is in a downgraded state, the grading process enters a review branch. This branch prioritizes the weight trends and phase stability regions of adjacent candidate segments before deciding whether to maintain the current level. Furthermore, the evaluation session keeps segments with long periods of missing data marked in their original positions without interpolation and adds incomparable annotations to the weight output to avoid misjudgments in subsequent linkage stages. Understandably, after completing the above processing, two output fields are generated: quality weight and grading label are written to storage and pushed to the next sub-step as input items. Simultaneously, at the cross-main step level, the time index and grading summary of this sub-step are written to the device cache for policy analysis and traceability, forming a replayable link with the S300. In summary, the technical effects of this step are as follows: by aggregating confidence assessment, data quality and structure verification, quality weights that can be applied to the fragment granularity are constructed, and hierarchical labels with temporal consistency are output, providing clear triggering criteria and data entry points for subsequent comparison stages.
[0065] Key indicators are extracted from quality weights and grading labels, and compared with safety thresholds to generate anomaly alerts. Key indicators refer to a set of observations reflecting training safety and execution standards, including the fluctuation range of the completion trajectory, the distribution of phase dwell time, joint angle envelope offset, frequency of movement category switching, temporal continuity of grading labels, and the dwell time at extremely low quality weight values. Safety thresholds refer to a threshold table preset in the rehabilitation plan and loaded by the device. The threshold table sets upper and lower limits for joint angle ranges, upper and lower bounds of phase dwell time, completion baselines, and single training duration, while reserving stage-specific entries to distinguish different permissible intervals for early, mid, and consolidation periods. The comparison is performed segment by segment within the same time base, prioritizing rapid screening of candidate segments with low-level grading labels, followed by detailed verification of mid- and high-level candidate segments. When a key indicator exceeds a threshold table entry, the exceeding entry and its occurrence time are recorded, and the node path summary is queried to determine if the exceedance occurred near a necessary event. If it did, the entry is adjusted to a higher alarm level. The anomaly alert consists of six fields: anomaly type, triggering indicator, occurrence segment, alarm level, reference node path, and suggested processing route. When multiple out-of-bounds events overlap within the same segment, the linkage comparison logic merges the entries, retaining the highest alarm level and listing all triggering indicators. If the out-of-bounds event originates from invalid scores due to long-term missing tests, the anomaly type is marked as data quality anomaly, and a missing test mask summary is attached to avoid guiding erroneous training actions. Understandably, after completing the above linkage comparison, the output field is named "Anomaly Alert." This output proceeds to the next sub-step as an input item, and is simultaneously aggregated into the device's cached alarm timeline at the cross-main-step level for subsequent statistical and playback calls, forming a potential write-back association with the S100's data acquisition configuration. In summary, the technical effect of this step is: through key indicator extraction and threshold table linkage, out-of-bounds, anomalies, and suspicious segments during the training process obtain a unified alarm expression, keeping the alarm timing synchronized with the identification results, providing a directly indexable basis for subsequent policy mapping stages.
[0066] The system performs strategy mapping and training suggestion generation on anomaly alerts, generating a parameter update package structure. Strategy mapping involves combining and matching anomaly types with recovery stages, individual parameters, and alignment indices, selecting corresponding corrective actions and acquisition-side adjustment schemes from a strategy library. The strategy library consists of action-level strategies and system-level strategies. Action-level strategies propose correction suggestions for the rhythm, amplitude, and sequence switching of specific actions, while system-level strategies propose adjustment suggestions for sampling strategies, synchronization strategies, segment templates, and threshold table entries. The training suggestion generation process adds timing scheduling and execution routing to the strategy mapping results. Execution routing specifies the scope of the suggestion's effectiveness, start and end segments, and review nodes. Timing scheduling registers the effective time on the device side and maintains version numbers and rollback points in cross-segment scenarios. The parameter update package structure refers to packaging configuration increments for devices and storage media. It includes four categories of entries: data acquisition configuration updates, synchronization strategy fine-tuning, segment template revisions, and threshold table entry corrections, along with effective conditions and rollback rules. When anomalies involve data quality issues, the parameter update package prioritizes modifying channel priorities and sampling strategies in the data acquisition configuration. When anomalies involve excessive amplitude or phase out-of-bounds pauses, the parameter update package prioritizes modifying threshold table entries and the node enable status of the hierarchical action graph to avoid triggering similar alarms repeatedly in subsequent short-cycle training. Furthermore, after generation, the parameter update package is written to the storage media and pushed to the device cache, while simultaneously being written back to the preceding processing link, and directly loaded by the data acquisition configuration upon the next acquisition startup. If the device is running, the parameter update package takes effect at the next segment boundary according to the routing schedule; if the boundary is not reached, it is only registered as pending, preventing session anomalies caused by sudden parameter changes mid-segment. Understandably, after completing the policy mapping and training suggestion generation, the output field name is parameter update package. This output enters the data acquisition configuration at the end of this main step, forming a closed loop from identification, evaluation, alarm to policy rewriting, and creating an auditable adjustment record at the cross-main step level. The technical effect of this step can be summarized as follows: by transforming anomaly prompts into two-layer policies—training and system—and then applying these policies to the rewritable parameter update package, training guidance and acquisition configuration achieve a unified and interconnected process, enabling subsequent iterations to continuously run around a unified time base and segment index.
[0067] Example 2: Figure 2 A structural block diagram of a knee joint injury postoperative rehabilitation movement recognition device according to an embodiment of the present invention is shown. Figure 2 As shown, the structure may include:
[0068] The data acquisition and time correlation module 01 is used to acquire wearable inertial sensor data, image data, or pressure data and correlate them with time, generating raw multi-source data and data acquisition configuration, and providing them to the static zero-point calibration and limb parameter estimation module and the binding configuration and preprocessing module. Specifically, the data acquisition and time correlation module connects to the inertial channel from the wearable device, the image channel from the camera, or the pressure channel from the sole of the foot, reads the channel identifier, assembly position, sampling frequency, and time source, and completes channel registration and permission verification; it performs missing segment review, duplicate segment review, and amplitude over-amplitude verification on the raw sequences of each channel. The system performs boundary review, generates anomaly records and marks anomaly intervals; completes time unification and resampling according to a unified time source, performs time pairing and sequence verification on cross-channel records, and forms a multi-source sequence after time synchronization; summarizes channel registration, synchronization strategy and anomaly records to generate data acquisition configuration; encapsulates the time-synchronized signal and source identifier to generate raw multi-source data; the raw multi-source data and data acquisition configuration are transmitted to the static zero-position calibration and limb parameter estimation module, and the raw multi-source data are synchronously transmitted to the binding configuration and preprocessing module, and the time index and session identifier are registered in the local cache for subsequent reading and tracing.
[0069] The Static Zero-Position Calibration and Limb Segment Parameter Estimation Module 02 is used to extract static standing segments from the original multi-source data, complete static zero-position calibration and limb segment parameter estimation, output individual parameters and alignment indexes, and provide them to the binding configuration and preprocessing module and the skeleton calculation and joint angle generation module. Specifically, the Static Zero-Position Calibration and Limb Segment Parameter Estimation Module receives the original multi-source data, filters static standing segments based on channel fluctuation, plantar pressure state, and image stability, and forms a static segment index; performs zero-position calibration on each assembly position within the static segment index range, generates assembly angle corrections, and registers calibration reports; estimates the lengths of the thigh and lower leg segments, joint center reference points, and assembly offsets based on the subject's height, body shape, image key points, or plantar contact area distribution, and summarizes and generates individual parameters; constructs cross-channel time mapping, assembly position mapping, and source mapping to form an alignment index; transmits individual parameters and alignment indexes to the binding configuration and preprocessing module, and simultaneously transmits individual parameters and alignment indexes to the skeleton calculation and joint angle generation module, and registers the version number and effective time on the storage medium for subsequent modules to read according to the version.
[0070] The binding configuration and preprocessing module 03 is used to bind and configure individual parameters and alignment indices, generate a preprocessed sequence, and provide it to the attitude observation extraction and drift suppression module. Specifically, the binding configuration and preprocessing module receives individual parameters, alignment indices, and data acquisition configurations from the acquisition and time correlation module. It writes limb length, joint center reference point, and assembly angle correction into the binding area to complete the channel-to-limb mapping registration. Based on a unified time, it performs channel rearrangement and field normalization on the multi-source sequences, constructs a sample frame set arranged in chronological order, and records missing masks and anomaly flags. Under the constraint of the assembly angle correction, it runs the initial attitude solution to obtain the coarse attitude trajectory and marks the usability level. It encapsulates the sample frame set, coarse attitude trajectory, and annotation results to generate a preprocessed sequence. The preprocessed sequence is transmitted to the attitude observation extraction and drift suppression module, and the segment range and time range are registered in the device cache for downstream use.
[0071] The attitude observation extraction and drift suppression module 04 is used to construct an attitude observation sequence from the preprocessed sequence and provide it to the skeleton calculation and joint angle generation module. Specifically, the attitude observation extraction and drift suppression module receives the preprocessed sequence, extracts angular velocity and acceleration observations in chronological order, and compares them with the coarse attitude trajectory to obtain combined observations. For slow-offset segments, it performs steady-state anchor point alignment and zero-velocity updates, and performs intra-segment backoff for long-term offset channels. For short-term missing segments, it retains position markers without interpolation to avoid introducing false events. It encapsulates the time series, combined observations, and confidence levels to construct the attitude observation sequence. The attitude observation sequence is transmitted to the skeleton calculation and joint angle generation module, and the source channel and segment identifier are registered in the local cache for subsequent verification.
[0072] The skeleton calculation and joint angle generation module 05 is used to extract joint angle candidates from the posture observation sequence, perform skeleton calculation based on individual parameters and alignment index, and output posture sequence and knee joint angle sequence to the gait phase recognition and action candidate generation module. Specifically, the skeleton calculation and joint angle generation module receives the posture observation sequence, individual parameters and alignment index, constructs a limb reference frame under the assembly angle correction constraint, performs relative orientation of the thigh and lower leg segments, and extracts joint angle candidates; it verifies the candidate trajectory according to the link constraint, performs neighborhood backtracking for instantaneous anomalies, and performs time mapping alignment for cross-segment offsets; it encapsulates the limb spatial posture and joint angles to generate posture sequence and knee joint angle sequence; the posture sequence and knee joint angle sequence are transmitted to the gait phase recognition and action candidate generation module, and the posture sequence is registered as the reference trajectory for subsequent segment boundary detection.
[0073] The gait phase recognition and action candidate generation module 06 is used to perform periodic segmentation and gait phase recognition on the knee joint angle sequence. After obtaining the posture sequence, it completes segment boundary detection and action candidate generation, outputs the action candidate set, and provides it to the hierarchical action graph matching and sequence discrimination model module. Specifically, the gait phase recognition and action candidate generation module receives the knee joint angle sequence and reads the posture sequence. It divides the period according to local extrema, rate of change, and order rules, and labels key phase events to form a phase label sequence. Based on the displacement stability interval of the phase label sequence and the posture sequence, it examines the segment boundaries, eliminates interference intervals, and retains the verification flags. It generates candidate segments between adjacent boundaries and extracts the angle envelope and change order, summarizing them into an action candidate set. The action candidate set is transmitted to the hierarchical action graph matching and sequence discrimination model module, and the boundary source and phase trigger information are registered in the cache for upstream traceability.
[0074] The hierarchical motion map matching and sequence discrimination model module 07 is used to extract temporal features from the motion candidate set, complete the matching with the hierarchical motion map for the rehabilitation stage, and perform sequence discrimination model inference to generate motion categories and completion scores, which are then provided to the quality assessment, threshold linkage alarm, and strategy write-back module. Specifically, the hierarchical motion map matching and sequence discrimination model module receives the motion candidate set, extracts the duration within a segment, peak and valley positions, phase dwell ratio, and sequential relationship between candidate segments to form a temporal feature set; loads the hierarchical motion map, and sorts it by stage node, The action category node is matched with the action instance template. Candidate segments that do not meet the threshold are retained in their original positions and the reasons are recorded. Sequence discrimination inference is run on the matching results. Candidates are rearranged using context windows, inter-segment dependency gating is used to check the inheritance relationship, and low-confidence segments are handled by anomaly suppression. Then, a full order check is performed. The category identifier, score, window confidence level, and check mark are encapsulated to generate the action category and completion score. The action category and completion score are transmitted to the quality assessment and threshold linkage alarm and policy write-back module, and the node path summary is registered in the cache for reference in the policy stage.
[0075] The Quality Assessment and Threshold-Linked Alarm and Policy Write-back Module 08 is used to calculate quality weights and classify data based on action category and completion score, perform linkage comparison with safety thresholds to generate anomaly prompts, complete policy mapping and training suggestion generation, form parameter update packages, and write them back to the data acquisition configuration. Specifically, the Quality Assessment and Threshold-Linked Alarm and Policy Write-back Module receives action category and completion score, aggregates window confidence level and verification mark, calculates quality weights based on weight factor table and outputs classification labels; performs linkage comparison between key indicators and safety threshold items, generates anomaly prompts and registers alarm timelines; performs policy mapping based on anomaly prompts, combining action-level policies and system-level policies into training suggestions and configuration adjustments; packages data acquisition configuration updates, synchronous policy fine-tuning, segment template revisions, and threshold item corrections into parameter update packages; writes the parameter update packages back to the data acquisition configuration and registers the effective time; quality weights and classification labels are available for log and traceability reading; anomaly prompts are available for training reference, thus closing the workflow of acquisition, identification, assessment, alarm, and write-back.
[0076] Example 3: This embodiment of the invention provides a computer-readable storage medium, which includes a stored computer program, wherein a method for recognizing postoperative rehabilitation movements of knee joint injury is used to control the execution of the device where the computer-readable storage medium is located during the execution of the computer program.
[0077] One method for recognizing rehabilitation movements after knee joint injury surgery, when implemented as a software functional unit and used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
Claims
1. A method for recognizing rehabilitation movements after knee joint injury surgery, characterized in that, include: S100: Acquire wearable inertial, optional image or pressure data and associate it with time; perform acquisition channel registration, data integrity verification and timestamp standardization processing; perform static zero-position calibration, limb parameter estimation and binding configuration processing; and generate a preprocessed sequence. S200: Based on the preprocessed sequence, perform attitude observation extraction and drift suppression processing, and perform skeleton calculation containing individual parameters and alignment index, perform gait phase recognition processing, and generate attitude sequence and phase sequence containing timestamp, segment number, phase label and confidence level; S310. Obtain the attitude sequence and phase sequence, and perform segment boundary detection and action candidate generation processing with unified time base and phase coherence constraints to obtain the action candidate set; S320. Extract temporal features from the action candidate set, including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence, and cross-segment connection relationship. Based on the action candidate set and the temporal features, hierarchical action graph matching is performed following a top-down order, and is checked against node sequence constraints and necessary events to generate a time-ordered action matching sequence. The hierarchical motion map matching process includes: loading a hierarchical motion map oriented towards the rehabilitation stage. The hierarchical motion map refers to a multi-layered node structure divided according to the rehabilitation plan, with the upper layer being stage nodes, the middle layer being motion category nodes, and the bottom layer being motion instance templates; each node is configured with sequential constraints, mandatory events, optional events, and allowable deviation ranges; the matching process adopts a top-down order: first, within the stage nodes, combinations of candidate segments whose features satisfy the sequential constraints are screened; then, at the motion category node level, the features within the segments are compared with the mandatory events, and candidate segments that do not meet the mandatory events are returned to their original positions to wait for neighboring segments to be merged; when a candidate segment meets the threshold of the category node, it enters the motion instance template verification stage, and each item is verified according to the event position and angle envelope shape in the template. The allowable deviation range is jointly trimmed by the confidence level and quality label of the candidate segment; S330. Based on the action matching sequence, perform sequence discrimination model inference including context window, inter-segment dependency gating and anomaly ratio suppression to generate action category and completion score; The reasoning process of the sequence discrimination model includes: taking the action matching sequence as input, and simultaneously referencing the intra-segment features and inter-segment features retained in the action candidate set as context supplements, and internally setting three types of sub-units: context window, inter-segment dependency gating, and anomaly ratio suppression; During operation, the candidates are first rearranged in the context window. The rearrangement rules follow the replaceable order and jump tolerance allowed by the stage node. Then, the necessary connection between adjacent candidates is checked in the inter-segment dependency gating. If the connection is missing, backtracking and merging are triggered. Anomaly proportion suppression is used to handle intervals with low confidence levels in candidate segments. When the anomaly proportion exceeds the window threshold, the window output is set to pending. After completing window-level inference, the model performs total order verification across the entire range, downgrading local outputs that do not meet the total order requirement. S400: Obtain action category and completion score, perform quality weight calculation and grading processing including weight factor table aggregation identification confidence, phase coherence and structural verification elements, extract key indicators such as completion trajectory fluctuation amplitude, phase dwell time distribution, and joint angle envelope offset, compare them with safety thresholds, and perform policy mapping processing by selecting action-level and system-level policies from the policy library to generate parameter update package.
2. The method according to claim 1, characterized in that, The process of segment boundary detection and action candidate generation also includes: Based on the order and time interval of phase labels, key turning points within the same segment are initially screened. Key turning points refer to local extremes, abrupt changes in the rate of change, and phase boundaries of the knee joint angle over time. Segment boundary detection is then performed, adhering to the constraints of temporal continuity and phase coherence. When the interval between adjacent key turning points exceeds the segment threshold or when the quality label indicates accumulated interference, it is recorded as a suspicious boundary and enters the review stage. In the review stage, the stable intervals of relative limb displacement in the posture sequence are read, and neighborhood consistency checks are performed on suspicious boundaries. Those that fail are reverted to ordinary turning points, while those that pass are registered as segment boundaries. After the boundary set is constructed, action candidate generation is carried out. Action candidate generation refers to the formation of candidate segments between adjacent segment boundaries. Each segment carries the start and end times, trigger phase, segment number, and boundary source marker. At the same time, three basic attributes are extracted from the posture sequence: angle envelope, angle change sequence, and phase dwell time within the segment.
3. The method according to claim 1, characterized in that, The process of generating action candidates also includes: If the missing test mask covers the core area of the candidate segment, a check mark is added to the candidate segment and the original time and position information is retained; if the segment session is interrupted, the generated candidate segment and the first segment of the next segment are attempted to be spliced across segments. If the splicing fails, they are retained separately and a split mark is added to the candidate segment.
4. The method according to claim 1, characterized in that, The process of extracting temporal features, including intra-segment duration, joint angle peak and valley positions, phase dwell ratio, chronological order of key events, and cross-segment connectivity, also includes: Extract computable elements describing the sequential relationships within and between candidate segments, covering segment duration, joint angle peak and valley positions, phase dwell ratio, key event sequence, and cross-segment connection relationships; The extraction process follows a uniform time base sliding pattern, using a fixed window and a segment adaptive window to generate feature sets in parallel. When segmentation markers exist, intra-segment features are calculated only within the range that does not cross the markers, and cross-mark relationships are separately registered as candidate inter-segment features. Load a hierarchical motion map for rehabilitation stages. The hierarchical motion map refers to a multi-layered node structure based on the rehabilitation plan. The upper layer is the stage node, the middle layer is the motion category node, and the bottom layer is the motion instance template. Each node is configured with sequence constraints, required events, optional events, and allowable deviation range. The matching process follows a top-down order: first, within the stage node, combinations of features between candidate segments that satisfy the sequence constraints are selected; then, at the motion category node level, the features within the segment are compared with the required events. Candidate segments that do not meet the required events are returned to their original positions to wait for merging with neighboring segments; once a candidate segment meets the threshold of the category node, it enters the motion instance template verification stage, where each item is verified according to the event position and angle envelope shape in the template. The allowable deviation range is jointly pruned by the confidence level and quality label of the candidate segment. After the matching is completed, a time-ordered action matching sequence is generated. The action matching sequence consists of candidate segment identifiers and action category identifiers, and includes matching confidence level and node path records.
5. The method according to claim 1, characterized in that, The process of hierarchical action graph matching also includes: The local order relationship is reconstructed using a neighboring segment supplementation strategy. If the reconstruction fails, the unmatched state is maintained in the matching result and the reason code is recorded.
6. The method according to claim 1, characterized in that, The process of generating action categories and completion scores also includes: The completion score is derived from two parts: the overlap between intra-segment features and instance templates, and the fit between inter-segment features and stage constraints. The two are combined according to the internal weights of the model.
7. A device for recognizing rehabilitation movements after knee joint injury surgery, applied to the method described in any one of claims 1-6, characterized in that, include: The data acquisition and time correlation module is used to acquire wearable inertial sensor data, image data, or pressure data and correlate them with time, generate raw multi-source data and data acquisition configuration, and provide them to the static zero-position calibration and limb parameter estimation module and the binding configuration and preprocessing module. The static zero-position calibration and limb parameter estimation module is used to extract the static standing segment from the original multi-source data, complete the static zero-position calibration and limb parameter estimation, output individual parameters and alignment index and provide them to the binding configuration and preprocessing module and the skeleton calculation and joint angle generation module; The binding configuration and preprocessing module is used to bind and configure individual parameters and alignment indices, generate preprocessed sequences, and provide them to the attitude observation extraction and drift suppression module. The attitude observation extraction and drift suppression module is used to construct an attitude observation sequence from the preprocessed sequence and provide it to the skeleton solution and joint angle generation module; The skeleton calculation and joint angle generation module is used to extract joint angle candidates from the posture observation sequence, perform skeleton calculation based on individual parameters and alignment index, and output posture sequence and knee joint angle sequence to the gait phase recognition and action candidate generation module. The gait phase recognition and action candidate generation module is used to perform periodic segmentation and gait phase recognition on the knee joint angle sequence. After obtaining the posture sequence, it completes segment boundary detection and action candidate generation, outputs the action candidate set and provides it to the hierarchical action graph matching and sequence discrimination model module. The hierarchical motion map matching and sequence discrimination model module is used to extract temporal features from the motion candidate set, complete the matching with the hierarchical motion map for the rehabilitation stage, perform sequence discrimination model inference, generate motion category and completion score, and provide them to the quality assessment and threshold linkage alarm and strategy write-back module. The quality assessment and threshold linkage alarm and policy write-back module is used to calculate quality weights and classify data based on action category and completion score, perform linkage comparison with safety threshold to generate anomaly prompts, complete policy mapping and training suggestion generation processing, form parameter update package and write back to data acquisition configuration.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is called and executed by a computer to implement any one of the knee joint injury postoperative rehabilitation movement recognition methods as described in claims 1 to 6 above.
Citation Information
Patent Citations
Knee joint rehabilitation action recognition method and system
CN113869142A
Knee joint rehabilitation action recognition method and system
CN117423165A