Time sequence data modeling optimization method for gait rehabilitation body-equipped robot based on frequency domain learning
Through the optimization method of timing data modeling and optimization of gait rehabilitation robots based on frequency domain learning, the problem of stable characterization of gait rehabilitation robots in the existing technology in the processing of complex timing data is solved, and the robustness and accuracy are achieved, which improves the effect and safety of rehabilitation training.
Patent Information
- Application Number
- CN202510302109.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-14
AI Technical Summary
Existing gait rehabilitation robots have difficulty maintaining stable characterization of key gait characteristics when processing complex timing data, resulting in limited robustness and accuracy of the model, especially in diverse patient populations and complex rehabilitation environments.
The timing data modeling and optimization method of embodied gait rehabilitation robot based on frequency domain learning is adopted. Through the pre-processing and alignment of multimodal sensor data, multi-scale convolution and frequency domain processing are used to obtain enhanced features. Combined with the self-attention mechanism and frequency domain alignment fusion processing, frequency domain decomposition and multi-scale memory filtering are carried out to capture gait changes and rehabilitation trends.
It improves the robustness and accuracy of the model, enhances the processing ability of complex timing data, ensures the robot accurately predicts and controls movements under different patients and environmental conditions, and improves the effectiveness and safety of rehabilitation training.
Smart Images

Figure CN119811586A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of gait rehabilitation, and in particular to a method for optimizing time series data modeling 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 spatiotemporal data and complex nonlinear dynamic systems, but there are still some limitations. Gait rehabilitation robots have shown great potential in helping patients recover motor function and improving rehabilitation treatment effects, especially in combination with frequency domain learning and reinforcement learning technologies, which 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 the periodic or trend characteristics in gait data. In gait rehabilitation robots, Fourier transform is widely used to process patient gait data to help robots 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 the control strategy. However, Fourier transform is very sensitive to high-frequency noise, which can affect the robustness and accuracy of the model for noise such as tiny muscle contraction signals that may appear in gait data, resulting in the robot's performance in complex rehabilitation environments being limited. In addition, when processing signals containing complex nonlinear 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] A major challenge facing gait rehabilitation robots is how to maintain a stable representation of key gait features during the modeling of complex time series data, ensuring that the robot can still accurately predict and control movements under different patient and environmental conditions. Existing research maintains the dynamic consistency of data by designing models with invariant features. For example, dual simulation technology can be used in reinforcement learning to enhance the adaptability of robots in uncertain environments. However, when dealing with highly complex gait timing data, especially when involving diverse patient groups and rehabilitation tasks, existing methods may face computational complexity and storage bottlenecks. In particular, during long training processes, accumulated errors may lead to a decrease in accuracy, affecting the stability and reliability of the robot's training effect.
[0005] Partial differential equations (PDEs), as an important tool for describing and predicting the behavior of spatiotemporal data in dynamic systems, also play a key role in the motion control of gait rehabilitation robots. Traditional PDE solution methods, such as finite difference method and finite element method, perform well in low-dimensional problems, but are less efficient when faced with high-dimensional and nonlinear problems. In recent years, data-driven PDE solution methods have made significant progress. Through methods such as deep learning and neural operators, complex motion control and gait data dynamics can be simulated more efficiently. However, these methods still face the challenge of how to deal with multi-scale gait characteristics and personalized control problems. Although neural operators have made up for the shortcomings of traditional numerical methods to a certain extent, their generalization ability is still limited in the dynamic and high-dimensional environment of gait rehabilitation robots, especially in complex or extreme situations. The control performance may not be as good as traditional physical guidance methods. Summary of the invention
[0006] The purpose of the invention is to provide a method for optimizing time series data modeling of a gait rehabilitation robot based on frequency domain learning to solve the above-mentioned problems existing in the prior art.
[0007] The technical solution is a method for optimizing the time series data modeling of a gait rehabilitation embodied robot based on frequency domain learning, comprising the following steps:
[0008] 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;
[0009] The aligned synchronized data are spliced into a multimodal input tensor, and multi-scale convolution and frequency domain processing are applied to the tensor and the patient state vector to obtain enhanced features; the enhanced features are processed in blocks and position encoded to obtain coded enhanced features, and residual fusion features are obtained through noise suppression processing;
[0010] 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;
[0011] 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.
[0012] The rehabilitation progress is evaluated based on the spatiotemporal fusion features and the patient's state vector, and the gait correction vector and correction timing curve are generated, and a smooth and safe control sequence is output.
[0013] Beneficial 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, a stable representation of key gait features is achieved, and gait changes and rehabilitation trends are captured through multi-scale memory filtering and spatiotemporal fusion features, thereby enhancing the accuracy and consistency of the model when processing complex time series data; through deep learning and multi-scale convolution and other technologies, the gait data is processed, overcoming the low efficiency of traditional partial differential equation methods in high-dimensional and nonlinear problems, and improving the control performance and simulation accuracy of the gait rehabilitation robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 A flowchart of the steps of a method for optimizing time series data modeling of a gait rehabilitation embodied robot based on frequency domain learning provided in an embodiment of the present application.
[0015] Figure 2 A flowchart of the steps for preprocessing to obtain aligned synchronization data provided in an embodiment of the present application.
[0016] Figure 3 A flowchart of the steps of applying multi-scale convolution and frequency domain processing to obtain enhanced features provided in an embodiment of the present application.
[0017] Figure 4 A flowchart of the steps of performing block processing and position coding to obtain coding enhancement features provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0019] It should be noted that in order to clearly show the steps of this application, serial numbers are marked for each step in the specification. These serial numbers are only used for the convenience of explanation and do not limit the order of execution of the steps. In actual operation, according to the technical requirements of the specific implementation scenario, the steps can be executed in a different order than that shown in the specification, and in some cases, parallel processing between steps can be achieved.
[0020] like Figure 1 As shown, the method for optimizing the time series data modeling of a gait rehabilitation embodied robot based on frequency domain learning includes the following steps:
[0021] S1. 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;
[0022] S2, splicing the aligned synchronization data into a multimodal input tensor, applying multi-scale convolution and frequency domain processing to the multimodal input tensor and the patient state vector to obtain enhanced features; performing block processing and position encoding on the enhanced features to obtain coded enhanced features, and obtaining residual fusion features through noise suppression processing;
[0023] S3, applying the self-attention mechanism to the residual fusion feature to obtain the normalized attention feature, and performing frequency domain alignment fusion processing on the normalized attention feature to obtain the final fusion feature;
[0024] S4, decomposing the final fusion features in the frequency domain and filtering them with multi-scale memory, combining them with the patient's state vector to capture gait changes and rehabilitation trends, and obtaining spatiotemporal fusion features;
[0025] S5. 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.
[0026] According to one aspect of the present application, step S1 further comprises:
[0027] S11, obtaining IMU sensor data, pressure sensor data, electromyographic sensor data and optical motion capture data, applying filters to these data for noise reduction, and obtaining filtered IMU data, filtered pressure data, filtered electromyographic data and filtered motion capture data;
[0028] S12, resampling and time-aligning the filtered data to obtain aligned synchronization data;
[0029] S13. Calculate gait parameters based on the aligned synchronization data and compare them with the standard gait pattern to obtain an initial gait feature vector and a gait deviation index; merge the initial gait feature vector, the gait deviation index and the patient rehabilitation stage identifier into a patient state vector.
[0030] like Figure 2 As shown, according to one aspect of the present application, the step of performing preprocessing to obtain aligned synchronization data includes:
[0031] Apply corresponding filters to the multimodal sensor data to perform noise reduction processing to obtain filtered data;
[0032] Detect the sampling rate of the filtered data and establish a timestamp mapping table;
[0033] 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;
[0034] Align the starting points of all synchronization data sequences and trim them to the same length to obtain aligned synchronization data.
[0035] According to one aspect of the present application, the step of calculating gait parameters and generating a patient state vector comprises:
[0036] Based on the aligned synchronization data, basic gait parameters including step frequency, step length, and stance phase ratio are calculated to obtain an initial gait feature vector with a dimension of K;
[0037] The initial gait feature vector is compared with the standard gait pattern to calculate the gait deviation index;
[0038] generating a patient recovery stage identifier of "early", "mid-term" or "late" based on pre-stored patient medical history and assessment results;
[0039] The initial gait feature vector, gait deviation index, and patient rehabilitation stage identifier are combined into a patient state vector for subsequent processing steps.
[0040] In this embodiment, obtaining multimodal sensor data includes collecting data from multiple sensors with a batch size of B, a time series length of T, and different numbers of sensors and channels. Specifically, it includes: obtaining IMU sensor data with a number of sensors S_I and a number of channels C_I; obtaining pressure sensor data with a number of sensors S_P; obtaining electromyographic sensor data with a number of sensors S_E and a number of channels C_E; and obtaining three-dimensional spatial coordinate optical motion capture data with a number of joint points J.
[0041] Preprocess and reduce noise on multimodal sensor data. Specifically, it includes: applying a bandpass filter with a cutoff frequency of 0.5Hz to 20Hz to the IMU sensor data to remove high-frequency noise and low-frequency drift to obtain filtered IMU data; applying a median filter with a window size of 5 to the pressure sensor data to eliminate instantaneous spike noise to obtain filtered pressure data; applying a sliding mean filter with a window size of 10 to the electromyography sensor data, and performing envelope detection to obtain filtered electromyography data; applying a Kalman filter to the optical motion capture data, using preset process noise and measurement noise parameters, smoothing the trajectory and filling in missing values to obtain filtered motion capture data.
[0042] The filtered IMU data, filtered pressure data, filtered electromyographic data, and filtered motion capture data are synchronized and resampled. Specifically, it includes: detecting the sampling rate of each modal data, establishing a timestamp mapping table containing the timestamps and corresponding relationships of each modal data; selecting the modality with the highest sampling rate as a reference, resampling all modal data to a unified sampling rate of 100Hz, and obtaining a synchronized data sequence; aligning the starting points of all synchronized data sequences, trimming them to the same length T_common, and obtaining aligned synchronized data. Initialization evaluation of patient gait characteristics is performed based on the aligned synchronized data.
[0043] In one embodiment of the present application, inertial measurement unit (IMU) sensor data D_IMU∈R is obtained. (B ×T×S_I×C_I) , where B is the batch size, indicating the number of data samples processed simultaneously; T is the time series length, indicating the number of time points for each sample; S_I is the number of IMU sensors, C_I is the number of IMU channels (accelerometer, gyroscope, magnetometer, 3 axes each, a total of 9 axes), and R is a real number set. Get pressure sensor data D_PRESS∈R (B×T×S_P) , where S_P is the number of plantar pressure sensors. Get electromyographic sensor data D_EMG∈R (B×T×S_E×C_E) , where S_E is the number of myoelectric sensors and C_E is the number of myoelectric channels. Get optical motion capture data D_MOCAP∈R (B×T×J×3) , where J is the number of joints, which represents the number of tracked human joints in optical motion capture data; 3 represents the three-dimensional space coordinates.
[0044] Apply a bandpass filter to the IMU sensor data to remove high-frequency noise and low-frequency drift, and obtain the filtered IMU data D_IMU_F∈R (B×T×S_I×C_I) D_IMU_F = BandpassFilter(D_IMU, f_low = 0.5Hz, f_high = 20Hz). Apply median filtering to the pressure sensor data to eliminate instantaneous spike noise and obtain the filtered pressure data D_PRESS_F∈R (B ×T×S_P) D_PRESS_F = MedianFilter(D_PRESS, window_size=5). Apply sliding mean filtering and envelope detection to the EMG sensor data to obtain the 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 filtering to the optical motion capture data to smooth the trajectory and fill in missing values to obtain 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 rate of each modal data and establish a timestamp mapping table T_MAP, which contains the timestamps and corresponding relationships of each modal data. Select the modality with the highest sampling rate as a reference, resample all modal data to a unified sampling rate f_s=100Hz, and obtain the synchronized data sequence D_IMU_S, D_PRESS_S, D_EMG_S, and 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 trim them to the same length T_common to obtain the aligned synchronization data D_IMU_AS, D_PRESS_AS, D_EMG_AS, and D_MOCAP_AS.
[0046] According to the alignment synchronization data, the basic gait parameters such as step frequency, step length, and stance phase ratio are calculated to obtain the initial gait feature vector G_INIT∈R K, 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. Compare with the standard gait pattern and 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∈{early, middle, late} 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 cutoff value of the bandpass filter; f_high is the high frequency cutoff value of the bandpass filter; G_STANDARD is the standard gait feature vector; BandpassFilter is the bandpass filter; MedianFilter is the median filter; window_size is the window size; D_EMG_SMOOTH is the electromyography data after sliding mean filtering; MovingAverageFilter is the sliding mean filter; En velocityDetection is envelope detection; KalmanFilter is Kalman filter; process_noise is process noise; measurement_noise is measurement noise; ResampleData is the resampled data function; original_rate is the original sampling rate; target_rate is the target sampling rate; DetectStepFrequency is the function for detecting step frequency; CalculateStepLength is the function for calculating step length; CalculateStanceRatio is the function for calculating the standing phase ratio; G_INI is the initial gait feature vector.
[0048] This embodiment applies filters to the IMU sensor data, pressure sensor data, electromyography sensor data and optical motion capture data for noise reduction, 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 achieves the comprehensive consideration of data quality improvement, accurate extraction of gait features and rehabilitation evaluation, improves the adaptability and effect of gait rehabilitation embodied robots in complex rehabilitation environments, 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:
[0050] S21, splicing the aligned synchronization data into a multimodal input tensor; applying multi-scale convolution to the multimodal input tensor to obtain multi-scale features; calculating adaptive frequency band division parameters based on the patient state vector; applying fast Fourier transform to the multimodal input tensor to obtain frequency domain representation and perform frequency band masking; generating an adaptive sparse projection matrix based on the patient state vector and applying it to the frequency domain data; calculating high-order spectral features of the frequency domain representation to obtain high-order spectral features; fusing the multi-scale features, sparse frequency domain features and high-order spectral features to obtain enhanced features;
[0051] S22, performing block processing on the enhanced features and applying position coding to obtain coded 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 inverse Fourier transform and convolution operations, and obtain residual fusion features through residual connection; calculate statistics based on residual fusion features, perform quality assessment and adaptive adjustment, and finally obtain the final enhanced features.
[0053] like Figure 3 As shown, according to one aspect of the present application, the step of applying multi-scale convolution and frequency domain processing to obtain enhanced features includes:
[0054] Apply multi-scale convolution operations to multi-modal input tensors to obtain multi-scale features;
[0055] calculating adaptive frequency band division parameters according to the patient state vector;
[0056] Apply fast Fourier transform to the multimodal input tensor to obtain frequency domain representation;
[0057] Performing a mask operation on the frequency domain representation according to the adaptive frequency band division parameter to obtain a frequency domain mask tensor;
[0058] generating an adaptive sparse projection matrix based on a 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] Compute bispectral and multispectral analysis of frequency domain representation to obtain high-order spectral features;
[0061] Multi-scale features, sparse frequency domain features and high-order spectrum features are fused to obtain enhanced features.
[0062] In this implementation, the input data is processed by multi-scale convolution and frequency domain adaptive sparse representation. Specifically, it includes: splicing the aligned synchronous data modes (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 parameters r values of 1, 2, 4, and 8 to obtain convolution results under different receptive fields, and splicing them in the channel dimension to obtain multi-scale features; calculating the adaptive frequency band division parameters of 5 frequency bands according to the gait characteristics and rehabilitation stage in the patient's state vector; applying fast Fourier transform to the multi-modal input tensor to obtain the frequency domain representation. The method is as follows: the frequency domain representation is masked according to the adaptive frequency band division parameters to obtain frequency domain mask tensors of different frequency bands; an adaptive sparse projection matrix with a dimension reduction parameter M of 64 is generated based on the patient state vector and historical rehabilitation data; the adaptive sparse projection matrix is applied to the frequency domain mask tensor of each frequency band to obtain sparse frequency domain features; the bi-spectrum and multi-spectrum analysis of the frequency domain representation are calculated to capture nonlinear dynamic features and obtain high-order spectral features; the multi-scale features, the sparse frequency domain features inversely transformed back to the time domain, and the high-order spectral features are fused to obtain enhanced features.
[0063] like Figure 4 As shown, according to one aspect of the present application, the steps of performing block processing and position coding to obtain coding enhancement features include:
[0064] The enhanced features are divided into blocks according to a preset block size to obtain block features;
[0065] Generate time position coding, frequency position coding and modal type coding based on block features;
[0066] 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.
[0067] In this embodiment, the enhanced features are subjected to block division and position coding enhancement processing. Specifically, the enhanced features are divided into blocks of preset block sizes (M1, M2, ..., M n) to obtain block features; generate time position codes reflecting time position information, wherein the codes of position pos and dimension i are calculated by sine and cosine functions; generate frequency position codes reflecting frequency point position information; generate modal type codes that distinguish different sensor modes; combine time position codes, frequency position codes and modal type codes, and apply them to block features to obtain coding enhanced features.
[0068] According to one aspect of the present application, the step of obtaining residual fusion features through noise suppression processing includes:
[0069] estimating a noise signature profile based on pre-stored patient history data and current sensor status;
[0070] 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;
[0071] applying a truncation operation to the enhanced frequency domain representation to obtain a truncated frequency domain representation;
[0072] Applying inverse Fourier transform to the truncated frequency domain representation obtains the time domain Fourier features;
[0073] Applying a convolution operation to the encoded enhanced features to obtain convolution features;
[0074] Calculate self-calibration parameters based on noise signature profiles and pre-stored patient recovery stages;
[0075] The convolution kernel weights of the convolution features are self-calibrated based on the self-calibration parameters to obtain a calibrated convolution kernel;
[0076] Use the calibrated convolution kernel to perform secondary convolution on the encoded enhanced features to obtain the calibrated convolution features;
[0077] The time domain Fourier features and the calibrated convolution features are fused through residual connections to obtain residual fusion features.
[0078] In this embodiment, the convolution residual Fourier transform and noise suppression processing are performed on the coding enhancement features. Specifically, it includes: based on the patient's historical data and the current sensor state, the noise model of each channel and frequency point is estimated to obtain a noise feature file; the noise feature file is used to adaptively filter the frequency domain representation to obtain a preliminary noise reduction frequency domain representation; the spectrum super-resolution reconstruction technology is applied, and the frequency domain information is enhanced by an upsampling factor of 2 to improve the spectrum details and obtain an enhanced frequency domain representation; the enhanced frequency domain representation is subjected to a truncation operation, and the low-frequency part is retained according to an adaptive threshold to obtain a truncated frequency domain representation; the truncated frequency domain representation is subjected to an inverse Fourier transform to obtain a time domain Fourier feature; the coding enhancement feature is subjected to a convolution operation with a convolution kernel size of 3 and a padding of 1 to capture high-frequency local features. , and obtain the convolution feature; calculate the self-calibration parameters according to the current noise feature file and the patient's rehabilitation stage; self-calibrate the convolution kernel weight to obtain the calibrated convolution kernel; use the calibrated convolution kernel to perform secondary convolution on the coding enhancement feature to obtain the calibrated convolution feature; fuse the time domain Fourier feature and the calibrated convolution feature through residual connection to obtain the residual fusion feature; calculate the feature statistics such as mean, variance and spectral energy distribution for the residual fusion feature to obtain the feature statistical vector; evaluate the feature quality based on the feature statistical vector and generate a feature quality score; according to the feature quality score, adaptively adjust the residual fusion feature to further suppress the influence of noise and obtain the final enhanced feature.
[0079] In one embodiment of the present application, the aligned synchronization data is 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 multi-scale convolution operation, use scale parameter r = [1, 2, 4, 8], obtain convolution results under different receptive fields, and obtain multi-scale features 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 band division parameter F_BANDS based on the gait characteristics and rehabilitation stage in the patient state vector P_STATE. F_BANDS = AdaptiveBandDivision(P_STATE, num_bands=5). Apply fast Fourier transform to the multimodal input tensor X_IN and 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, the frequency domain representation X_FREQ is masked to obtain the frequency domain mask tensor X_FREQ_MASKED∈R for different frequency bands. (B×F×C×N_BANDS) . for i inrange(N_BANDS): mask_i = CreateFrequencyMask(F_BANDS[i]); X_FREQ_MASKED[:,:,:,i] = X_FREQ * mask_i. Based on the patient state vector P_STATE and historical rehabilitation data, 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 mask tensor X_FREQ_MASKED of 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 bispectral and multispectral analysis of the frequency domain representation X_FREQ to capture the nonlinear dynamic characteristics and obtain the high-order spectral features X_POLY∈R (B×M_P×C), where M_P is the multispectral feature dimension. X_BI = Bispectrum(X_FREQ); X_POLY = Polyspectrum(X_FREQ). The multi-scale feature X_MULTI, sparse frequency domain feature X_SPARSE and high-order spectrum feature X_POLY are fused to obtain the enhanced feature X_ENHANCED ∈R (B×T×C_E) . X_SPARSE_TIME = IFFT(X_SPARSE, dim=1), inverse transform back to time domain; X_POLY_TIME = IFFT(X_POLY, dim=1), inverse transform back to time domain; X_ENHANCED = FeatureFusion([X_MULTI, X_SPARSE_TIME, X_POLY_TIME]).
[0080] The enhanced feature X_ENHANCED is divided into blocks of preset size (M1, M2, ..., 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=[M1, M2, ..., M n ]). Generate the temporal position code 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 frequency position code 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 modal type code 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, frequency position encoding PE_F and modality type encoding PE_M and apply them to the block feature X_BLOCKS to obtain the encoding enhancement feature X_ENCODED∈R (B×N_B×D_B). X_ENCODED = X_BLOCKS + CombinePositionalEncodings(PE_T, PE_F, PE_M).
[0081] Estimate the noise profile N_PROFILE∈R based on the patient’s historical data and the current sensor status (C×F) , establish a noise model for each channel and frequency point. N_PROFILE = NoiseEstimator (patient_history, sensor_status, X_FREQ). Use the noise profile N_PROFILE to adaptively filter the frequency domain representation X_FREQ to obtain the preliminary noise reduction frequency domain representation X_FREQ_DN∈R (B×F×C) X_FREQ_DN = AdaptiveFilter(X_FREQ, N_PROFILE). Apply spectrum super-resolution reconstruction technology to enhance frequency domain information and improve spectrum details to obtain 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 truncation to the enhanced frequency domain representation X_FREQ_SR, 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 convolution operation to the coded enhancement feature X_ENCODED to capture high-frequency local features and obtain the convolution 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 based on the current noise profile N_PROFILE and the patient's rehabilitation stage. ΔW = CalibrationNetwork(N_PROFILE, R_PHASE). Self-calibrate the convolution kernel weights to obtain the calibration convolution kernel W_CALIB. W_CALIB = W_ORIGINAL + ΔW. Use the calibration convolution kernel W_CALIB to perform a secondary convolution on the encoding enhancement feature X_ENCODED to obtain the calibration convolution feature X_CONV_CALIB∈R (B×N_B×D_C) X_CONV_CALIB = Conv1D(X_ENCODED, kernel=W_CALIB). The time domain Fourier feature X_FFT and the calibration convolution feature X_CONV_CALIB are fused through 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 multi-scale features; N_BANDS is the number of frequency bands; M* is the feature dimension after dimensionality reduction; X_BI is the bispectral feature; X_SPARSE_TIME is the representation of sparse frequency domain features after inverse transformation back to time domain; X_POLY_TIME is the representation of high-order spectrum features after inverse transformation back to time domain; M1, M2, ..., M nis the block size parameter; F_SR is the number of frequency points after super-resolution reconstruction; D_C is the convolution feature dimension; W_ORIGINAL is the original convolution kernel; D_R is the residual fusion feature dimension; Concatenate is the concatenation function; dim is the dimension; Conv1D is a one-dimensional convolution operation; kernel_size is the convolution kernel size; dilation is the dilation rate; AdaptiveBandDivision is the adaptive band division function; num_bands is the number of bands; FFT is the fast Fourier transform; mask_i is the mask; CreateFrequencyMask is the function for creating a frequency mask; GenerateSparseProjection is the function for generating a sparse projection matrix; MatrixMultiply is a matrix multiplication operation; Bispectrum is a bispectrum analysis; Polyspectrum is a multispectrum analysis; IFFT is an inverse fast Fourier transform; FeatureFusion is a feature fusion function; BlockParti tion 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 is the modality identifier; CombinePositionalEncodings is the combined position encoding function; NoiseEstimator is the noise estimation function; 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 amplification factor; FrequencyTruncation is the frequency truncation operation; adaptive_threshold is the adaptive threshold; padding is padding; CalibrationNetwork is the calibration network; R_PHASE is the patient rehabilitation phase identifier; bias is the bias.
[0083] This embodiment extracts features at different scales through convolution operations to obtain multi-scale features; frequency band masking is applied to help highlight important information in the frequency domain. This embodiment extracts and enhances more representative features, performs noise reduction and quality assessment on the features, and ultimately improves the performance and accuracy of the model.
[0084] According to one aspect of the present application, step S3 is further:
[0085] S31, processing the final enhanced features through the self-attention mechanism to obtain normalized attention features;
[0086] S32. Extract feature subsets of different modalities to form a modal feature set; calculate the reliability weight and frequency domain alignment parameters of each modality; perform frequency domain alignment on each modal feature to obtain frequency domain alignment features; estimate the relative reliability of different modalities in the frequency domain and generate a spectral error matrix; implement the spectral error correction attention mechanism to obtain cross-modal fusion features; calculate the adaptive modal weights based on the patient's rehabilitation stage and progress; use the adaptive modal weights to weight the cross-modal fusion features to obtain the final fusion features.
[0087] According to one aspect of the present application, the step of applying the self-attention mechanism to obtain a normalized attention feature includes:
[0088] 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;
[0089] 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;
[0090] 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.
[0091] In this embodiment, the final enhanced features are processed by applying the self-attention mechanism. Specifically, the following steps are performed: converting the final enhanced features into three representations: query, key, and value, to obtain the query matrix, key matrix, and value matrix; calculating the self-attention score, and applying the scaling factor (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 the 8-head multi-head attention mechanism, dividing the input into multiple heads, calculating the attention separately, and merging them to obtain the multi-head attention output; applying residual connection and layer normalization, adding the final enhanced features to the multi-head attention output and normalizing them to obtain the normalized attention features.
[0092] According to one aspect of the present application, the step of performing frequency domain alignment and fusion processing to obtain the final fusion feature includes: applying cross-modal frequency domain alignment and fusion processing to the normalized attention feature to obtain the final fusion feature, specifically:
[0093] 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;
[0094] The most reliable mode is selected as the reference based on the reliability weight and the frequency domain alignment parameters are calculated;
[0095] 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;
[0096] Estimate the relative reliability of different modes in the frequency domain and generate a spectral error matrix;
[0097] 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 spectral error correction attention score is combined with the frequency domain alignment feature to calculate the weighted sum and obtain the cross-modal fusion feature.
[0098] Based on the pre-stored patient rehabilitation stage and progress, the adaptive modality weights are calculated; the cross-modality fusion features are weighted using the adaptive modality weights to obtain the final fusion features.
[0099] In one embodiment of the present application, the residual fusion feature X_RES is converted into three representations of query, key, and value to obtain the query matrix Q∈R (B×N_B×D_K) , key matrix K∈R (B×N_B×D_K) The sum 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 get the attention weight matrix A∈R (B×N_B×N_B) A = Softmax(MatrixMultiply(Q, Transpose(K)) / sqrt(D_K)). Based on the attention weight matrix A and the value matrix V, the weighted sum is calculated 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, split the input into h heads, calculate the attention separately and merge them, and get 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 get 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) , i∈[1,M], 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∈R of each modality in the patient's current rehabilitation stage. M W_REL = ModalReliabilityEstimator(modal_status, R_PHASE). Select the most reliable mode as the reference and calculate the frequency domain alignment parameter F_ALIGN∈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 alignment feature X_ALIGNED∈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 modes in the frequency domain and generate the spectral error matrix E∈ R (M×M×F) . E = SpectralErrorEstimator(X_ALIGNED, W_REL). Using the residual fusion feature X_RES as the query and the frequency domain alignment feature X_ALIGNED as the key and value, we implement spectral error correction attention: First, we calculate the spectral error correction attention score A_CORR∈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)). The weighted sum is calculated based on the spectral error correction attention score A_CORR and the frequency domain alignment feature X_ALIGNED to obtain the cross-modal fusion feature X_CROSS∈R(B ×N_B×D_C) V_cross = LinearProjection(X_ALIGNED, D_V); X_CROSS = MatrixMultiply(A_CORR, V_cross). Based on the patient's rehabilitation stage and progress, calculate the adaptive modality weight W_MODAL∈R M W_MODAL = ModalWeightNetwork(X_CROSS, R_PHASE, patient_progress). Use the adaptive modality weight W_MODAL to weight the cross-modal fusion feature X_CROSS 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 fused 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 layer normalization; ExtractModalFeatures is a function for extracting modal features; modal_idx is a modal index; ModalReliabilityEstimator is a modal reliability estimator; modal_status is modal status information; ref_modal is a reference modality; ArgMax is the index where the maximum value is returned; CalculateAlignmentParameters is a function for calculating alignment parameters; for i in range is a loop statement for traversing each element in the range; X_FREQ_i is the representation of modal features in the frequency domain; FrequencyAlign is frequency domain alignment; SpectralErrorEstimator is a spectral error estimator; SpectralErrorCorrection is a spectral error correction; ModalWeightNetwork is a modal weight network; patient_progress is the patient's rehabilitation progress information; WeightedFusion is weighted fusion.
[0102] This embodiment processes the final enhanced features through the self-attention mechanism, which can capture the dependencies and interactions within the features and obtain more representative normalized attention features. Extracting feature subsets of different modalities to form a modal feature set can ensure that the features of each modality can be processed and utilized separately to avoid information loss. This embodiment realizes the efficient fusion and enhancement of multimodal data, which can improve the representativeness, robustness and adaptability of the features, thereby improving the performance and accuracy of the model in different application scenarios.
[0103] According to one aspect of the present application, step S4 is further:
[0104] S41. Decompose the final fusion feature into high-frequency and low-frequency parts to obtain high-frequency features and low-frequency features; apply frequency domain gated recurrent units to high-frequency features to capture short-term gait changes and obtain short-term memory features; apply spectrum converters to low-frequency features to capture long-term rehabilitation trends and obtain long-term memory features; calculate fusion weights based on the patient's rehabilitation stage and real-time gait evaluation, fuse short-term memory features and long-term memory features, and obtain multi-scale fusion features;
[0105] S42. Apply temporal convolutional networks and attention mechanisms to multi-scale fusion features, combine historical rehabilitation data, model local and global temporal dependencies, and finally obtain spatiotemporal fusion features.
[0106] According to one aspect of the present application, the step of performing frequency domain decomposition and multi-scale memory filtering to obtain spatiotemporal fusion features includes: performing multi-scale frequency domain memory filtering on the final fusion features to obtain spatiotemporal fusion features, specifically:
[0107] 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 then converted back to the time domain by inverse Fourier transform to obtain high-frequency features and low-frequency features;
[0108] Apply frequency domain gated recurrent unit to high frequency features, with hidden layer dimension D_S, to capture short-term gait changes and obtain short-term memory features;
[0109] 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;
[0110] Calculate the fusion weights of short-term and long-term features based on the pre-stored patient rehabilitation stage and real-time gait assessment;
[0111] 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.
[0112] According to one aspect of the present application, the step of capturing gait changes and rehabilitation trends to obtain spatiotemporal fusion features includes: modeling short-term and long-term dependency relationships of multi-scale fusion features to obtain spatiotemporal fusion features, specifically:
[0113] A 5-layer temporal convolutional network with a kernel size of 3 is applied to the multi-scale fusion features to model local time dependencies and obtain local temporal features.
[0114] Extract the long-term gait data of the pre-stored (last 10) historical rehabilitation training records; apply the long short-term memory network to the long-term gait data, with the hidden layer dimension D_T, to capture the long-term rehabilitation trend and obtain the long-term trend characteristics;
[0115] Construct a memory-enhanced attention mechanism to associate local temporal features with long-term trend features to obtain memory-enhanced features;
[0116] The gating mechanism is applied to generate gating values by training the gating network, and the multi-scale fusion features and memory enhancement features are adaptively fused to obtain the spatiotemporal fusion features.
[0117] In one embodiment of the present application, the final fused feature X_FUSED is decomposed into high frequency and low frequency parts to obtain the high frequency feature X_HIGH∈R (B×N_B×D_H) and low-frequency features 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). Apply the frequency domain gated recurrent unit (Fourier GRU) to the high-frequency feature X_HIGH to capture short-term gait changes and obtain the short-term memory feature M_SHORT∈ R (B×N_B×D_S) M_SHORT = FourierGRU(X_HIGH, hidden_dim=D_S); Apply Spectral Transformer to the low-frequency feature X_LOW to capture the long-term recovery trend and obtain the long-term memory feature M_LONG∈R( B×N_B×D_L)M_LONG = SpectralTransformer(X_LOW, patient_progress). Calculate the fusion weight α of short-term and long-term features based on the patient's rehabilitation stage and real-time gait assessment. t , get 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 get the multi-scale fusion feature Y_FUSED∈R (B ×N_B×D_F) . Y_FUSED = α * M_SHORT + (1-α) * M_LONG.
[0118] Apply the temporal convolutional network (TCN) to the multi-scale fusion feature Y_FUSED to model the local time dependency 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 during historical rehabilitation (H×D_G) , H is the historical time step, and D_G is the gait feature dimension. G_HISTORY = RetrieveGaitHistory(patient_id, last_sessions=10). Apply the 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 the gating mechanism to adaptively fuse the current features and historical features to obtain the spatiotemporal 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 high-pass filter cutoff frequency; low_cutoff is the low-pass filter cutoff frequency; 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 gate value; D_ST is the spatiotemporal feature dimension; HighPassFilter is a high-pass filter; LowPassFilter is a low-pass filter; FourierGR U 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 most recent sessions; MemoryEnhancedAttention is the memory enhanced attention mechanism; GateNetwork is the gated network.
[0120] This embodiment decomposes the final fused features into high-frequency and low-frequency parts, which can capture short-term and long-term gait change information respectively, thereby improving the representativeness and diversity of the features. This embodiment realizes multi-scale fusion and enhancement of multimodal features, can capture short-term and long-term gait change information during the patient's rehabilitation process, and combines historical data for comprehensive evaluation, thereby improving the accuracy and robustness of rehabilitation status evaluation.
[0121] According to one aspect of the present application, step S5 is further:
[0122] S51. Rehabilitation stage evaluation and adaptation based on spatiotemporal fusion features. Specifically, it includes: evaluating the current patient's rehabilitation progress and updating the rehabilitation progress score based on the spatiotemporal fusion features and historical rehabilitation data; calculating the rehabilitation stage adaptation parameters based on the rehabilitation progress score and the doctor's preset goals; adjusting the parameter sensitivity of each layer of the model based on the rehabilitation stage adaptation parameters to achieve rehabilitation stage adaptation and obtain adaptive model parameters.
[0123] S52. Generate a personalized gait correction strategy based on the evaluation results. Specifically, it includes: extracting the difference between the current gait and the standard gait pattern, calculating the gait deviation vector; generating the correction intensity coefficient based on the gait deviation vector, rehabilitation progress score and patient tolerance; generating the 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 patient feedback to obtain the optimized correction vector; generating the correction time series curve of the future time step (100 future time steps) according to the current gait state and rehabilitation goals, and planning a smooth correction process.
[0124] S53, converting the correction timing curve into robot control instructions, adjusting the auxiliary force according to the patient's condition, applying safety constraints, and finally outputting a smooth safety control sequence and user feedback data.
[0125] According to one aspect of the present application, the step of outputting a smooth safety control sequence includes:
[0126] The correction timing curve is converted into the robot joint angle command according to the robot kinematic parameters to obtain the joint control sequence;
[0127] According to the filtered electromyographic data, the patient's rehabilitation stage and muscle status, the auxiliary force parameters are calculated to assign appropriate auxiliary force to each joint;
[0128] Apply the auxiliary force parameter to the joint control sequence to obtain a force adjustment control sequence;
[0129] Apply safety constraints such as joint limits, maximum velocity and maximum acceleration to optimize the force adjustment control sequence and obtain a smooth and safe control sequence;
[0130] Generate real-time feedback information based on rehabilitation progress scoring, optimized correction vectors and rehabilitation goals to form user feedback data;
[0131] The smooth safety control sequence and user feedback data are combined into the final output instructions, which are passed to the robot execution system and user interface, and the patient record is updated.
[0132] In one embodiment of the present application, based on the spatiotemporal fusion feature Y_ST and historical rehabilitation data, the current patient's rehabilitation progress is evaluated and the rehabilitation progress score R_SCORE∈R is updated. R_SCORE = RehabProgressEstimator(Y_ST, G_HISTORY). According to the rehabilitation progress score R_SCORE and the doctor's preset goal, the rehabilitation stage adaptation parameter R_ADAPT∈R is calculated. D_A, D_A is the adaptation parameter dimension. R_ADAPT = AdaptationParameterGenerator(R_SCORE, doctor_preset_goals) Based on the rehabilitation stage adaptation parameter R_ADAPT, adjust the parameter sensitivity of each layer of the model to achieve rehabilitation stage adaptation and obtain the adaptive model parameter θ_ADAPT. θ_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). Generate the correction intensity coefficient C_INTENSITY∈R based on the gait deviation vector G_DEV_CURRENT, the rehabilitation progress score R_SCORE and the patient tolerance. C_INTENSITY=CorrectionIntensityCalculator(G_DEV_CURRENT, R_SCORE, patient_tolerance). Generate the gait correction vector C_GAIT∈R based on the gait deviation vector G_DEV_CURRENT and the correction intensity coefficient C_INTENSITY. J , J is the number of joints. C_GAIT = GaitCorrectionVectorGenerator(G_DEV_CURRENT, C_INTENSITY). Based on the historical correction effect and patient feedback, the gait correction vector C_GAIT is optimized to obtain the optimized correction vector C_OPT ∈ R J C_OPT = OptimizeCorrectionVector (C_GAIT, correction_history, patient_feedback). Generate the correction timing curve C_CURVE∈R ( J×T_F) , T_F is the future time step, and a smooth correction process is planned. C_CURVE =GenerateCorrectionTrajectory(C_OPT, current_gait_state, rehab_goals, T_F=100).
[0134] Convert the correction timing curve C_CURVE into the 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 auxiliary force parameter A_FORCE ∈ R according to the patient's muscle state and rehabilitation stage. J , assign appropriate assistance force to each joint. A_FORCE = AssistanceForceCalculator(D_EMG_AS, R_PHASE, patient_muscle_condition). Apply the auxiliary force parameter A_FORCE to the joint control sequence J_CTRL to obtain the force adjustment control sequence J_CTRL_ADJ∈R (J×T_F) J_CTRL_ADJ = ApplyAssistanceForce(J_CTRL, A_FORCE). Apply smooth constraints and safety restrictions to optimize the force adjustment control sequence J_CTRL_ADJ and obtain the smooth safety 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 current rehabilitation progress, correction direction and target prompts, to form user feedback data U_FEEDBACK. U_FEEDBACK = GenerateUserFeedback(R_SCORE, C_OPT, rehab_goals). Combine the smooth safety 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 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 is the joint limit parameter; 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 is the doctor's preset goal; 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 correction vector generator ... rator is the gait correction vector generator; OptimizeCorrectionVector is the correction vector optimizer; correction_history is the correction history record; patient_feedback is the patient feedback; GenerateCorrectionTrajectory is the correction trajectory generator; current_gait_state is the current gait state; rehab_goals is the rehabilitation goal; 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 muscle condition; ApplyAssistanceForce is the application of assistance force; ApplySafetyConstraints is the application of safety constraints; GenerateUserFeedback is to generate user feedback.
[0145] This embodiment evaluates the current patient's rehabilitation progress based on spatiotemporal fusion features and historical rehabilitation data, and updates the rehabilitation progress score, so as to grasp the patient's rehabilitation status in real time and ensure the accuracy and effectiveness of the rehabilitation plan. Through precise evaluation and dynamic adjustment, a personalized gait correction strategy is implemented, 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 scheme can capture the characteristics 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, which works through the following steps: Adaptive frequency band division: dynamically adjust the frequency domain division according to the gait characteristics of different patients, instead of using a fixed frequency band division: F_bands = AdaptiveBandDivision(X, patient_history, num_bands); Sparse Fourier projection: for each frequency band, use a sparse projection matrix to project the time domain signal into a specific frequency domain space: 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 spectrum feature extraction: in addition to the first-order spectrum features, the second-order spectrum features are additionally extracted to capture the nonlinear dynamic changes in the gait data: X_2nd_order = Bispectrum(X) + Polyspectrum(X). This embodiment can effectively handle the sparsity and individual differences of patient gait data and enhance the ability to recognize abnormal gait patterns.
[0147] According to one aspect of the present application, the cross-attention mechanism of the existing scheme only considers single-modal information fusion, while actual rehabilitation involves multiple sensor data (electromyography, pressure, vision, etc.), and cross-modal information fusion has not been effectively solved. Therefore, a multimodal frequency domain alignment and fusion network (MFAF) is added. The module works through the following steps: Frequency domain alignment layer: To solve the problem of inconsistent sampling rate and frequency characteristics of different modal data, the frequency domain alignment layer is designed: X_aligned(i) = FreqAlign(X_modal(i), ref_sampling_rate, modal_weights); Spectral error correction attention mechanism: In view of the different degrees of noise and error of different sensor data, the 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 a modal weight network. This embodiment improves the quality of cross-modal gait data fusion, especially when some sensor data quality is poor, it can still maintain good performance.
[0148] According to one aspect of the present application, there are short-term (single step) and long-term (entire rehabilitation cycle) dependencies in the gait pattern during the rehabilitation process, and the time series aggregation of the existing scheme is difficult to capture the dependencies of these two scales at the same time. Therefore, a multi-scale frequency domain memory filter network (MFMF) is added, and the module works through the following steps: frequency domain short-term memory unit: for rapid changes within a single gait cycle: M_short = FourierGRU (X_t, F_low, F_high), FourierGRU focuses on high-frequency feature modeling within the gait cycle; frequency domain long-term memory unit: for slow progress during rehabilitation: M_long = SpectralTransformer (X_t-k: t, patient_progress), SpectralTransformer focuses on 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 stage and the patient's recovery progress. This embodiment can capture both short-term changes and long-term trends in gait data, providing patients with more personalized and staged rehabilitation guidance.
[0149] According to one aspect of the present application, the Fourier neural operator in the existing scheme is sensitive to high-frequency noise, especially in the case of patient muscle tremors or sensor drift. Therefore, a spectral domain self-calibration noise suppression network (SACNS) is added, which works through the following steps: adaptive noise feature learning: N_profile = NoiseEstimator(X_hist, sensor_type, movement_phase); 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 when the patient has irregular muscle tremors or the sensor data is unstable.
[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 spectrum feature; X_aligned(i) is the frequency domain alignment feature of the i-th mode; FreqAlign is the frequency domain alignment function; X_modal(i) is the data of the i-th mode; ref_sampling_rate is the reference sampling rate; modal_weights is the modal weight, which is used to adjust the importance of different modalities; W_modal is the modal weight, which indicates the weight of different modalities in the fusion process; rehabilitation_phase is the rehabilitation phase; 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 tk; Y_fused is the multi-scale feature after fusion; 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 phase; 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 amplification 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 file; rehabilitation_stage is the rehabilitation stage.
[0151] In another embodiment of the present application, a method for optimizing time series data modeling of a gait rehabilitation embodied robot based on frequency domain learning comprises the following steps:
[0152] S1. Multimodal gait data acquisition and preprocessing: Collect raw gait data from multiple sensors, perform noise reduction, normalization and time alignment, and output preprocessed gait data;
[0153] S2, Adaptive frequency domain feature extraction and enhancement: Adaptive frequency domain transformation is performed on the preprocessed data to achieve selective enhancement of frequency domain features, extract and retain key frequency domain features;
[0154] S3. Hierarchical frequency domain representation learning: Perform multi-level representation learning on frequency domain features, construct temporal correlation and gait pattern features, and form a personalized gait feature representation for patients.
[0155] S4. Dynamic frequency domain feedback control strategy generation: Generate real-time control instructions based on frequency domain representation, conduct rehabilitation progress evaluation and adaptive adjustment, and provide personalized rehabilitation training strategy output.
[0156] According to one aspect of the present application, step S1 further comprises:
[0157] S11. Multimodal sensor data acquisition and synchronization. Collect raw sensor data, including inertial measurement unit (IMU) data, ground reaction force (GRF) data, electromyography (EMG) data, and visual capture data; use timestamp protocol to synchronize multi-sensor data to obtain time-aligned raw multimodal data; construct a spatial topological relationship matrix T based on sensor positions and patient anatomical structures to describe the physical connection relationship between different sensor points.
[0158] S12. Adaptive noise feature modeling and denoising. Analyze the time-aligned raw multimodal data and establish the sensor noise feature model N(s, t), where s represents the sensor type and t represents the time point. Dynamic spectral confidence weighted (DSCW) filtering technology is used 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 spectral confidence weight matrix, and Θ represents element-level 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 the adaptive adjustment parameter. Output the denoised multimodal data X_clean.
[0159] S13. Frequency domain aware normalization and standardization. Perform spectral analysis on the denoised multimodal data X_clean to obtain the spectral representation X_freq. Design the frequency band adaptive normalization (FAN) method and adopt 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. S(f) calculation method: S(f) = exp(-|f -f_key| / λ), f_key is the key frequency point set, and λ is the smoothing parameter. Output frequency domain normalized data X_norm and 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, gait cycle detection is performed. The frequency domain stable point detection (FSDP) algorithm identifies the stable point 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) , w is the window function. Extract spectrum stability index: S_index(t) = 1 - ||STFT(t) - STFT(t-Δt)||_F / ||STFT(t)||_F. Detect stable point: When S_index(t) is greater than the threshold θ and is a local maximum, it is marked as the gait cycle demarcation point; the detected gait cycle is time-normalized to obtain the gait cycle normalized data X_gait and the gait cycle characteristic parameter G_param.
[0161] According to one aspect of the present application, step S2 is further:
[0162] S21. Multi-resolution frequency domain decomposition. Input the gait cycle standardized data X_gait into the multi-resolution frequency domain decomposition module. Construct the adaptive spectral wavelet transform (ASWT) method, combining 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 of adaptive frequency modulation. Construct adaptive wavelet basis function: ψ_{a, b}(t) = a (-1 / 2) ·ψ((tb) / a)·e (j2πf_adapt(t)t), f_adapt is the adaptive frequency function. f_adapt calculation: f_adapt(t) = f_base + Δf · R(X_gait, t, G_param), R is the modulation function based on gait characteristics. Output multi-resolution frequency domain representation M_freq and frequency domain energy distribution map E_map.
[0163] S22. Nonlinear frequency domain feature enhancement. The multi-resolution frequency domain representation M_freq is enhanced by nonlinear features. A dynamic spectral morphological operation (DSMO) method is constructed to adaptively adjust the morphological operation parameters according to the signal characteristics. The DSMO method includes: spectrum dilation operation: D(f) = max{M_freq(fk) + SE(k), all k∈K}; spectrum erosion operation: E(f) = min{M_freq(f+k) - SE(k), all k∈K}; adaptive structural element: SE(k) = α· exp(-β · |k|) · (1 + γ · sin(πk / K)), where the parameters α, β and γ are dynamically adjusted based on the frequency domain statistical features F_stat and the frequency domain energy distribution map E_map, and the enhanced frequency domain features E_freq are output.
[0164] S23. Selective filtering of frequency domain features. Analyze the enhanced frequency domain features E_freq, and design the frequency domain information gain estimation (FIGE) method to evaluate the information contribution of different frequency bands; 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 information gain: AFE(f) = sigmoid(λ · (IG(f) - θ_IG)) where λ is a hyperparameter in the adaptive frequency domain filter used to control the influence of information gain on the filter strength, and θ_IG is a hyperparameter for the information gain threshold in the adaptive frequency domain filter; apply the filter to obtain the filtered frequency domain features F_freq = E_freqΘAFE; output the selectively filtered frequency domain features F_freq and the frequency domain importance weight W_freq.
[0165] S24, frequency domain information compression and reconstruction. Compress the frequency domain features F_freq after selective filtering to reduce the data dimension; construct a low-rank spectral tensor decomposition (LSTD) method to preserve the key correlations between frequency domain features; LSTD method steps: construct a high-order tensor: T = reshape(F_freq, [I_1, I_2, ..., I_n]); Tucker decomposition: T ≈ G×1 U1 ×2 U2 ... × n U n, where G is the core tensor, U n is a factor matrix, I_n is the size of the nth dimension; Adaptive rank selection: the rank r of each dimension is determined 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:
[0167] S31. Extraction of local frequency domain patterns. 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 topological relationship matrix T between sensors to extract features; 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 l-th layer feature, W (l) is the weight; the frequency domain graph attention mechanism (FGAM) is introduced to dynamically adjust the topological relationship according to the importance of different frequency domain features; FGAM calculation: T_dyn = T Θ A_freq, 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 obtained from C_freq through different linear transformations respectively; output local frequency domain features L_freq and frequency domain graph attention weight A_freq.
[0168] S32. Global temporal dependency modeling. Construct global temporal dependency based on local frequency domain features L_freq; construct frequency domain memory transformer (FMT) network, integrating self-attention mechanism and memory enhancement capability; FMT core components: frequency domain self-attention layer: Z_attn = softmax(Q·K T / sqrt(d))·V; memory enhancement mechanism: M_new = α·M_old + (1-α)·Z_attn, M is the external memory matrix; frequency domain specific feedforward network: Z_out = FFN(Z_attn + β·M_new); the memory matrix M captures the patient's historical gait pattern, α and β are dynamically adjusted fusion parameters, and d is the dimensionality scaling factor in the self-attention mechanism; output global temporal features G_freq and memory state matrix M_state.
[0169] S33. Personalized gait feature fusion. Fuse the local frequency domain feature L_freq and the global time series feature G_freq; construct a dynamic feature importance network (DFIN) to learn the importance weights of different features; DFIN calculation formula: W_imp =σ(MLP([L_freq, G_freq, P_info])), where P_info is the patient's personal information and rehabilitation stage; 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 abstract levels; 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 a negative sample, sim is the cosine similarity, and τ is a temperature parameter; contrastive learning is performed at multiple abstract levels, from the underlying 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:
[0172] S41. Conduct rehabilitation progress assessment. Evaluate the patient's rehabilitation progress based on the hierarchical gait representation H_rep; construct the frequency domain rehabilitation index evaluation (FRIE) method to quantify the degree of improvement of the patient's gait pattern; FRIE core index calculation: 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 score of rehabilitation progress: P_score = w1·S_index + w2·A_index + w3·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 evaluation 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; FRL core components: frequency domain state representation: S_freq = [H_rep, P_eval, E_env], E_env is the environment state; frequency domain action space: A_freq = {a_i | i=1, 2, ..., n}, indicating the control intensity of different frequency components; frequency domain reward function: R_freq = w1·ΔP_score + w2·Smoothness - w3·Energy; use the frequency domain policy gradient (FPG) algorithm to update the control strategy: θ_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 measure, Energy is the energy consumption, and ▽_θ is the control strategy gradient; output the adaptive control strategy C_strategy and the strategy confidence score S_conf.
[0174] S43, frequency domain safety boundary constraint. Apply frequency domain safety boundary constraint to the adaptive control strategy C_strategy; construct frequency domain control flexible constraint (FSCC) mechanism to ensure that the control strategy is within the safety range; FSCC core constraint formula: frequency domain control upper bound: C_upper(f) = C_ref(f) + Δ_max(f) · S_conf; frequency domain control lower bound: C_lower(f) = C_ref(f) - Δ_min(f) · S_conf; constraint optimization objective: C_opt = argmin_C ||C - C_strategy|| 2 st C_lower ≤ C ≤ C_upper; where C_ref is the reference control strategy, Δ_max and Δ_min are the maximum and minimum allowable deviations; output the constrained control strategy C_opt and safety boundary parameter B_safe.
[0175] S44, real-time control command generation and feedback. Convert the constrained control strategy C_opt into real-time control instructions; construct a frequency domain 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)), φ(f) is the phase information; inverse transform: x_control(t) = IFFT(X_spec(f)); introduce a frequency domain smoothing 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), γ(t) is the smoothing 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 the gait rehabilitation embodied robot based on frequency domain learning, specifically: Frequency domain dynamic spectral morphological operation (DSMO): Through adaptive spectrum expansion and corrosion operations, the recognition of frequency domain features is enhanced, effectively solving the limitations of traditional methods in processing non-steady gait signals. Frequency domain graph attention mechanism (FGAM): Combines graph convolutional networks with frequency domain features, and dynamically adjusts the weights of topological relationships to better capture the complex relationship between multimodal sensor data. Frequency domain memory transformer (FMT): Fusion of self-attention mechanism and external memory matrix to achieve long-term gait pattern memory and efficient extraction of short-term gait features, solving the difficulties of traditional time series models in long-term and short-term dependency modeling. Frequency domain reinforcement learning (FRL): Reinforcement learning is performed in the frequency domain space to directly optimize the frequency domain control strategy, avoiding the problem of high-frequency noise sensitivity in time domain control, and improving control accuracy and robustness.
[0177] This application can be used for 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 analyzing abnormal areas in medical images and detecting tumors or lesion areas. Tissue segmentation: automatically segmenting different types of tissues (such as liver, brain tissue, muscle, etc.) from CT or MRI images. Dynamic monitoring: monitoring the changes of organs or lesion areas over time, such as dynamic changes of the heart, tumors, etc. It can also be applied to video analysis tasks, especially tasks that need to capture dynamic changes and temporal dependencies in time series data, such as surveillance video analysis, behavior recognition, etc. Specifically: behavior recognition and prediction: analyzing the behavior of people in videos, such as walking, running, making phone calls, eating, etc. Video summarization and event detection: automatically extracting important clips from long videos and marking key events (traffic accidents, key moments in sports games). It can also enhance the perception and adaptability of smart home devices by perceiving different states in the home environment, and is suitable for smart homes and environmental perception, including home management, home appliance control and other scenarios. Specifically: Intelligent temperature control and air quality monitoring: real-time monitoring of environmental data such as temperature, humidity, CO2 concentration in the home, and adjusting the air conditioner or air purifier through an adaptive control system. Intelligent security and intrusion detection: monitoring home security through home cameras or sensors, detecting and warning whether there are intruders or abnormal situations. Family behavior analysis and health monitoring: analyzing the behavior of family members (such as walking, eating, resting, etc.) and evaluating their health status.
[0178] The present invention discloses a method for optimizing the time series data modeling of a gait rehabilitation embodied robot based on frequency domain learning, including: obtaining multimodal sensor data and preprocessing, calculating gait parameters and generating a patient state vector; applying multiscale convolution and frequency domain processing to obtain enhanced features; performing block processing and position encoding to obtain coding enhanced features, and obtaining residual fusion features through noise suppression processing; applying self-attention mechanism and frequency domain alignment fusion processing to obtain final fusion features; performing frequency domain decomposition and multiscale memory filtering to obtain spatiotemporal fusion features; evaluating rehabilitation progress and generating gait correction vectors and correction timing curves, and outputting a smooth safety control sequence. The present invention ensures data synchronization through preprocessing and alignment of multimodal sensor data, calculates gait parameters and generates patient state vectors, and improves data consistency and accuracy. Through multiple filtering technologies such as bandpass filtering, median filtering, sliding mean filtering, envelope detection and Kalman filtering, noise and data anomalies are effectively removed to ensure data reliability. Multiscale convolution and frequency domain processing are applied to enhance the ability of feature extraction, 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, so that the final fusion features have stronger representation capabilities. Through frequency domain decomposition and multi-scale memory filtering, combined with the patient state vector, gait changes and rehabilitation trends are captured to generate spatiotemporal fusion features. This process enhances the system's sensitivity to gait changes and its ability to track rehabilitation trends. 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, which not only provides accurate rehabilitation progress evaluation, but also outputs a smooth and safe control sequence to ensure the safety and effectiveness of the gait correction process. This embodiment achieves high precision in data processing, high efficiency in feature extraction and fusion, and accurate capture of gait changes and rehabilitation trends, ultimately improving the effects of rehabilitation evaluation and gait correction, ensuring that patients have a better experience and effect during the rehabilitation process.
[0179] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within 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. The rehabilitation progress is evaluated based on the spatiotemporal fusion features and the patient's state vector, and the gait correction vector and correction timing curve are generated, and a smooth and safe control sequence is output.
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 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.
4. 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.
5. 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.
6. The method according to claim 4, 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.
7. 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.
8. 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.
9. 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.
10. The method according to claim 9, 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
Multi-modal information fusion perception system for upper limb rehabilitation robot
CN112022619A
Robot compliance control method fusing multiple self-adaptive regulation and control mechanisms
CN117325182A
Rehabilitation robot control method based on multi-sensor data fusion
CN117894428A
Mechanical arm rehabilitation data prediction method and system based on deep learning
CN118588289A
Controllable video generation method and system based on multi-modal fusion
CN119091362A
Cited By
Image rain removal method based on multi-scale state space model
CN120031750A
Simulation system and method for anti-fatigue design of flexible power cable of humanoid robot
CN120277963A
Humanoid robot flexible power cable fatigue resistance design simulation system and method
CN120277963B
Intelligent scheme recommendation system and method based on myoelectric pressure and deep learning
CN120345910A
Tool grinding wheel dressing device and method based on annular array and dynamic multi-scale convolution
CN120395583A