Optimization Method for Temporal Data Modeling of Gait Rehabilitation Embodied Robots Based on Frequency Domain Learning

Through the frequency domain learning method, multimodal data processing of gait rehabilitation robots is solved, and the Fourier transform is sensitive to noise and low efficiency of traditional methods is achieved, efficient gait feature capture and control optimization is achieved, and rehabilitation effect and safety are improved.

CN119811586BActive Publication Date: 2025-05-30NANJING ARTIFICIAL INTELLIGENCE CHIPS RES INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510302109.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-05-30
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

In the prior art, in gait rehabilitation robots, the Fourier transform is sensitive to high-frequency noise, affects the robustness and accuracy of the model, and it is difficult to effectively capture complex nonlinear or mutational features. The traditional partial differential equation solution method is inefficient in high-dimensional and nonlinear problems, making it difficult to deal with multi-scale gait features and personalized control.

Method used

Using a frequency domain learning method, multimodal sensor data preprocessing, multi-scale convolution and frequency domain processing, combined with self-attention mechanism and frequency domain alignment and fusion, noise suppression and feature enhancement are carried out, gait changes and recovery trends are captured, and smooth safety control sequences are generated.

Benefits of technology

The robustness and accuracy of the model are improved, the stable characterization of key gait characteristics is enhanced, the control performance and simulation accuracy of the gait rehabilitation robot are improved, and the safety and effectiveness of the rehabilitation process are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119811586B_ABST
    Figure CN119811586B_ABST
Patent Text Reader

Abstract

The present invention discloses an optimization method for temporal data modeling of a gait rehabilitation embodied robot based on frequency domain learning, including: acquiring multi-modal sensor data and performing preprocessing, calculating gait parameters and generating a patient state vector; applying multi-scale convolution and frequency domain processing to obtain enhanced features; performing block processing and positional encoding to obtain encoded enhanced features, and obtaining residual fusion features through noise suppression processing; applying a self-attention mechanism and frequency domain alignment fusion processing to obtain final fusion features; performing frequency domain decomposition and multi-scale memory filtering to obtain spatio-temporal fusion features; evaluating the rehabilitation progress and generating a gait correction vector and a corrected timing curve, and outputting a smooth and safe control sequence. The present invention reduces the influence of high-frequency noise, thereby improving the robustness and accuracy of the model; realizes the stable representation of key gait features, enhances the precision and consistency of the model in processing complex temporal data; and improves the control performance and simulation accuracy of the gait rehabilitation robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of gait rehabilitation, and in particular, to an optimization method for modeling time-series data of a gait rehabilitation embodied robot based on frequency-domain learning. Background Art

[0002] In current research, a series of remarkable progress has been made in the fields of frequency-domain representation learning, complex time-series data modeling, partial differential equation solving, and data-driven modeling. The core goal of these technologies is to improve the prediction accuracy and robustness in high-dimensional spatio-temporal data and complex non-linear dynamic systems, but there are still some limitations. Gait rehabilitation robots show great potential in helping patients recover motor function and improve the effect of rehabilitation treatment. Especially when combined with technologies such as frequency-domain learning and reinforcement learning, they can optimize rehabilitation training strategies through real-time perception and dynamic adjustment. However, there are still some challenges in practical applications.

[0003] Frequency-domain representation learning converts time-series data from the time domain to the frequency domain through Fourier transform, which can effectively capture periodic or trend features in gait data. In gait rehabilitation robots, Fourier transform is widely used to process patients' gait data to help the robot dynamically adjust motion control. The application of Fourier transform in gait data modeling can improve the prediction accuracy of the model and the execution efficiency of control strategies. However, Fourier transform is very sensitive to high-frequency noise, and noise such as tiny muscle contraction signals that may appear in gait data will affect the robustness and accuracy of the model, resulting in limitations in the performance of the robot in complex rehabilitation environments. In addition, when processing signals containing complex non-linear or mutation features, Fourier transform may not be able to fully capture these features, which will affect the accuracy of the robot control system.

[0004] One of the main challenges faced by gait rehabilitation robots is how to maintain a stable representation of key gait features during the process of complex time-series data modeling, ensuring that the robot can still accurately predict and control motion under different patient and environmental conditions. Existing research maintains the dynamic consistency of data by designing models with invariant features. For example, the double simulation technique can be used in reinforcement learning to enhance the adaptability of the robot in uncertain environments. However, when dealing with highly complex gait time-series data, especially when involving diverse patient groups and rehabilitation tasks, existing methods may face computational complexity and storage bottlenecks. Especially during long-term training, cumulative errors may lead to a decrease in accuracy, affecting the stability and reliability of the robot training effect.

[0005] Partial differential equations (PDEs), as important tools for describing and predicting the behavior of spatio-temporal data in dynamic systems, also play a crucial role in the motion control of gait rehabilitation robots. Traditional methods for solving PDEs, such as the finite difference method and the finite element method, although performing well in low-dimensional problems, are less efficient when faced with high-dimensional and non-linear problems. In recent years, data-driven methods for solving PDEs have made significant progress. Through methods such as deep learning and neural operators, they can more efficiently simulate complex motion control and the dynamics of gait data. However, these methods still face the challenges of how to handle multi-scale gait features and personalized control problems. Although neural operators have to some extent made up for the deficiencies of traditional numerical methods, in the dynamic and high-dimensional environment of gait rehabilitation robots, their generalization ability is still limited. Especially in complex or extreme situations, their control performance may be inferior to traditional physically guided methods. Summary of the Invention

[0006] The object of the invention is to provide an optimized method for modeling time-series data of a gait rehabilitation embodied robot based on frequency-domain learning to solve the above problems existing in the prior art.

[0007] Technical solution: An optimized method for modeling time-series data of a gait rehabilitation embodied robot based on frequency-domain learning includes the following steps:

[0008] Obtain multi-modal sensor data, perform preprocessing to obtain aligned and synchronized data; calculate gait parameters based on the aligned and synchronized data and compare them with the standard gait pattern to generate a patient state vector;

[0009] Concatenate the aligned and synchronized data into a multi-modal input tensor, and apply multi-scale convolution and frequency-domain processing to it and the patient state vector to obtain enhanced features; perform block processing and positional encoding on the enhanced features to obtain encoded enhanced features, and obtain residual fusion features through noise suppression processing;

[0010] Apply the self-attention mechanism to the residual fusion features to obtain normalized attention features, and perform frequency-domain alignment and fusion processing on the normalized attention features to obtain the final fusion features;

[0011] Perform frequency-domain decomposition and multi-scale memory filtering on the final fusion features, and combine the patient state vector to capture gait changes and rehabilitation trends to obtain spatio-temporal fusion features;

[0012] Evaluate the rehabilitation progress based on the spatio-temporal fusion features and the patient state vector, generate a gait correction vector and a correction time-series curve, and output a smooth and safe control sequence.

[0013] Advantageous effects: The present invention performs block processing and position encoding on features and reduces the influence of high-frequency noise through noise suppression processing, thereby improving the robustness and accuracy of the model; through the self-attention mechanism and frequency-domain alignment fusion processing, stable representation of key gait features is achieved, and gait changes and rehabilitation trends are captured through multi-scale memory filtering and spatio-temporal fusion features, enhancing the precision and consistency of the model in processing complex time-series data; through technologies such as deep learning and multi-scale convolution, gait data is processed, overcoming the inefficiency of traditional partial differential equation methods in high-dimensional and non-linear problems, and improving the control performance and simulation accuracy of gait rehabilitation robots. Brief Description of the Drawings

[0014] Figure 1 It is a flowchart of the steps of a method for optimizing the modeling of time-series data of a gait rehabilitation embodied robot based on frequency-domain learning provided by an embodiment of the present application.

[0015] Figure 2 It is a flowchart of the steps for preprocessing to obtain aligned and synchronized data provided by an embodiment of the present application.

[0016] Figure 3 It is a flowchart of the steps for obtaining enhanced features by applying multi-scale convolution and frequency-domain processing provided by an embodiment of the present application.

[0017] Figure 4 It is a flowchart of the steps for performing block processing and position encoding to obtain encoded enhanced features provided by an embodiment of the present application. Detailed Embodiments

[0018] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0019] It should be particularly noted that, for clearly showing the step flow of the present application, serial numbers are marked for each step in the specification. These serial numbers are only for the convenience of description and do not limit the execution order of the steps. In actual operation, according to the technical requirements of specific implementation scenarios, the steps can be executed in an order different from that shown in the specification, and in some cases, parallel processing between steps can also be achieved.

[0020] As Figure 1 shown, the method for optimizing the modeling of time-series data of a gait rehabilitation embodied robot based on frequency-domain learning includes the following steps:

[0021] S1. Obtain multi-modal sensor data, perform preprocessing to obtain aligned and synchronized data; calculate gait parameters based on the aligned and synchronized data and compare them with the standard gait pattern to generate a patient state vector.

[0022] S2. Concatenate the aligned and synchronized data into a multi-modal input tensor, and apply multi-scale convolution and frequency-domain processing to the multi-modal input tensor and the patient state vector to obtain enhanced features; perform block processing and position encoding on the enhanced features to obtain encoded enhanced features, and obtain residual fusion features through noise suppression processing.

[0023] S3. Apply the self-attention mechanism to the residual fusion features to obtain normalized attention features, and perform frequency-domain alignment and fusion processing on the normalized attention features to obtain the final fusion features.

[0024] S4. Perform frequency-domain decomposition and multi-scale memory filtering on the final fusion features, and combine the patient state vector to capture gait changes and rehabilitation trends to obtain spatio-temporal fusion features.

[0025] S5. Evaluate the rehabilitation progress based on the spatio-temporal fusion features and the patient state vector, generate a gait correction vector and a correction time series curve, and output a smooth and safe control sequence.

[0026] According to one aspect of the present application, step S1 is further as follows:

[0027] S11. Obtain IMU sensor data, pressure sensor data, electromyography sensor data, and optical motion capture data, and apply filters to these data respectively for noise reduction processing to obtain filtered IMU data, filtered pressure data, filtered electromyography data, and filtered motion capture data.

[0028] S12. Resample and time-align these filtered data to obtain aligned and synchronized data.

[0029] S13. Calculate gait parameters based on the aligned and synchronized data and compare them with the standard gait pattern to obtain an initial gait feature vector and a gait deviation index; combine the initial gait feature vector, the gait deviation index, and the patient's rehabilitation stage identifier into a patient state vector.

[0030] As Figure 2 shown, according to one aspect of the present application, the steps of performing preprocessing to obtain aligned and synchronized data include:

[0031] Apply corresponding filters to the multi-modal sensor data for noise reduction processing to obtain filtered data.

[0032] Detect the sampling rate of the filtered data and establish a timestamp mapping table.

[0033] Select the mode with the highest sampling rate as a reference based on the timestamp mapping table, resample the filtered data to a unified sampling rate, and obtain a synchronized data sequence;

[0034] Align the starting points of all synchronized data sequences and clip them to the same length to obtain aligned synchronized data.

[0035] According to one aspect of the present application, the steps of calculating gait parameters and generating a patient state vector include:

[0036] Calculate basic gait parameters including stride frequency, stride length, and stance phase ratio based on the aligned synchronized data to obtain an initial gait feature vector of dimension K;

[0037] Compare the initial gait feature vector with the standard gait pattern and calculate the gait deviation index;

[0038] Generate a patient rehabilitation stage identifier with values of "early", "mid", or "late" based on the pre-stored patient medical history and assessment results;

[0039] Merge the initial gait feature vector, gait deviation index, and patient rehabilitation stage identifier into a patient state vector for subsequent processing steps.

[0040] In this embodiment, multi-modal sensor data is acquired, including acquiring data from multiple sensors with different sensor numbers, channel numbers, batch size B, and time series length T. Specifically, it includes: acquiring IMU sensor data with sensor number S_I and channel number C_I; acquiring pressure sensor data with sensor number S_P; acquiring electromyography sensor data with sensor number S_E and channel number C_E; acquiring three-dimensional spatial coordinate optical motion capture data with joint point number J.

[0041] Preprocess and denoise the multi-modal sensor data. Specifically, it includes: applying a band-pass filter with a cut-off frequency from 0.5 Hz to 20 Hz to the IMU sensor data to remove high-frequency noise and low-frequency drift and obtain filtered IMU data; applying a median filter with a window size of 5 to the pressure sensor data to eliminate instantaneous spike noise and obtain filtered pressure data; applying a moving average filter with a window size of 10 and performing envelope detection on the electromyography sensor data to obtain filtered electromyography data; applying a Kalman filter to the optical motion capture data and using preset process noise and measurement noise parameters to smooth the trajectory and fill in missing values to obtain filtered motion capture data.

[0042] Synchronize and resample the filtered IMU data, filtered pressure data, filtered EMG data, and filtered motion capture data. Specifically, it includes: detecting the sampling rates of each modality data, establishing a timestamp mapping table containing the timestamps and corresponding relationships of each modality data; selecting the modality with the highest sampling rate as the reference, resampling all modality data to a unified sampling rate of 100 Hz to obtain a synchronized data sequence; aligning the starting points of all synchronized data sequences and trimming them to the same length T_common to obtain aligned and synchronized data. Initialize the evaluation of the patient's gait characteristics based on the aligned and synchronized data.

[0043] In an embodiment of the present application, obtain inertial measurement unit (IMU) sensor data D_IMU ∈ R (B ×T×S_I×C_I) , where B is the batch size, representing the number of data samples processed simultaneously; T is the time series length, representing the number of time points for each sample; S_I is the number of IMU sensors, C_I is the number of IMU channels (3 axes each for accelerometer, gyroscope, and magnetometer, a total of 9 axes), and R is the set of real numbers. Obtain pressure sensor data D_PRESS ∈ R (B×T×S_P) , where S_P is the number of plantar pressure sensors. Obtain electromyography (EMG) sensor data D_EMG ∈ R (B×T×S_E×C_E) , where S_E is the number of EMG sensors and C_E is the number of EMG channels. Obtain optical motion capture data D_MOCAP ∈ R (B×T×J×3) , where J is the number of joint points, representing the number of human joint points tracked in the optical motion capture data; 3 represents the three-dimensional space coordinates.

[0044] Apply a band-pass filter to the IMU sensor data to remove high-frequency noise and low-frequency drift, obtaining filtered IMU data D_IMU_F ∈ R (B×T×S_I×C_I) . D_IMU_F = BandpassFilter(D_IMU, f_low = 0.5 Hz, f_high = 20 Hz). Apply median filtering to the pressure sensor data to eliminate instantaneous spike noise, obtaining filtered pressure data D_PRESS_F ∈ R (B ×T×S_P) . D_PRESS_F = MedianFilter(D_PRESS, window_size = 5). Apply moving average filtering and envelope detection to the EMG sensor data to obtain filtered EMG data D_EMG_F ∈ R (B×T×S_E×C_E)。D_EMG_SMOOTH = MovingAverageFilter(D_EMG, window_size = 10); D_EMG_F = EnvelopeDetection(D_EMG_SMOOTH). Apply Kalman filter to the optical motion capture data to smooth the trajectory and fill in the missing values, obtaining the filtered motion capture data D_MOCAP_F ∈ R (B×T×J×3) 。D_MOCAP_F = KalmanFilter(D_MOCAP, Q = process_noise, R = measurement_noise).

[0045] Detect the sampling rates of each modality data, establish a timestamp mapping table T_MAP, which contains the timestamps and corresponding relationships of each modality data. Select the modality with the highest sampling rate as the reference, and resample all modality data to a unified sampling rate f_s = 100Hz, obtaining the synchronized data sequences D_IMU_S, D_PRESS_S, D_EMG_S, D_MOCAP_S. D_IMU_S = ResampleData(D_IMU_F, original_rate, target_rate = 100Hz); D_PRESS_S = ResampleData(D_PRESS_F, original_rate, target_rate = 100Hz); D_EMG_S = ResampleData(D_EMG_F, original_rate, target_rate = 100Hz); D_MOCAP_S = ResampleData(D_MOCAP_F, original_rate, target_rate = 100Hz). Align the starting points of all data sequences and clip them to the same length T_common, obtaining the aligned and synchronized data D_IMU_AS, D_PRESS_AS, D_EMG_AS, D_MOCAP_AS.

[0046] Calculate basic gait parameters such as step frequency, step length, and standing phase ratio based on the aligned and synchronized data, obtaining the initial gait feature vector G_INIT ∈ R K, where K is the feature dimension. step_frequency = DetectStepFrequency(D_PRESS_AS); step_length = CalculateStepLength(D_MOCAP_AS); stance_ratio = CalculateStanceRatio(D_PRESS_AS); G_INI = [step_frequency, step_length, stance_ratio,...], where step_frequency is the step frequency, step_length is the step length, and stance_ratio is the stance phase ratio. Comparing with the standard gait pattern, calculate the gait deviation index G_DEV ∈ R K . G_DEV = (G_INIT - G_STANDARD) / G_STANDARD. Generate the patient rehabilitation stage identifier R_PHASE ∈ {initial stage, middle stage, late stage} according to the patient's medical history and evaluation results. Combine the initial gait feature vector G_INIT, the gait deviation index G_DEV, and the patient rehabilitation stage identifier R_PHASE into the patient state vector P_STATE.

[0047] where D_IMU is the original IMU sensor data; D_PRESS is the original pressure sensor data; D_EMG is the original electromyography sensor data; D_MOCAP is the original optical motion capture data; f_low is the low-frequency cut-off value of the band-pass filter; f_high is the high-frequency cut-off value of the band-pass filter; G_STANDARD is the standard gait feature vector; BandpassFilter is the band-pass filter; MedianFilter is the median filter; window_size is the window size; D_EMG_SMOOTH is the electromyography data after moving average filtering; MovingAverageFilter is the moving average filter; EnvelopeDetection is the envelope detection; KalmanFilter is the Kalman filter; process_noise is the process noise; measurement_noise is the measurement noise; ResampleData is the resampling data function; original_rate is the original sampling rate; target_rate is the target sampling rate; DetectStepFrequency is the function to detect the step frequency; CalculateStepLength is the function to calculate the step length; CalculateStanceRatio is the function to calculate the stance phase ratio; G_INI is the initial gait feature vector.

[0048] In this embodiment, filters are respectively applied to the IMU sensor data, pressure sensor data, electromyography sensor data, and optical motion capture data for noise reduction processing, effectively removing high-frequency noise and low-frequency drift, improving the quality and reliability of the data, and ensuring the accuracy of subsequent processing. This embodiment realizes the improvement of data quality, the accurate extraction of gait features, and the comprehensive consideration of rehabilitation evaluation, improves the adaptability and effectiveness of the gait rehabilitation embodied robot in a complex rehabilitation environment, and ensures the safety and effectiveness of the patient's rehabilitation process.

[0049] According to one aspect of the present application, step S2 is further as follows:

[0050] S21. Concatenate the aligned and synchronized data into a multi-modal input tensor; apply multi-scale convolution to the multi-modal input tensor to obtain multi-scale features; calculate the adaptive band division parameter based on the patient state vector; apply the fast Fourier transform to the multi-modal input tensor to obtain the frequency-domain representation and perform band masking processing; generate an adaptive sparse projection matrix based on the patient state vector and apply it to the frequency-domain data; calculate the high-order spectral features of the frequency-domain representation to obtain the high-order spectral features; fuse the multi-scale features, sparse frequency-domain features, and high-order spectral features to obtain enhanced features;

[0051] S22. Perform block processing on the enhanced features and apply positional encoding to obtain the encoded enhanced features;

[0052] S23. Estimate the noise feature profile and use it for noise reduction processing; apply spectral super-resolution reconstruction and truncation processing; combine the inverse Fourier transform and convolution operations, and obtain the residual fusion features through residual connection; calculate statistics based on the residual fusion features, perform quality evaluation and adaptive adjustment, and finally obtain the final enhanced features.

[0053] As Figure 3 shown, according to one aspect of the present application, the steps of obtaining enhanced features by applying multi-scale convolution and frequency-domain processing include:

[0054] Apply multi-scale convolution operation to the multi-modal input tensor to obtain multi-scale features;

[0055] Calculate the adaptive band division parameter according to the patient state vector;

[0056] Apply the fast Fourier transform to the multi-modal input tensor to obtain the frequency-domain representation;

[0057] Perform masking operation on the frequency-domain representation according to the adaptive band division parameter to obtain the frequency-domain mask tensor;

[0058] Generate an adaptive sparse projection matrix based on the patient state vector and pre-stored historical rehabilitation data;

[0059] Apply an adaptive sparse projection matrix to the frequency-domain mask tensor to obtain sparse frequency-domain features;

[0060] Calculate the bispectrum and polyspectrum analysis of the frequency-domain representation to obtain high-order spectrum features;

[0061] Fuse the multi-scale features, sparse frequency-domain features, and high-order spectrum features to obtain enhanced features.

[0062] In this embodiment, multi-scale convolution and frequency-domain adaptive sparse representation processing are performed on the input data. Specifically, it includes: concatenating each modality of the aligned and synchronized data (IMU sensor data, pressure sensor data, electromyography sensor data, and optical motion capture data) into a multi-modal input tensor; applying multi-scale convolution operations with scale parameter r values of 1, 2, 4, and 8 to obtain convolution results under different receptive fields respectively, and concatenating them in the channel dimension to obtain multi-scale features; calculating adaptive frequency band division parameters for 5 frequency bands according to the gait features and rehabilitation stages in the patient state vector; applying the fast Fourier transform to the multi-modal input tensor to obtain the frequency-domain representation; performing a masking operation on the frequency-domain representation according to the adaptive frequency band division parameters to obtain frequency-domain mask tensors for different frequency bands; generating an adaptive sparse projection matrix with a dimensionality reduction parameter M of 64 based on the patient state vector and historical rehabilitation data; applying the adaptive sparse projection matrix to the frequency-domain mask tensor of each frequency band to obtain sparse frequency-domain features; calculating the bispectrum and polyspectrum analysis of the frequency-domain representation to capture non-linear dynamic features and obtain high-order spectrum features; fusing the multi-scale features, sparse frequency-domain features that are inverse-transformed back to the time domain, and high-order spectrum features to obtain enhanced features.

[0063] As Figure 4 shown, according to one aspect of the present application, the steps of performing block processing and position encoding to obtain encoded enhanced features include:

[0064] Divide the enhanced features into blocks according to a preset block size to obtain block features;

[0065] Generate time position encoding, frequency position encoding, and modality type encoding based on the block features;

[0066] Combine the time position encoding, frequency position encoding, and modality type encoding and apply them to the block features to obtain encoded enhanced features.

[0067] In this embodiment, block and position encoding enhancement processing is performed on the enhanced features. Specifically, it includes: dividing the enhanced features into blocks according to a preset block size (M 1 , M 2 ,..., M n)Perform segmentation to obtain block features; generate a time position encoding that reflects time position information, where the encoding of position pos and dimension i is calculated through sine and cosine functions; generate a frequency position encoding that reflects frequency point position information; generate a modality type encoding that differentiates different sensor modalities; combine the time position encoding, frequency position encoding, and modality type encoding, and apply them to the block features to obtain encoded enhanced features.

[0068] According to one aspect of the present application, the steps of obtaining the residual fusion feature through noise suppression processing include:

[0069] Estimate the noise feature profile based on pre-stored patient historical data and the current sensor state;

[0070] Use the noise feature profile to perform adaptive filtering on the frequency domain representation to obtain a preliminary noise-reduced frequency domain representation; apply spectral super-resolution reconstruction technology to enhance the frequency domain information to obtain an enhanced frequency domain representation;

[0071] Apply a truncation operation to the enhanced frequency domain representation to obtain a truncated frequency domain representation;

[0072] Apply the inverse Fourier transform to the truncated frequency domain representation to obtain the time domain Fourier feature;

[0073] Apply a convolution operation to the encoded enhanced feature to obtain a convolution feature;

[0074] Calculate the self-calibration parameter according to the noise feature profile and the pre-stored patient recovery stage;

[0075] Self-calibrate the convolution kernel weights of the convolution feature based on the self-calibration parameter to obtain a calibrated convolution kernel;

[0076] Use the calibrated convolution kernel to perform a second convolution on the encoded enhanced feature to obtain a calibrated convolution feature;

[0077] Fuse the time domain Fourier feature and the calibrated convolution feature through a residual connection to obtain a residual fusion feature.

[0078] In this embodiment, convolutional residual Fourier transform and noise suppression processing are performed on the encoded enhanced features. Specifically, it includes: estimating the noise model for each channel and frequency point based on the patient's historical data and the current sensor state to obtain a noise feature profile; using the noise feature profile to perform adaptive filtering on the frequency-domain representation to obtain a preliminarily denoised frequency-domain representation; applying a spectral super-resolution reconstruction technique to enhance the frequency-domain information with an upsampling factor of 2 to improve the spectral details and obtain an enhanced frequency-domain representation; applying a truncation operation to the enhanced frequency-domain representation to retain the low-frequency part according to an adaptive threshold to obtain a truncated frequency-domain representation; applying an inverse Fourier transform to the truncated frequency-domain representation to obtain a time-domain Fourier feature; applying a convolutional operation with a convolutional kernel size of 3 and a padding of 1 to the encoded enhanced features to capture high-frequency local features and obtain convolutional features; calculating self-calibration parameters according to the current noise feature profile and the patient's rehabilitation stage; performing self-calibration on the convolutional kernel weights to obtain a calibrated convolutional kernel; using the calibrated convolutional kernel to perform a second convolution on the encoded enhanced features to obtain calibrated convolutional features; fusing the time-domain Fourier feature and the calibrated convolutional features through a residual connection to obtain a residual fusion feature; calculating feature statistics such as mean, variance, and spectral energy distribution for the residual fusion feature to obtain a feature statistic vector; evaluating the feature quality based on the feature statistic vector to generate a feature quality score; and adaptively adjusting the residual fusion feature according to the feature quality score to further suppress the influence of noise and obtain the final enhanced feature.

[0079] In one embodiment of the present application, the modalities of the aligned synchronous data are concatenated into a multi-modal input tensor X_IN ∈ R (B×T×C) , where C is the sum of all modal channels. X_IN = Concatenate([D_IMU_AS, D_PRESS_AS, D_EMG_AS, D_MOCAP_AS], dim = 2). Apply a multi-scale convolutional operation with scale parameters r = [1, 2, 4, 8] to obtain the convolutional results under different receptive fields and obtain a multi-scale feature X_MULTI ∈ R (B×T×C_M)。X_MULTI_1 = Conv1D(X_IN, kernel_size=K, dilation=1); X_MULTI_2 = Conv1D(X_IN, kernel_size=K, dilation=2); X_MULTI_4 = Conv1D(X_IN, kernel_size=K, dilation=4); X_MULTI_8 = Conv1D(X_IN, kernel_size=K, dilation=8); X_MULTI = Concatenate([X_MULTI_1, X_MULTI_2, X_MULTI_4, X_MULTI_8], dim=2). Calculate the adaptive frequency band division parameter F_BANDS according to the gait characteristics and rehabilitation stage in the patient state vector P_STATE. F_BANDS = AdaptiveBandDivision(P_STATE, num_bands=5). Apply the fast Fourier transform to the multimodal input tensor X_IN to obtain the frequency domain representation X_FREQ ∈ R (B×F×C) , where F is the number of frequency points. X_FREQ = FFT(X_IN, dim=1). According to the adaptive frequency band division parameter F_BANDS, perform a masking operation on the frequency domain representation X_FREQ to obtain the frequency domain masked tensor X_FREQ_MASKED ∈ R (B×F×C×N_BANDS) . for i in range(N_BANDS): mask_i = CreateFrequencyMask(F_BANDS[i]); X_FREQ_MASKED[:, :, :, i] = X_FREQ * mask_i. Generate an adaptive sparse projection matrix Ψ ∈ R (M*×F) , M * < F, to achieve dimensionality reduction. Ψ = GenerateSparseProjection(P_STATE, patient_history, M=64). Apply the adaptive sparse projection matrix Ψ to the frequency domain masked tensor X_FREQ_MASKED for each frequency band to obtain the sparse frequency domain feature X_SPARSE ∈ R (B×M×C×N_BANDS) . for i in range(N_BANDS): X_SPARSE[:, :, :, i] = MatrixMultiply(Ψ, X_FREQ_MASKED[:, :, :, i]). Calculate the bispectrum and polyspectrum analysis of the frequency domain representation X_FREQ to capture the non - linear dynamic characteristics and obtain the high - order spectrum feature X_POLY ∈ R (B×M_P×C), where M_P is the multi-spectral feature dimension. X_BI = Bispectrum(X_FREQ); X_POLY = Polyspectrum(X_FREQ). Fuse the multi-scale feature X_MULTI, the sparse frequency-domain feature X_SPARSE, and the high-order spectral feature X_POLY to obtain the enhanced feature X_ENHANCED ∈ R (B×T×C_E) . X_SPARSE_TIME = IFFT(X_SPARSE, dim=1), inverse transform back to the time domain; X_POLY_TIME = IFFT(X_POLY, dim=1), inverse transform back to the time domain; X_ENHANCED = FeatureFusion([X_MULTI, X_SPARSE_TIME, X_POLY_TIME]).

[0080] Partition the enhanced feature X_ENHANCED according to the preset block sizes (M 1 , M 2 ,..., M n ) to obtain the block features X_BLOCKS ∈ R (B×N_B×D_B) , where N_B is the number of blocks and D_B is the feature dimension of each block. X_BLOCKS = BlockPartition(X_ENHANCED, block_sizes=[M 1 , M 2 ,..., M n ). Generate the time position encoding PE_T ∈ R (T ×D_PE) , where D_PE is the position encoding dimension. PE_T(pos, 2i) = sin(pos / 10000 (2i / D_PE) ); PE_T(pos, 2i + 1) = cos(pos / 10000 (2i / D_PE) ). Generate the frequency position encoding PE_F ∈ R (F×D_PE) , encoding the position information of each frequency point. PE_F(freq, 2i) = sin(freq / 10000 (2i / D_PE) ); PE_F(freq, 2i + 1) = cos(freq / 10000 (2i / D_PE) ). Generate the modal type encoding PE_M ∈ R (M×D_PE) , M is the number of modalities, distinguishing different sensor modalities. PE_M = LearableEmbedding(modal_ids, D_PE). Combine the time position encoding PE_T, the frequency position encoding PE_F, and the modal type encoding PE_M, and apply them to the block features X_BLOCKS to obtain the encoded enhanced feature X_ENCODED ∈ R (B×N_B×D_B)。X_ENCODED = X_BLOCKS + CombinePositionalEncodings(PE_T, PE_F, PE_M)。

[0081] Based on the patient history data and the current sensor status, estimate the noise feature profile N_PROFILE ∈ R (C×F) , and establish a noise model for each channel and frequency point. N_PROFILE = NoiseEstimator(patient_history, sensor_status, X_FREQ). Apply adaptive filtering to the frequency-domain representation X_FREQ using the noise feature profile N_PROFILE to obtain the preliminary noise-reduced frequency-domain representation X_FREQ_DN ∈ R (B×F×C) 。X_FREQ_DN = AdaptiveFilter(X_FREQ, N_PROFILE). Apply spectral super-resolution reconstruction technology to enhance the frequency-domain information and improve the spectral details to obtain the enhanced frequency-domain representation X_FREQ_SR ∈ R (B×F_SR×C) , where F_SR > F. X_FREQ_SR = SpectralSuperResolution(X_FREQ_DN, upscale_factor = 2). Apply a truncation operation to the enhanced frequency-domain representation X_FREQ_SR to retain the low-frequency part and obtain the truncated frequency-domain representation X_FREQ_TRUNC ∈ R (B×F_SR×C) 。X_FREQ_TRUNC = FrequencyTruncation(X_FREQ_SR, threshold = adaptive_threshold). Apply the inverse Fourier transform to the truncated frequency-domain representation X_FREQ_TRUNC to obtain the time-domain Fourier feature X_FFT ∈ R (B×T×C) 。X_FFT = IFFT(X_FREQ_TRUNC, dim = 1). Apply a convolution operation to the encoded enhanced feature X_ENCODED to capture high-frequency local features and obtain the convolutional feature X_CONV ∈ R (B×N_B×D_C)。X_CONV = Conv1D(X_ENCODED, kernel_size = 3, padding = 1). Calculate the self - calibration parameter ΔW according to the current noise feature profile N_PROFILE and the patient's recovery phase. ΔW = CalibrationNetwork(N_PROFILE, R_PHASE). Perform self - calibration on the convolutional kernel weights to obtain the calibrated convolutional kernel W_CALIB. W_CALIB = W_ORIGINAL + ΔW. Use the calibrated convolutional kernel W_CALIB to perform a second convolution on the encoded enhanced feature X_ENCODED to obtain the calibrated convolutional feature X_CONV_CALIB ∈ R (B×N_B×D_C) 。X_CONV_CALIB = Conv1D(X_ENCODED, kernel = W_CALIB). Fuse the time - domain Fourier feature X_FFT and the calibrated convolutional feature X_CONV_CALIB through a residual connection to obtain the residual fusion feature X_RES ∈ R (B ×N_B×D_R) 。X_RES = X_FFT + X_CONV_CALIB + bias.

[0082] Where C_M is the number of channels of the multi - scale feature; N_BANDS is the number of frequency bands; M* is the dimension of the feature after dimensionality reduction; X_BI is the bispectral feature; X_SPARSE_TIME is the representation after the inverse transformation of the sparse frequency - domain feature back to the time domain; X_POLY_TIME is the representation after the inverse transformation of the high - order spectral feature back to the time domain; M 1 ,M 2 ,...,M nis the block size parameter; F_SR is the number of frequency points after super-resolution reconstruction; D_C is the convolutional feature dimension; W_ORIGINAL is the original convolutional kernel; D_R is the residual fusion feature dimension; Concatenate is the concatenation function; dim is the dimension; Conv1D is the one-dimensional convolutional operation; kernel_size is the convolutional kernel size; dilation is the dilation rate; AdaptiveBandDivision is the adaptive frequency band division function; num_bands is the number of frequency bands; FFT is the fast Fourier transform; mask_i is the mask; CreateFrequencyMask is the function to create the frequency mask; GenerateSparseProjection is the function to generate the sparse projection matrix; MatrixMultiply is the matrix multiplication operation; Bispectrum is the bispectrum analysis; Polyspectrum is the polyspectrum analysis; IFFT is the inverse fast Fourier transform; FeatureFusion is the feature fusion function; BlockPartition is the block segmentation function; pos is the position index; i is the loop variable index; freq is the frequency index; LearableEmbedding is the learnable embedding function; modal_ids are the modal identifiers; CombinePositionalEncodings is the function to combine the positional encodings; NoiseEstimator is the noise estimator; patient_history is the patient history data; sensor_status is the sensor status; AdaptiveFilter is the adaptive filter; SpectralSuperResolution is the spectral super-resolution reconstruction function; upscale_factor is the upscaling factor; FrequencyTruncation is the frequency truncation operation; adaptive_threshold is the adaptive threshold; padding is the padding; CalibrationNetwork is the calibration network; R_PHASE is the patient recovery phase identifier; bias is the bias.

[0083] In this embodiment, features are extracted at different scales through convolutional operations to obtain multi-scale features; applying frequency band masking helps to highlight important information in the frequency domain. This embodiment extracts and enhances more representative features, denoises and evaluates the quality of the features, and finally improves the performance and accuracy of the model.

[0084] According to one aspect of the present application, step S3 is further as follows:

[0085] S31. Process the final enhanced features through the self-attention mechanism to obtain normalized attention features;

[0086] S32. Extract the feature subsets of different modalities to form a modality feature set; calculate the reliability weights and frequency-domain alignment parameters of each modality; perform frequency-domain alignment on each modality feature to obtain frequency-domain aligned features; estimate the relative reliability of different modalities in the frequency domain to generate a spectral error matrix; implement a spectral error correction attention mechanism to obtain cross-modal fusion features; calculate adaptive modality weights based on the patient's rehabilitation stage and progress; use the adaptive modality weights to weight the cross-modal fusion features to obtain the final fusion features.

[0087] According to one aspect of the present application, the steps of obtaining the normalized attention features by applying the self-attention mechanism include:

[0088] Convert the residual fusion features into query matrix, key matrix, and value matrix; calculate the self-attention scores, and apply a scaling factor and Softmax normalization to obtain the attention weight matrix;

[0089] Calculate the weighted sum based on the attention weight matrix and the value matrix to obtain the self-attention output; implement the multi-head attention mechanism to obtain the multi-head attention output;

[0090] Apply residual connection and layer normalization, add the residual fusion features and the multi-head attention output and then normalize to obtain the normalized attention features.

[0091] In this embodiment, the self-attention mechanism is applied to process the final enhanced features. Specifically, it includes: converting the final enhanced features into three representations of query, key, and value to obtain the query matrix, key matrix, and value matrix; calculating the self-attention scores, and applying a scaling factor (the square root of the key dimension) and Softmax normalization to obtain the attention weight matrix; calculating the weighted sum based on the attention weight matrix and the value matrix to obtain the self-attention output; implementing an 8-head multi-head attention mechanism, splitting the input into multiple heads, calculating the attention respectively and then merging to obtain the multi-head attention output; applying residual connection and layer normalization, adding the final enhanced features and the multi-head attention output and then normalizing to obtain the normalized attention features.

[0092] According to one aspect of the present application, the steps of performing frequency-domain alignment fusion processing to obtain the final fusion features include: applying cross-modal frequency-domain alignment and fusion processing to the normalized attention features to obtain the final fusion features, specifically:

[0093] Extract the feature subsets of each modality in the normalized attention features to form a modality feature set; calculate the reliability weights of each modality at the patient's current rehabilitation stage;

[0094] Select the most reliable modality as a reference based on the reliability weights and calculate the frequency-domain alignment parameters;

[0095] Perform a frequency-domain transformation on each modal feature in the modal feature set, apply frequency-domain alignment parameters for alignment, and then transform back to the time domain to obtain frequency-domain aligned features;

[0096] Estimate the relative reliability of different modalities in the frequency domain and generate a spectral error matrix;

[0097] Based on the spectral error matrix, use the residual fusion feature as the query, the frequency-domain aligned feature as the key and value, implement spectral error correction attention, and calculate the spectral error correction attention score; Combine the spectral error correction attention score with the frequency-domain aligned feature to calculate the weighted sum to obtain the cross-modal fusion feature;

[0098] Based on the pre-stored patient rehabilitation stage and progress, calculate the adaptive modal weight; Use the adaptive modal weight to weight the cross-modal fusion feature to obtain the final fusion feature.

[0099] In an embodiment of the present application, convert the residual fusion feature X_RES into three representations of query, key, and value to obtain the query matrix Q ∈ R (B×N_B×D_K) 、the key matrix K ∈ R (B×N_B×D_K) and the value matrix V ∈ R (B ×N_B×D_V) . Q = LinearProjection(X_RES, D_K); K = LinearProjection(X_RES, D_K); V = LinearProjection(X_RES, D_V). Calculate the self-attention score, and apply scaling and Softmax normalization to obtain the attention weight matrix A ∈ R (B×N_B×N_B) . A = Softmax(MatrixMultiply(Q, Transpose(K)) / sqrt(D_K)). Calculate the weighted sum based on the attention weight matrix A and the value matrix V to obtain the self-attention output X_SELF ∈ R (B×N_B×D_V) . X_SELF = MatrixMultiply(A, V). Implement the multi-head attention mechanism, divide the input into h heads, calculate the attention separately and then merge to obtain the multi-head attention output X_MULTI_HEAD ∈ R (B×N_B×D_V) . X_MULTI_HEAD = MultiHeadAttention(X_RES, num_heads = 8). Apply residual connection and layer normalization to obtain the normalized attention feature X_NORM ∈ R (B×N_B×D_V) . X_NORM = LayerNorm(X_RES + X_MULTI_HEAD).

[0100] Extract the feature subset of each modality to form the modal feature set {X_MOD_i} ∈ R(B×N_B×D_M_i) , where \(i\in[1,M]\) and \(M\) is the number of modalities. \(X\_MOD\_1 = ExtractModalFeatures(X\_NORM, modal\_idx = 1)\); \(X\_MOD\_2 = ExtractModalFeatures(X\_NORM, modal\_idx = 2)\); \(X\_MOD\_M= ExtractModalFeatures(X\_NORM, modal\_idx = M)\). Calculate the reliability weight \(W\_REL\in\mathbb{R}\) of each modality at the current rehabilitation stage of the patient M . \(W\_REL = ModalReliabilityEstimator(modal\_status, R\_PHASE)\). Select the most reliable modality as a reference and calculate the frequency domain alignment parameter \(F\_ALIGN\in\mathbb{R}\) (M×F) . \(ref\_modal = ArgMax(W\_REL)\); \(F\_ALIGN = CalculateAlignmentParameters(X\_MOD, ref\_modal)\). Perform frequency domain alignment on each modal feature to obtain the frequency domain aligned feature \(X\_ALIGNED\in\mathbb{R}\) (B×N_B×D_M×M) . for \(i\) in range(\(M\)): \(X\_FREQ\_i = FFT(X\_MOD\_i, dim = 1)\); \(X\_ALIGNED\_FREQ\_i = FrequencyAlign(X\_FREQ\_i, F\_ALIGN[i])\); \(X\_ALIGNED[:, :, :, i] = IFFT(X\_ALIGNED\_FREQ\_i, dim = 1)\). Estimate the relative reliability of different modalities in the frequency domain and generate the spectral error matrix \(E\in\mathbb{R}\) (M×M×F) . \(E = SpectralErrorEstimator(X\_ALIGNED, W\_REL)\). Use the residual fusion feature \(X\_RES\) as the query, and the frequency domain aligned feature \(X\_ALIGNED\) as the key and value to implement spectral error correction attention: First, calculate the spectral error correction attention score \(A\_CORR\in\mathbb{R}\) (B×N_B×M) . \(Q\_cross = LinearProjection(X\_RES, D\_K)\); \(K\_cross= LinearProjection(X\_ALIGNED, D\_K)\); \(A\_CORR= Softmax(MatrixMultiply(Q\_cross, Transpose(K\_cross)) / sqrt(D\_K)+ SpectralErrorCorrection(E))\). Calculate the weighted sum based on the spectral error correction attention score \(A\_CORR\) and the frequency domain aligned feature \(X\_ALIGNED\) to obtain the cross-modal fusion feature \(X\_CROSS\in\mathbb{R}\)(B ×N_B×D_C) V_cross = LinearProjection(X_ALIGNED, D_V); X_CROSS = MatrixMultiply(A_CORR, V_cross). Calculate the adaptive modality weight W_MODAL ∈ R based on the patient's rehabilitation stage and progress M W_MODAL = ModalWeightNetwork(X_CROSS, R_PHASE, patient_progress). Weight the cross-modal fusion feature X_CROSS using the adaptive modality weight W_MODAL to obtain the final fusion feature X_FUSED ∈ R (B×N_B×D_F) X_FUSED = WeightedFusion(X_CROSS, W_MODAL).

[0101] where D_K is the key / query dimension; D_V is the value dimension; X_MOD_i is the feature subset of the i-th modality; D_M_i is the feature dimension of the i-th modality; X_ALIGNED_FREQ_i is the aligned frequency-domain feature of the i-th modality; Q_cross is the cross-modal query matrix; K_cross is the cross-modal key matrix; V_cross is the cross-modal value matrix; D_C is the cross-modal feature dimension; D_F is the fusion feature dimension; LinearProjection is the linear projection; Transpose is the transpose operation; MultiHeadAttention is the multi-head attention mechanism; num_heads is the number of attention heads; LayerNorm is the layer normalization; ExtractModalFeatures is the function to extract modal features; modal_idx is the modal index; ModalReliabilityEstimator is the modal reliability estimator; modal_status is the modal status information; ref_modal is the reference modality; ArgMax is the function to return the index of the maximum value; CalculateAlignmentParameters is the function to calculate the alignment parameters; for i in range is the loop statement to iterate over each element in the range; X_FREQ_i is the representation of the modal feature in the frequency domain; FrequencyAlign is the frequency-domain alignment; SpectralErrorEstimator is the spectral error estimator; SpectralErrorCorrection is the spectral error correction; ModalWeightNetwork is the modal weight network; patient_progress is the patient's rehabilitation progress information; WeightedFusion is the weighted fusion.

[0102] In this embodiment, the final enhanced features are processed by the self-attention mechanism, which can capture the dependencies and interactions within the features, resulting in more representative normalized attention features. Extracting feature subsets of different modalities to form a modality feature set can ensure that the features of each modality can be processed and utilized individually, avoiding information loss. This embodiment realizes the efficient fusion and enhancement of multi-modal data, which can improve the representativeness, robustness, and self-adaptability of the features, thereby enhancing the performance and accuracy of the model in different application scenarios.

[0103] According to one aspect of the present application, step S4 is further as follows:

[0104] S41. Decompose the final fused features into high-frequency and low-frequency parts to obtain high-frequency features and low-frequency features; apply a frequency-domain gated recurrent unit to the high-frequency features to capture short-term gait changes and obtain short-term memory features; apply a spectral transformer to the low-frequency features to capture long-term rehabilitation trends and obtain long-term memory features; calculate the fusion weights based on the patient's rehabilitation stage and real-time gait assessment, and fuse the short-term memory features and long-term memory features to obtain multi-scale fused features;

[0105] S42. Apply a temporal convolutional network and an attention mechanism to the multi-scale fused features, combine historical rehabilitation data, and model local and global temporal dependencies to finally obtain spatio-temporal fused features.

[0106] According to one aspect of the present application, the steps of performing frequency-domain decomposition and multi-scale memory filtering to obtain spatio-temporal fused features include: performing multi-scale frequency-domain memory filtering processing on the final fused features to obtain spatio-temporal fused features, specifically:

[0107] Convert the final fused features to the frequency domain through Fourier transform, decompose them into high-frequency frequency-domain representations and low-frequency frequency-domain representations, and apply inverse Fourier transform back to the time domain respectively to obtain high-frequency features and low-frequency features;

[0108] Apply a frequency-domain gated recurrent unit to the high-frequency features with a hidden layer dimension of D_S to capture short-term gait changes and obtain short-term memory features;

[0109] Apply a spectral transformer to the low-frequency features and process them according to the pre-stored patient rehabilitation progress parameters to capture long-term rehabilitation trends and obtain long-term memory features;

[0110] Calculate the fusion weights of the short-term and long-term features based on the pre-stored patient rehabilitation stage and real-time gait assessment;

[0111] Use the fusion weights to perform weighted fusion of the short-term memory features and long-term memory features to obtain multi-scale fused features; combine it with the patient state vector to capture gait changes and rehabilitation trends to obtain spatio-temporal fused features.

[0112] According to one aspect of the present application, the steps of capturing gait changes and rehabilitation trends and obtaining spatio-temporal fusion features include: modeling short-term and long-term dependencies of multi-scale fusion features to obtain spatio-temporal fusion features, specifically:

[0113] Applying a 5-layer temporal convolutional network with a convolutional kernel size of 3 to the multi-scale fusion features to model local temporal dependencies and obtain local temporal features;

[0114] Extracting long-term gait data from pre-stored (the last 10 times) historical rehabilitation training records; applying a long short-term memory network with a hidden layer dimension of D_T to the long-term gait data to capture long-term rehabilitation trends and obtain long-term trend features;

[0115] Constructing a memory-enhanced attention mechanism to associate the local temporal features with the long-term trend features to obtain memory-enhanced features;

[0116] Applying a gating mechanism to generate a gating value by training a gating network, and adaptively fusing the multi-scale fusion features and the memory-enhanced features to obtain spatio-temporal fusion features.

[0117] In an embodiment of the present application, the final fusion feature X_FUSED is decomposed into high-frequency and low-frequency parts to obtain a high-frequency feature X_HIGH ∈ R (B×N_B×D_H) and a low-frequency feature X_LOW ∈ R (B×N_B×D_L) . X_FREQ_FUSED = FFT(X_FUSED, dim = 1); X_HIGH_FREQ = HighPassFilter(X_FREQ_FUSED, cutoff = high_cutoff); X_LOW_FREQ = LowPassFilter(X_FREQ_FUSED, cutoff = low_cutoff); X_HIGH = IFFT(X_HIGH_FREQ, dim = 1); X_LOW = IFFT(X_LOW_FREQ, dim = 1). Applying a frequency-domain gated recurrent unit (Fourier GRU) to the high-frequency feature X_HIGH to capture short-term gait changes and obtain a short-term memory feature M_SHORT ∈ R (B×N_B×D_S) . M_SHORT = FourierGRU(X_HIGH, hidden_dim = D_S); applying a spectral transformer to the low-frequency feature X_LOW to capture long-term rehabilitation trends and obtain a long-term memory feature M_LONG ∈ R( B×N_B×D_L)。M_LONG = SpectralTransformer(X_LOW, patient_progress). Based on the patient's rehabilitation stage and real-time gait assessment, calculate the fusion weight α of short-term and long-term features t , obtaining the time-scale weight α ∈ R. α = AdaptiveWeightCalculator(R_PHASE, real_time_gait_assessment). Use the time-scale weight α to fuse the short-term memory feature M_SHORT and the long-term memory feature M_LONG to obtain the multi-scale fusion feature Y_FUSED ∈ R (B ×N_B×D_F) 。Y_FUSED = α * M_SHORT + (1 - α) * M_LONG.

[0118] Apply a temporal convolutional network (TCN) to the multi-scale fusion feature Y_FUSED to model local temporal dependencies and obtain the local temporal feature Y_LOCAL ∈ R (B×N_B×D_L) 。Y_LOCAL = TemporalConvNet(Y_FUSED, num_layers = 5, kernel_size = 3). Extract the long-term gait record G_HISTORY ∈ R (H×D_G) , where H is the historical time step and D_G is the gait feature dimension. G_HISTORY = RetrieveGaitHistory(patient_id, last_sessions = 10). Apply a long short-term memory network (LSTM) to the long-term gait record G_HISTORY to capture the long-term rehabilitation trend and obtain the long-term trend feature Y_TREND ∈ R (B×D_T) 。Y_TREND = LSTM(G_HISTORY, hidden_dim = D_T). Design a memory-enhanced attention mechanism to associate the local temporal feature Y_LOCAL with the long-term trend feature Y_TREND to obtain the memory-enhanced feature Y_MEM ∈ R (B×N_B×D_M) 。Y_MEM = MemoryEnhancedAttention(Y_LOCAL, Y_TREND). Apply a gating mechanism to adaptively fuse the current feature and the historical feature to obtain the spatio-temporal fusion feature Y_ST ∈ R (B×N_B×D_ST) 。gate = Sigmoid(GateNetwork(Y_FUSED, Y_MEM)). Y_ST = gate * Y_FUSED + (1 - gate) * Y_MEM.

[0119] Among them, D_H is the high-frequency feature dimension; D_L is the low-frequency feature dimension; X_FREQ_FUSED is the frequency-domain representation of the fused feature; X_HIGH_FREQ is the frequency-domain representation of the high-frequency part; X_LOW_FREQ is the frequency-domain representation of the low-frequency part; high_cutoff is the cut-off frequency of the high-pass filter; low_cutoff is the cut-off frequency of the low-pass filter; D_S is the short-term feature dimension; H is the historical time step; D_G is the gait feature dimension; D_T is the trend feature dimension; D_M is the memory feature dimension; gate is the gating value; D_ST is the spatio-temporal feature dimension; HighPassFilter is the high-pass filter; LowPassFilter is the low-pass filter; FourierGRU is the frequency-domain gated recurrent unit; hidden_dim is the hidden layer dimension; SpectralTransformer is the spectral transformer; AdaptiveWeightCalculator is the adaptive weight calculator; real_time_gait_assessment is the real-time gait assessment; TemporalConvNet is the temporal convolutional network; num_layers is the number of layers; RetrieveGaitHistory is to extract gait history data; patient_id is the patient identifier; last_sessions is the recent several sessions; MemoryEnhancedAttention is the memory-enhanced attention mechanism; GateNetwork is the gating network.

[0120] In this embodiment, by decomposing the final fused feature into high-frequency and low-frequency parts, the gait change information in the short term and long term can be captured respectively, thereby improving the representativeness and diversity of the features. This embodiment realizes the multi-scale fusion and enhancement of multi-modal features, can capture the gait change information in the short term and long term during the patient's rehabilitation process, and comprehensively evaluate in combination with historical data, improving the accuracy and robustness of the rehabilitation state assessment.

[0121] According to one aspect of the present application, step S5 is further as follows:

[0122] S51. Perform rehabilitation stage assessment and adaptation based on the spatio-temporal fusion feature. Specifically, it includes: evaluating the current patient's rehabilitation progress based on the spatio-temporal fusion feature and historical rehabilitation data, and updating the rehabilitation progress score; calculating the rehabilitation stage adaptation parameter according to the rehabilitation progress score and the doctor's preset goal; based on the rehabilitation stage adaptation parameter, adjusting the parameter sensitivity of each layer of the model to achieve rehabilitation stage self-adaptation and obtain the adaptive model parameter.

[0123] S52. Generate a personalized gait correction strategy according to the evaluation results. Specifically, it includes: extracting the differences between the current gait and the standard gait pattern, and calculating the gait deviation vector; generating a correction intensity coefficient according to the gait deviation vector, the rehabilitation progress score, and the patient's tolerance; generating a gait correction vector based on the gait deviation vector and the correction intensity coefficient; optimizing the gait correction vector based on the historical correction effect and the patient's feedback to obtain an optimized correction vector; generating a correction timing curve for the future time steps (100 future time steps) according to the current gait state and the rehabilitation goal, and planning a smooth correction process.

[0124] S53. Convert the correction timing curve into robot control instructions, adjust the assistance force according to the patient's state, and apply safety constraints, and finally output a smooth and safe control sequence and user feedback data.

[0125] According to one aspect of the present application, the steps of outputting a smooth and safe control sequence include:

[0126] Convert the correction timing curve into robot joint angle instructions according to the robot kinematic parameters to obtain a joint control sequence;

[0127] Calculate the assistance force parameters according to the filtered EMG data, the patient's rehabilitation stage, and the muscle state, and assign appropriate assistance forces to each joint;

[0128] Apply the assistance force parameters to the joint control sequence to obtain a force adjustment control sequence;

[0129] Apply safety constraints such as joint limits, maximum speed, and maximum acceleration to optimize the force adjustment control sequence to obtain a smooth and safe control sequence;

[0130] Generate real-time feedback information based on the rehabilitation progress score, the optimized correction vector, and the rehabilitation goal to form user feedback data;

[0131] Combine the smooth and safe control sequence and the user feedback data into a final output instruction, and transmit it to the robot execution system and the user interface, and update the patient record.

[0132] In an embodiment of the present application, based on the spatio-temporal fusion feature Y_ST and the historical rehabilitation data, evaluate the current patient's rehabilitation progress, and update the rehabilitation progress score R_SCORE∈R. R_SCORE = RehabProgressEstimator(Y_ST, G_HISTORY). Calculate the rehabilitation stage adaptation parameter R_ADAPT∈R according to the rehabilitation progress score R_SCORE and the doctor's preset goal D_A, D_A is the dimension of the adaptation parameter. R_ADAPT = AdaptationParameterGenerator(R_SCORE, doctor_preset_goals). Based on the rehabilitation stage adaptation parameter R_ADAPT, the parameter sensitivity of each layer of the model is adjusted to achieve self-adaptation in the rehabilitation stage, and the adaptive model parameter θ_ADAPT is obtained. θ_ADAPT = ModelParameterAdaptation(θ_ORIGINAL, R_ADAPT).

[0133] Extract the difference between the current gait and the standard gait pattern, and calculate the gait deviation vector G_DEV_CURRENT ∈ R K . G_DEV_CURRENT = GaitDeviationCalculator(Y_ST, standard_gait_pattern). According to the gait deviation vector G_DEV_CURRENT, the rehabilitation progress score R_SCORE, and the patient tolerance, generate the correction intensity coefficient C_INTENSITY ∈ R. C_INTENSITY = CorrectionIntensityCalculator(G_DEV_CURRENT, R_SCORE, patient_tolerance). Based on the gait deviation vector G_DEV_CURRENT and the correction intensity coefficient C_INTENSITY, generate the gait correction vector C_GAIT ∈ R J , J is the number of joints. C_GAIT = GaitCorrectionVectorGenerator(G_DEV_CURRENT, C_INTENSITY). Based on the historical correction effect and patient feedback, optimize the gait correction vector C_GAIT to obtain the optimized correction vector C_OPT ∈ R J . C_OPT = OptimizeCorrectionVector(C_GAIT, correction_history, patient_feedback). According to the current gait state and rehabilitation goals, generate the correction timing curve C_CURVE ∈ R( J×T_F) , T_F is the future time step, and plan a smooth correction process. C_CURVE = GenerateCorrectionTrajectory(C_OPT, current_gait_state, rehab_goals, T_F = 100).

[0134] Convert the correction timing curve C_CURVE into a robot joint angle command to obtain the joint control sequence J_CTRL ∈ R (J×T_F)。J_CTRL = CurveToJointCommand(C_CURVE, robot_kinematics). Calculate the assistance force parameter A_FORCE ∈ R according to the patient's muscle state and rehabilitation stage J and assign appropriate assistance force to each joint. A_FORCE = AssistanceForceCalculator(D_EMG_AS, R_PHASE, patient_muscle_condition). Apply the assistance force parameter A_FORCE to the joint control sequence J_CTRL to obtain the force-adjusted control sequence J_CTRL_ADJ ∈ R (J×T_F) 。J_CTRL_ADJ = ApplyAssistanceForce(J_CTRL, A_FORCE). Apply smoothing constraints and safety limits to optimize the force-adjusted control sequence J_CTRL_ADJ to obtain the smooth and safe control sequence J_CTRL_SAFE ∈ R (J×T_F) 。J_CTRL_SAFE = ApplySafetyConstraints(J_CTRL_ADJ, joint_limits, max_velocity, max_acceleration). Generate real-time feedback information, including the current rehabilitation progress, correction direction, and target tips, to form the user feedback data U_FEEDBACK. U_FEEDBACK = GenerateUserFeedback(R_SCORE, C_OPT, rehab_goals). Combine the smooth and safe control sequence J_CTRL_SAFE and the user feedback data U_FEEDBACK into the final output instruction and pass it to the robot execution system and the user interface.

[0135] final_output = {

[0136] "control_commands": J_CTRL_SAFE,

[0137] "user_feedback": U_FEEDBACK,

[0138] "rehabilitation_progress": R_SCORE,

[0139] "next_assessment_time": CalculateNextAssessment(R_SCORE);

[0140] }

[0141] SendToRobotSystem(final_output["control_commands"]);

[0142] SendToUserInterface(final_output["user_feedback"]);

[0143] UpdatePatientRecord(patient_id, final_output).

[0144] Where D_A is the adaptation parameter dimension; θ_ORIGINAL is the original model parameter; T_F is the future time step; joint_limits are the joint limit parameters; max_velocity is the maximum velocity limit; max_acceleration is the maximum acceleration limit; RehabProgressEstimator is the rehabilitation progress estimator; AdaptationParameterGenerator is the adaptation parameter generator; doctor_preset_goals are the doctor's preset goals; ModelParameterAdaptation is the model parameter adaptive adjustment; GaitDeviationCalculator is the gait deviation calculator; standard_gait_pattern is the standard gait pattern; CorrectionIntensityCalculator is the correction intensity calculator; patient_tolerance is the patient's tolerance; GaitCorrectionVectorGenerator is the gait correction vector generator; OptimizeCorrectionVector is the correction vector optimizer; correction_history is the correction history record; patient_feedback is the patient's feedback; GenerateCorrectionTrajectory is the correction trajectory generator; current_gait_state is the current gait state; rehab_goals are the rehabilitation goals; CurveToJointCommand is the trajectory to joint command converter; robot_kinematics is the robot kinematics; AssistanceForceCalculator is the assistance force calculator; patient_muscle_condition is the patient's muscle condition; ApplyAssistanceForce is to apply the assistance force; ApplySafetyConstraints is to apply the safety constraints; GenerateUserFeedback is to generate the user feedback.

[0145] In this embodiment, the rehabilitation progress of the current patient is evaluated based on spatio-temporal fusion features and historical rehabilitation data, and the rehabilitation progress score is updated, so that the rehabilitation situation of the patient can be grasped in real time, ensuring the accuracy and effectiveness of the rehabilitation plan. Through precise evaluation and dynamic adjustment, a personalized gait correction strategy is realized, and the safety and smoothness of the correction process are ensured, thereby improving the effectiveness of the rehabilitation process and the patient's rehabilitation experience.

[0146] According to one aspect of the present application, the gait data of rehabilitation patients is often very sparse and highly personalized. Although the multi-scale convolution in the existing solutions can capture features of different scales, its modeling ability for sparse and irregular gait data is limited. Therefore, a frequency-domain adaptive sparse representation module (FASR) is added, and this module works through the following steps: Adaptive frequency band division: According to the gait characteristics of different patients, the frequency-domain division is dynamically adjusted instead of using a fixed frequency band division: F_bands = AdaptiveBandDivision(X, patient_history, num_bands); Sparse Fourier projection: For each frequency band, the time-domain signal is projected into a specific frequency-domain space using a sparse projection matrix: X_sparse(i) = Ψ(i)·FFT(X)·mask(F_bands(i)), where Ψ(i) is an adaptively generated sparse projection matrix related to the patient's historical data; Second-order spectral feature extraction: In addition to the first-order spectral features, second-order spectral features are additionally extracted to capture the non-linear dynamic changes in the gait data: X_2nd_order = Bispectrum(X) + Polyspectrum(X). This embodiment can effectively handle the sparsity and individual differences of the patient's gait data and enhance the ability to identify abnormal gait patterns.

[0147] According to one aspect of the present application, the cross-attention mechanism in the existing solutions only considers single-modal information fusion, while in actual rehabilitation, multiple types of sensor data (electromyogram, pressure, vision, etc.) are involved, and cross-modal information fusion has not been effectively solved. Therefore, a multi-modal frequency-domain alignment and fusion network (MFAF) is added, and this module works through the following steps: Frequency-domain alignment layer: To solve the problem of inconsistent sampling rates and frequency characteristics of different-modal data, a frequency-domain alignment layer is designed: X_aligned(i) = FreqAlign(X_modal(i), ref_sampling_rate, modal_weights); Spectral error-correction attention mechanism: For the different degrees of noise and errors in different sensor data, a spectral error-correction attention is designed: A_corr = softmax(K · Q T / sqrt(d) + SpectralError(K, Q, E)), where the SpectralError function estimates the relative reliability of different modalities in the frequency domain; Adaptive modal weight learning: W_modal = ModalWeightNet(X_fused, rehabilitation_phase, patient_progress), where ModalWeightNet is the modal weight network. This embodiment improves the quality of cross-modal gait data fusion and can maintain good performance especially when the quality of some sensor data is poor.

[0148] According to one aspect of the present application, there are short-term (single-step) and long-term (the entire rehabilitation cycle) dependencies in the gait pattern during the rehabilitation process, and it is difficult for the time series aggregation of existing solutions to capture the dependencies at these two scales simultaneously. Thus, a multi-scale frequency domain memory filtering network (MFMF) is added. This module works through the following steps: Frequency domain short-term memory unit: For the rapid changes within a single gait cycle: M_short = FourierGRU(X_t, F_low, F_high), where FourierGRU focuses on modeling the high-frequency features within the gait cycle; Frequency domain long-term memory unit: For the slow progress during the rehabilitation process: M_long = SpectralTransformer(X_t-k:t, patient_progress), where SpectralTransformer focuses on the low-frequency trends in gait evolution; Adaptive time scale fusion: Y_fused = αt · M_short + (1 - αt) · M_long, where αt is a weight parameter dynamically adjusted based on the rehabilitation phase and the patient's recovery progress. This embodiment can capture both the short-term changes and long-term trends in gait data and provide more personalized and phased rehabilitation guidance for patients.

[0149] According to one aspect of the present application, the Fourier neural operator in the existing solution is sensitive to high-frequency noise, especially in the case of patient muscle tremors or sensor drift. Thus, a spectral domain self-calibration noise suppression network (SACNS) is added and works through the following steps: Adaptive noise feature learning: N_profile = NoiseEstimator(X_hist, sensor_type, movement_phase); Perform spectral super-resolution reconstruction: X_clean = SpectralSR(X_noisy, N_profile, upscale_factor); Fourier kernel self-calibration: W_calibrated = W_original + ΔW(N_profile, rehabilitation_stage). This embodiment improves the robustness of the system in a noisy environment, especially in the case of irregular muscle tremors of the patient or unstable sensor data.

[0150] Where F_bands is the frequency band division; X is the original gait data; X_sparse(i) is the sparse Fourier projection feature of the i-th frequency band; mask is the mask; X_2nd_order is the second-order spectral feature; X_aligned(i) is the frequency-domain alignment feature of the i-th modality; FreqAlign is the frequency-domain alignment function; X_modal(i) is the data of the i-th modality; ref_sampling_rate is the reference sampling rate; modal_weights are the modal weights used to adjust the importance of different modalities; W_modal is the modal weight indicating the weight of different modalities in the fusion process; rehabilitation_phase is the rehabilitation stage; M_short is the short-term memory feature; X_t is the gait data at time t; F_low is the low-frequency band; F_high is the high-frequency band; M_long is the long-term memory feature; X_t-k is the gait data at time t-k; Y_fused is the fused multi-scale feature; N_profile is the noise feature profile; X_hist is the historical gait data; sensor_type is the sensor type; movement_phase is the movement stage; X_clean is the gait data after noise suppression; SpectralSR is the spectral super-resolution reconstruction function; X_noisy is the noisy gait data; upscale_factor is the super-resolution magnification factor; W_calibrated is the calibrated Fourier kernel weight; W_original is the original Fourier kernel weight; ΔW is the Fourier kernel self-calibration parameter based on the noise feature profile; rehabilitation_stage is the rehabilitation stage.

[0151] In another embodiment of the present application, an optimization method for modeling time-series data of a gait rehabilitation embodied robot based on frequency-domain learning includes the following steps:

[0152] S1. Multi-modal gait data collection and preprocessing: Collect raw gait data from multiple sensors, perform noise reduction, normalization, and time alignment, and output the preprocessed gait data;

[0153] S2. Adaptive frequency-domain feature extraction and enhancement: Perform adaptive frequency-domain transformation on the preprocessed data to achieve selective enhancement of frequency-domain features, and extract and retain key frequency-domain features;

[0154] S3. Hierarchical frequency-domain representation learning: Perform multi-level representation learning on the frequency-domain features to construct temporal correlation and gait pattern features, and form a personalized gait feature representation of the patient.

[0155] S4. Generation of dynamic frequency-domain feedback control strategy: Generate real-time control instructions based on the frequency-domain representation, perform rehabilitation progress evaluation and adaptive adjustment, and provide an output of a personalized rehabilitation training strategy.

[0156] According to one aspect of the present application, step S1 is further as follows:

[0157] S11. Multi-modal sensing data collection and synchronization. Collect raw sensor data, including inertial measurement unit (IMU) data, ground reaction force (GRF) data, electromyogram (EMG) data, and visual capture data; Use the timestamp protocol to synchronize multi-sensor data to obtain time-aligned raw multi-modal data; Construct a spatial topology relationship matrix T based on the sensor position and the patient's anatomical structure to describe the physical connection relationship between different sensing points.

[0158] S12. Adaptive noise feature modeling and denoising. Analyze the time-aligned raw multi-modal data to establish a sensor noise feature model N(s, t), where s represents the sensor type and t represents the time point. Use the dynamic spectrum confidence weighting (DSCW) filtering technique to remove noise, which dynamically evaluates the reliability of different frequency components. DSCW filtering calculation formula: X_clean = X_noisy Θ W_conf, where X_noisy is the noisy data, W_conf is the spectrum confidence weight matrix, and Θ represents element-wise multiplication. W_conf calculation formula: W_conf(f) = 1 - (|P_noise(f)| / |P_signal(f)|) α , P_noise is the estimated noise power spectrum, P_signal is the signal power spectrum, and α is an adaptive adjustment parameter. Output the denoised multi-modal data X_clean.

[0159] S13. Frequency-domain perception normalization and standardization. Perform spectral analysis on the denoised multi-modal data X_clean to obtain the spectral representation X_freq. Design a frequency-band adaptive normalization (FAN) method that adopts different normalization strategies for different frequency bands. FAN method formula: X_norm(f) = (X_freq(f) - μ(f)) / (σ(f) · S(f)), where μ(f) and σ(f) are the mean and standard deviation of frequency band f respectively, and S(f) is the frequency-band importance weight. Calculation method of S(f): S(f) = exp(-|f - f_key| / λ), f_key is the set of key frequency points, and λ is the smoothing parameter. Output the frequency-domain normalized data X_norm and the frequency-domain statistical features F_stat.

[0160] S14. Gait cycle segmentation and alignment. Based on the periodic features in the frequency-domain normalized data X_norm, perform gait cycle detection. The frequency-domain stable point detection (FSDP) algorithm identifies the stable points of the gait cycle by analyzing the time-varying characteristics of the spectrum. FSDP algorithm steps: Calculate the short-time Fourier transform: STFT(X_norm) = ∑ X_norm(t) · w(t - τ)·e (-j2πft) , where w is the window function. Extract the spectral stability index: S_index(t) = 1 - ||STFT(t) - STFT(t - Δt)||_F / ||STFT(t)||_F. Detect stable points: When S_index(t) is greater than the threshold θ and is a local maximum, mark it as the gait cycle boundary point; perform time standardization on the detected gait cycles to obtain the gait cycle standardized data X_gait and the gait cycle characteristic parameters G_param.

[0161] According to one aspect of the present application, step S2 is further as follows:

[0162] S21. Multi-resolution frequency-domain decomposition. Input the gait cycle standardized data X_gait into the multi-resolution frequency-domain decomposition module. Construct an adaptive spectral wavelet transform (ASWT) method that combines the advantages of wavelet transform and short-time Fourier transform. ASWT formula: C(a, b) = ∫ X_gait(t) · ψ_{a, b}(t)dt, where ψ_{a, b}(t) is the wavelet basis function with adaptive frequency modulation. Construct the adaptive wavelet basis function: ψ_{a, b}(t) = a (-1 / 2) ·ψ((t - b) / a)·e (j2πf_adapt(t)t), where f_adapt is an adaptive frequency function. The calculation of f_adapt is: f_adapt(t) = f_base + Δf · R(X_gait, t, G_param), where R is a modulation function based on gait characteristics. Output the multi-resolution frequency domain representation M_freq and the frequency domain energy distribution map E_map.

[0163] S22. Nonlinear frequency domain feature enhancement. Perform nonlinear feature enhancement on the multi-resolution frequency domain representation M_freq. Construct a Dynamic Spectrum Morphology Operation (DSMO) method to adaptively adjust the morphology operation parameters according to the signal characteristics. The DSMO method includes: Spectrum dilation operation: D(f) = max{M_freq(f - k) + SE(k), for all k ∈ K}; Spectrum erosion operation: E(f) = min{M_freq(f + k) - SE(k), for all k ∈ K}; Adaptive structure element: SE(k) = α· exp(-β · |k|) · (1 + γ · sin(πk / K)), where the parameters α, β, and γ are dynamically adjusted based on the frequency domain statistical feature F_stat and the frequency domain energy distribution map E_map, and output the enhanced frequency domain feature E_freq.

[0164] S23. Selective filtering of frequency domain features. Analyze the enhanced frequency domain feature E_freq, and design a Frequency domain Information Gain Estimation (FIGE) method to evaluate the information contribution of different frequency bands; The FIGE calculation formula: IG(f) = H(Y) - H(Y|f), where H(Y) is the entropy of the gait pattern, and H(Y|f) is the conditional entropy of the known frequency band f; Construct an Adaptive Frequency domain Filter (AFE) based on the information gain: AFE(f) = sigmoid(λ · (IG(f) - θ_IG)), where λ is a hyperparameter used to control the influence of the information gain on the filter strength in the adaptive frequency domain filter, and θ_IG is a hyperparameter used for the information gain threshold in the adaptive frequency domain filter; Apply the filter to obtain the filtered frequency domain feature F_freq = E_freq Θ AFE; Output the selectively filtered frequency domain feature F_freq and the frequency domain importance weight W_freq.

[0165] S24. Frequency domain information compression and reconstruction. Compress the selectively filtered frequency domain feature F_freq to reduce the data dimension; Construct a Low-rank Spectral Tensor Decomposition (LSTD) method, which can retain the key correlations between frequency domain features; The steps of the LSTD method: Construct a high-order tensor: T = reshape(F_freq, [I_1, I_2,..., I_n]); Tucker decomposition: T ≈ G × 1 U 1 × 2 U2 ... × n U n , where G is the core tensor, U n is the factor matrix, and I_n is the size of the nth dimension; Adaptive rank selection: Determine the rank r of each dimension based on the frequency-domain importance weight W_freq n ; Output the compressed frequency-domain feature representation C_freq and the reconstruction mapping matrix R_map.

[0166] According to one aspect of the present application, step S3 is further as follows:

[0167] S31. Local frequency-domain pattern extraction. Perform local pattern analysis on the compressed frequency-domain feature representation C_freq; Construct a frequency-domain graph convolutional network (FGCN), and use the spatial topology relationship matrix T between sensors for feature extraction; FGCN operation formula: Z (l+1) = σ(D (-1 / 2) ·T·D (-1 / 2) ·Z (l) ·W (l) ), where D is the degree matrix, Z (l) is the feature of the lth layer, and W (l) is the weight; Introduce a frequency-domain graph attention mechanism (FGAM), and dynamically adjust the topological relationship according to the importance of different frequency-domain features; FGAM calculation: T_dyn = T Θ A_freq, where A_freq is the frequency-domain attention matrix, and the calculation formula is: A_freq = softmax(Q·K T / sqrt(d)); Q and K are respectively obtained from C_freq through different linear transformations; Output the local frequency-domain feature L_freq and the frequency-domain graph attention weight A_freq.

[0168] S32. Global temporal dependence modeling. Build a global temporal dependence relationship based on the local frequency-domain feature L_freq; Construct a frequency-domain memory transformer (FMT) network, which integrates the self-attention mechanism and the memory enhancement ability; Core components of FMT: Frequency-domain self-attention layer: Z_attn = softmax(Q·K T / sqrt(d))·V; Memory enhancement mechanism: M_new = α·M_old + (1-α)·Z_attn, where M is the external memory matrix; Frequency-domain specific feed-forward network: Z_out = FFN(Z_attn + β·M_new); The memory matrix M captures the patient's historical gait pattern, α and β are fusion parameters dynamically adjusted, and d is the dimension scaling factor in the self-attention mechanism; Output the global temporal feature G_freq and the memory state matrix M_state.

[0169] S33. Personalized gait feature fusion. Fuse the local frequency-domain feature L_freq and the global temporal feature G_freq; construct a Dynamic Feature Importance Network (DFIN) to learn the importance weights of different features; the calculation formula of DFIN: W_imp = σ(MLP([L_freq, G_freq, P_info])), where P_info is the patient's personal information and rehabilitation stage; the feature fusion formula: F_merged = W_imp[0]·L_freq + W_imp[1]·G_freq; output the fused personalized gait feature F_merged and the feature importance weight W_imp.

[0170] S34. Multi-level representation integration. Construct a multi-level representation based on the fused personalized gait feature F_merged; construct a Hierarchical Frequency-domain Contrastive Learning (HFCL) method to learn gait features at different abstraction levels; the HFCL loss function: L_HFCL = -log(exp(sim(z_i, z_j) / τ) / ∑exp(sim(z_i, z_k) / τ)); where z_i and z_j are positive sample pairs of gait features of the same patient at different times, z_k is the negative sample, sim is the cosine similarity, and τ is the temperature parameter; contrastive learning is performed at multiple abstraction levels, from the low-level frequency-domain features to the high-level semantic features; output the hierarchical gait representation H_rep and the mapping relationship M_rel between different levels.

[0171] According to one aspect of the present application, step S4 is further as follows:

[0172] S41. Conduct rehabilitation progress assessment. Assess the patient's rehabilitation progress based on the hierarchical gait representation H_rep; construct a Frequency-domain Rehabilitation Index Evaluation (FRIE) method to quantify the improvement degree of the patient's gait pattern; calculation of the core indicators of FRIE: Frequency-domain stability index: S_index = 1 - ||H_rep - H_ref||_F / ||H_ref||_F; Frequency-domain symmetry index: A_index = 1 - ||H_rep_left - H_rep_right||_F / (||H_rep_left||_F + ||H_rep_right||_F); Comprehensive rehabilitation progress score: P_score = w 1 ·S_index + w 2 ·A_index + w 3 ·D_index; where H_ref is the healthy gait reference representation, D_index is the dynamic adaptability index, and w is the weight coefficient; output the rehabilitation progress assessment result P_eval and the key improvement index K_metric.

[0173] S42. Adaptive control strategy generation. Generate an adaptive control strategy based on the rehabilitation progress evaluation result P_eval and the hierarchical gait representation H_rep; construct a frequency-domain reinforcement learning (FRL) framework to optimize the control strategy in the frequency-domain space; Core components of FRL: Frequency-domain state representation: S_freq = [H_rep, P_eval, E_env], where E_env is the environmental state; Frequency-domain action space: A_freq = {a_i | i = 1, 2,..., n}, representing the control intensities of different frequency components; Frequency-domain reward function: R_freq = w 1 ·ΔP_score + w 2 ·Smoothness - w 3 ·Energy; Update the control strategy using the frequency-domain policy gradient (FPG) algorithm: θ_new = θ_old + α·▽_θJ(θ); where J(θ) is the expected cumulative reward, α is the learning rate, θ_old is the original control strategy, θ_new is the updated control strategy, Smoothness is the smoothness metric, Energy is the energy consumption, and ▽_θ is the control strategy gradient; Output the adaptive control strategy C_strategy and the policy confidence score S_conf.

[0174] S43. Frequency-domain safety boundary constraint. Impose frequency-domain safety boundary constraints on the adaptive control strategy C_strategy; construct a frequency-domain control soft constraint (FSCC) mechanism to ensure that the control strategy is within the safe range; Core constraint formula of FSCC: Upper bound of frequency-domain control: C_upper(f) = C_ref(f) + Δ_max(f) · S_conf; Lower bound of frequency-domain control: C_lower(f) = C_ref(f) - Δ_min(f) · S_conf; Constraint optimization objective: C_opt = argmin_C ||C - C_strategy|| 2 s.t. C_lower ≤ C ≤ C_upper; where C_ref is the reference control strategy, and Δ_max and Δ_min are the maximum and minimum allowable deviations; Output the constrained control strategy C_opt and the safety boundary parameter B_safe.

[0175] S44. Real-time control instruction generation and feedback. Convert the constrained control strategy C_opt into real-time control instructions; construct a Frequency Inverse Transform Controller (FITC) to convert the frequency-domain control strategy into a time-domain control signal; FITC calculation process: Frequency sampling: Sample C_opt(f) at key frequency points; Spectrum reconstruction: X_spec(f) = C_opt(f) · exp(j·φ(f)), where φ(f) is the phase information; Inverse transform: x_control(t) = IFFT(X_spec(f)); Introduce a Frequency-domain Smooth Transition Mechanism (FSTM) to ensure the continuity and smoothness of the control signal; FSTM formula: x_smooth(t) = (1 - γ(t))·x_prev(t) + γ(t)·x_control(t), where γ(t) is the smooth transition function and x_prev(t) is the control signal before time t; Output the real-time control instruction CMD and the control feedback signal F_back.

[0176] This embodiment realizes the time-series data modeling and control optimization of a gait rehabilitation embodied robot based on frequency-domain learning, specifically: Frequency-domain Dynamic Spectrum Morphology Operation (DSMO): Enhance the recognition of frequency-domain features through adaptive spectrum dilation and erosion operations, effectively solving the limitations of traditional methods in processing non-stationary gait signals. Frequency-domain Graph Attention Mechanism (FGAM): Combine the graph convolutional network with frequency-domain features, and better capture the complex relationships between multi-modal sensor data by dynamically adjusting the weights of topological relationships. Frequency-domain Memory Transformer (FMT): Integrate the self-attention mechanism and the external memory matrix to achieve the memory of long-term gait patterns and the efficient extraction of short-term gait features, solving the difficulties of traditional time-series models in long-term and short-term dependence modeling. Frequency-domain Reinforcement Learning (FRL): Conduct reinforcement learning in the frequency domain, directly optimize the frequency-domain control strategy, avoid the problem of high-frequency noise sensitivity in time-domain control, and improve control accuracy and robustness.

[0177] This application can be used for the processing and diagnosis of medical images, especially for capturing multi-scale features in high-dimensional image data (such as three-dimensional CT scans, MRI scans, etc.). Specifically, it includes: Tumor detection: Automatically analyze abnormal regions in medical images to detect tumor or lesion areas. Tissue segmentation: Automatically segment different types of tissues (such as the liver, brain tissue, muscle, etc.) from CT or MRI images. Dynamic monitoring: Monitor the changes of organs or lesion areas over time, such as the dynamic changes of the heart, tumors, etc. It can also be applied to video analysis tasks, especially tasks that require capturing dynamic changes and temporal dependencies in time series data, such as surveillance video analysis, behavior recognition, etc. Specifically: Behavior recognition and prediction: Analyze the behaviors of people in videos, such as walking, running, making phone calls, eating, etc. Video summarization and event detection: Automatically extract important segments from long videos and mark key events (traffic accidents, critical moments in sports competitions). It can also enhance the perception and adaptive capabilities of smart home devices by sensing different states in the home environment, and is applicable to smart home and environmental perception, including scenarios such as home management and appliance control. Specifically: Intelligent temperature control and air quality monitoring: Real-time monitor environmental data such as temperature, humidity, and CO2 concentration in the home, and adjust the air conditioner or air purifier through an adaptive control system. Intelligent security and intrusion detection: Monitor home security through cameras or sensors in the home, and detect and give early warnings of whether there are intruders or abnormal situations. Home behavior analysis and health monitoring: Analyze the behaviors of family members (such as walking, eating, resting, etc.) and evaluate their health status.

[0178] The present invention discloses an optimized method for modeling time-series data of a gait rehabilitation embodied robot based on frequency-domain learning, including: acquiring multi-modal sensor data and performing preprocessing, calculating gait parameters and generating a patient state vector; applying multi-scale convolution and frequency-domain processing to obtain enhanced features; performing block processing and position encoding to obtain encoded enhanced features, and obtaining residual fusion features through noise suppression processing; applying a self-attention mechanism and frequency-domain alignment fusion processing to obtain final fusion features; performing frequency-domain decomposition and multi-scale memory filtering to obtain spatio-temporal fusion features; evaluating the rehabilitation progress and generating a gait correction vector and a corrected time-series curve, and outputting a smooth and safe control sequence. The present invention ensures data synchronization through preprocessing and alignment of multi-modal sensor data, calculates gait parameters and generates a patient state vector, improving the consistency and accuracy of the data. Through various filtering techniques such as band-pass filtering, median filtering, moving average filtering, envelope detection, and Kalman filtering, noise and data anomalies are effectively removed, ensuring the reliability of the data. The application of multi-scale convolution and frequency-domain processing enhances the feature extraction ability, and more robust residual fusion features are obtained through noise suppression processing. Through the self-attention mechanism and frequency-domain alignment fusion processing, the feature extraction and fusion effects are further improved, making the final fusion features have stronger representation ability. Through frequency-domain decomposition and multi-scale memory filtering, combined with the patient state vector, gait changes and rehabilitation trends are captured to generate spatio-temporal fusion features. This process enhances the system's sensitivity to gait changes and the ability to track rehabilitation trends. Based on the spatio-temporal fusion features and the patient state vector, the rehabilitation progress is evaluated, and a gait correction vector and a corrected time-series curve are generated, which not only provides an accurate evaluation of the rehabilitation progress, but also outputs a smooth and safe control sequence, ensuring the safety and effectiveness of the gait correction process. This embodiment realizes high-precision data processing, high efficiency of feature extraction and fusion, and accurate capture of gait changes and rehabilitation trends, ultimately improving the rehabilitation evaluation and gait correction effects, and ensuring that patients obtain a better experience and effect during the rehabilitation process.

[0179] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A method for optimizing time series data modeling of a gait rehabilitation robot based on frequency domain learning, characterized in that: The following steps are involved: Acquire multimodal sensor data, perform preprocessing, and obtain aligned synchronization data; calculate gait parameters based on the aligned synchronization data and compare them with the standard gait pattern to generate a patient state vector; The aligned and synchronized data are concatenated into a multimodal input tensor, and multi-scale convolution and frequency domain processing are applied to it and the patient state vector to obtain enhanced features; The enhanced features are processed by block and position encoding to obtain the coded enhanced features, and the residual fusion features are obtained by noise suppression processing; The self-attention mechanism is applied to the residual fusion feature to obtain the normalized attention feature, and the normalized attention feature is subjected to frequency domain alignment fusion processing to obtain the final fusion feature; The final fusion features are decomposed in the frequency domain and filtered with multi-scale memory, and combined with the patient's state vector to capture gait changes and rehabilitation trends to obtain spatiotemporal fusion features. Based on the spatiotemporal fusion features and the patient's state vector, the rehabilitation progress is evaluated and the gait correction vector and correction timing curve are generated, and a smooth safety control sequence is output; The steps to calculate gait parameters and generate the patient state vector include: Based on the aligned synchronization data, basic gait parameters including step frequency, step length, and stance phase ratio are calculated to obtain the initial gait feature vector; The initial gait feature vector is compared with the standard gait pattern to calculate the gait deviation index; generating a patient recovery stage identifier based on pre-stored patient history and assessment results; The initial gait feature vector, gait deviation index, and patient rehabilitation stage identifier are combined into a patient state vector.

2. The method according to claim 1, characterized in that The steps of preprocessing to obtain aligned synchronization data include: Apply corresponding filters to the multimodal sensor data to perform noise reduction processing to obtain filtered data; Detect the sampling rate of the filtered data and establish a timestamp mapping table; The mode with the highest sampling rate is selected as a reference based on the timestamp mapping table, and the filtered data is resampled to a uniform sampling rate to obtain a synchronous data sequence; Align the starting points of all synchronization data sequences and trim them to the same length to obtain aligned synchronization data.

3. The method according to claim 1, characterized in that The steps of applying multi-scale convolution and frequency domain processing to obtain enhanced features include: Apply multi-scale convolution operations to multi-modal input tensors to obtain multi-scale features; calculating adaptive frequency band division parameters according to the patient state vector; Apply fast Fourier transform to the multimodal input tensor to obtain frequency domain representation; Performing a mask operation on the frequency domain representation according to the adaptive frequency band division parameter to obtain a frequency domain mask tensor; generating an adaptive sparse projection matrix based on a patient state vector and pre-stored historical rehabilitation data; Apply an adaptive sparse projection matrix to the frequency domain mask tensor to obtain sparse frequency domain features; Compute bispectral and multispectral analysis of frequency domain representation to obtain high-order spectral features; Multi-scale features, sparse frequency domain features and high-order spectrum features are fused to obtain enhanced features.

4. The method according to claim 1, characterized in that The steps of performing block processing and position encoding to obtain encoding enhancement features include: The enhanced features are divided into blocks according to a preset block size to obtain block features; Generate time position coding, frequency position coding and modal type coding based on block features; The time position coding, frequency position coding and modal type coding are combined and applied to the block features to obtain the coding enhanced features.

5. The method according to claim 3, characterized in that The steps of obtaining residual fusion features through noise suppression processing include: estimating a noise signature profile based on pre-stored patient history data and current sensor status; Adaptively filter the frequency domain representation using the noise feature file to obtain a preliminary noise-reduced frequency domain representation; enhance the frequency domain information using spectral super-resolution reconstruction technology to obtain an enhanced frequency domain representation; Applying truncation operation and inverse Fourier transform to the enhanced frequency domain representation to obtain the time domain Fourier features; Applying a convolution operation to the encoded enhanced features to obtain convolution features; Calculate self-calibration parameters based on noise signature profiles and pre-stored patient recovery stages; The convolution kernel weights of the convolution features are self-calibrated based on the self-calibration parameters to obtain a calibrated convolution kernel; Use the calibrated convolution kernel to perform secondary convolution on the encoded enhanced features to obtain the calibrated convolution features; The time domain Fourier features and the calibrated convolution features are fused through residual connections to obtain residual fusion features.

6. The method according to claim 1, characterized in that The steps of applying the self-attention mechanism to obtain normalized attention features include: Convert the residual fusion features into query matrix, key matrix and value matrix; calculate the self-attention score and apply the scaling factor and Softmax normalization to get the attention weight matrix; Calculate the weighted sum based on the attention weight matrix and the value matrix to get the self-attention output; implement the multi-head attention mechanism to get the multi-head attention output; Residual connection and layer normalization are applied to add the residual fusion features to the multi-head attention output and then normalize them to obtain the normalized attention features.

7. The method according to claim 1, characterized in that The steps of performing frequency domain alignment fusion processing to obtain the final fusion features include: Extract the feature subset of each modality in the normalized attention feature to form a modality feature set; calculate the reliability weight of each modality in the patient's current rehabilitation stage; The most reliable mode is selected as the reference based on the reliability weight and the frequency domain alignment parameters are calculated; Perform frequency domain transformation on each modal feature in the modal feature set, apply frequency domain alignment parameters to align it, and then transform it back to the time domain to obtain frequency domain alignment features; Estimate the relative reliability of different modes in the frequency domain and generate a spectral error matrix; Based on the spectral error matrix, the residual fusion feature is used as the query and the frequency domain alignment feature is used as the key and value to realize the spectral error correction attention and calculate the spectral error correction attention score. The score is combined with the frequency domain alignment feature to calculate the weighted sum to obtain the cross-modal fusion feature. Based on the pre-stored patient rehabilitation stage and progress, the adaptive modality weights are calculated and the cross-modality fusion features are weighted to obtain the final fusion features.

8. The method according to claim 1, characterized in that The steps of performing frequency domain decomposition and multi-scale memory filtering to obtain spatiotemporal fusion features include: The final fusion features are converted to the frequency domain through Fourier transform, decomposed into high-frequency frequency domain representation and low-frequency frequency domain representation, and the inverse Fourier transform is applied to obtain high-frequency features and low-frequency features respectively; Apply frequency domain gated recurrent units to high-frequency features to capture short-term gait changes and obtain short-term memory features; Applying spectrum transformer to low-frequency features, processing them according to pre-stored patient rehabilitation progress parameters, capturing long-term rehabilitation trends, and obtaining long-term memory features; Calculate the fusion weights of short-term and long-term features based on the pre-stored patient rehabilitation stage and real-time gait assessment; The short-term memory features and long-term memory features are weightedly fused using fusion weights to obtain multi-scale fusion features; they are combined with the patient's state vector to capture gait changes and rehabilitation trends to obtain spatiotemporal fusion features.

9. The method according to claim 8, characterized in that The steps to capture gait changes and rehabilitation trends and obtain spatiotemporal fusion features include: Apply temporal convolutional networks to multi-scale fusion features to model local temporal dependencies and obtain local temporal features; Extract the long-term gait data of the pre-stored historical rehabilitation training records; apply the long short-term memory network to the long-term gait data to capture the long-term rehabilitation trend and obtain the long-term trend characteristics; Construct a memory-enhanced attention mechanism to associate local temporal features with long-term trend features to obtain memory-enhanced features; The gating mechanism is used to adaptively fuse multi-scale fusion features and memory enhancement features to obtain spatiotemporal fusion features.

Citation Information

Patent Citations

  • Rehabilitation robot control method based on multi-sensor data fusion

    CN117894428A