Nerve patient rehabilitation training method based on task training and brain-computer interaction

By calculating the KL divergence and depth clustering of adjacent data blocks and dynamically adjusting the motion decoding model, the problem of EEG signal feature drift was solved, improving the accuracy and continuity of brain-computer interface rehabilitation training and enhancing the rehabilitation effect on patients.

CN121034540AActive Publication Date: 2025-11-28FUJIAN ZHIYUAN INTELLIGENT INNOVATION TECHNOLOGY CO LTD +1

Patent Information

Application Number
CN202511554867.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2025-11-28
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

EEG data signals are affected by the patient's physiological state (such as fatigue and fluctuations in attention) and environmental factors (such as changes in electrode contact and electromyography artifacts), and the feature distribution can drift significantly over time. Traditional static decoding models cannot dynamically adapt to this change, resulting in a decrease in classification accuracy as training time increases, which affects the actual rehabilitation training effect on patients.

Method used

The stability of data signal features is judged in real time by calculating the KL divergence of adjacent data blocks. If the KL divergence is lower than the threshold, the current model is used for decoding; if the KL divergence is greater than or equal to the threshold, the model is corrected according to the pre-trained decoding model. By using historical data signals and performing deep clustering, the target dataset and non-target data block sets are obtained. Deep clustering is performed on the target class and non-target class respectively, and a loss function is constructed to correct the model.

Benefits of technology

This technology enables dynamic adaptation to changes in the patient's physiological state and environment during brain-computer interface rehabilitation training, improving the precision and continuity of rehabilitation training, ensuring a high degree of match between rehabilitation equipment and the patient's movement intentions, and enhancing the rehabilitation effect for neurological patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121034540A_ABST
    Figure CN121034540A_ABST
Patent Text Reader

Abstract

The invention discloses a neural patient rehabilitation training method based on task training and brain-computer interaction, and belongs to the technical field of rehabilitation training. The method comprises the following steps: acquiring data signals of a patient in current rehabilitation training in real time, performing segmentation processing to obtain a plurality of independent data blocks, performing frequency domain conversion on the independent data blocks, extracting time-frequency features, and calculating KL divergence between adjacent data blocks; if the KL divergence of any adjacent independent data block is larger than or equal to a preset threshold value, historical data signals are obtained, the motion decoding model is corrected, motion decoding is carried out on the patient according to the corrected motion decoding model, rehabilitation training is carried out on the patient according to the motion decoding model, and rehabilitation training is carried out on the patient. According to the method, the corresponding model is selected according to the current rehabilitation training task, dynamic adjustment is performed in combination with real-time signal features, high matching of the decoding result and the training target is ensured, and the rehabilitation training effect of the patient is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of rehabilitation training, and particularly relates to a neural patient rehabilitation training method based on task training and brain-computer interaction. BACKGROUND

[0002] Brain-computer interaction is a direct connection path between human or animal brain (or brain cell culture) and external equipment, that is, decoding brain intention directly from electroencephalogram data signal and then controlling external equipment. Brain-computer interface rehabilitation training plays a very important role in functional rehabilitation of patients with neural injury caused by stroke, spinal cord injury, etc. This method has been widely applied in the field of neural rehabilitation and motor assistance. Specifically, by collecting electroencephalogram information related to the active movement intention of the neural injury patient, analyzing the electroencephalogram information, and controlling the rehabilitation training equipment based on the analysis result (related to the active movement intention), the limb movement function training of the neural injury patient is carried out, so as to realize rehabilitation. Compared with the traditional rehabilitation method and the robot-assisted rehabilitation method, the rehabilitation training based on the brain-computer interface technology is that the neural injury patient actively participates in the rehabilitation training control, promotes the occurrence of neural plasticity by improving the neural participation degree, and thus effectively improves the rehabilitation training effect.

[0003] The electroencephalogram data signal is affected by the physiological state (such as fatigue, attention fluctuation) of the patient and environmental factors (such as electrode contact change, electromyographic artifact), and the feature distribution will significantly drift over time. The traditional static decoding model relies on fixed parameters and cannot dynamically adapt to such changes, resulting in a decrease in classification accuracy as the training time is prolonged, which affects the actual rehabilitation training effect of the patient. SUMMARY

[0004] The purpose of the present application is to provide a neural patient rehabilitation training method based on task training and brain-computer interaction, which solves the following technical problems: The electroencephalogram data signal is affected by the physiological state (such as fatigue, attention fluctuation) of the patient and environmental factors (such as electrode contact change, electromyographic artifact), and the feature distribution will significantly drift over time. The traditional static decoding model relies on fixed parameters and cannot dynamically adapt to such changes, resulting in a decrease in classification accuracy as the training time is prolonged, which affects the actual rehabilitation training effect of the patient.

[0005] The purpose of the present application can be achieved by the following technical solutions: A neural patient rehabilitation training method based on task training and brain-computer interaction, comprising the following steps: S1, obtaining a training task of a patient in current rehabilitation training, and determining a corresponding movement decoding model based on the training task; S2, real-time acquisition of the data signal in the current rehabilitation training of the patient, and segmented processing according to a preset time window to obtain a plurality of independent data blocks, frequency domain conversion of any independent data block, and extraction of the time-frequency feature of the independent data block, calculation of the KL divergence between adjacent independent data blocks according to the time-frequency feature; If the KL divergence between any adjacent independent data blocks is less than a preset threshold, the data signal corresponding to the current independent data block is input into the motion decoding model for motion decoding to obtain a motion action, and the target operation of the rehabilitation equipment is determined according to the motion action. S3, if the KL divergence between any adjacent independent data blocks is greater than or equal to the preset threshold, the data signal of the patient in the historical task rehabilitation training is obtained, and the motion decoding model is corrected, the patient is motion decoded according to the corrected motion decoding model, and the target operation of the rehabilitation equipment corresponding to the patient is obtained.

[0006] As a further scheme of the application, in S2, the specific calculation process of the KL divergence is as follows: Frequency domain conversion is performed on each independent data block to obtain a feature value range, the feature value range is divided into a plurality of intervals by histogram binning, the occurrence frequency of the feature value in each interval is counted as a probability, the feature distribution of the previous data block is taken as a reference distribution, the feature distribution of the current data block is taken as a to-be-compared distribution, the probability value of the reference distribution is taken as a weight to multiply the natural logarithm of the probability ratio of the reference distribution and the current distribution, and the calculation results of all intervals are accumulated to obtain the K-L divergence value.

[0007] As a further scheme of the application, in S3, the specific process of correcting the motion decoding model is as follows: S11, the data signal of the patient in the historical rehabilitation training is obtained, and the data signal is segmented according to a preset time window to obtain a plurality of historical independent data blocks; each historical independent data block is preliminarily classified by using a preset static decoding model to obtain a target data block set and a non-target data block set, and the target data block set and the non-target data block set are respectively subjected to deep clustering to obtain a target class clustering center Q and a non-target class clustering center F; S12, taking the current time window as a beginning of a preset observation period H, acquiring a data signal in a patient rehabilitation training in the observation period, and performing segmented processing on the data signal according to a preset time window to obtain a plurality of independent data blocks and generate a reference data block set, selecting any reference data block and calculating distance values of the reference data block from a target class cluster center Q and a non-target class cluster center F respectively, obtaining probability values of the reference data block corresponding to the target class and the non-target class based on the distance values through t-distribution probability, comparing the probability values of the target class and the non-target class, and taking the probability value with the maximum value as a class of the reference data block; the class is a target data block and a non-target data block. S13, obtaining a second target data block set and a second non-target data block set according to the class of the reference data block, constructing a loss function according to the second target data block set and the second non-target data block set, and performing back propagation on a motion decoding model according to the loss function to obtain a corrected motion decoding model.

[0008] As a further scheme of the application, in S11, the acquisition process of the preset static decoding model is: acquiring training set data, the training set data including a sample set and a training label, constructing a back propagation network model and setting a training parameter, performing normalization processing on the training set data, and training the back propagation network model by using the sample set data to obtain a trained static decoding model.

[0009] As a further scheme of the application, in S13, the process of constructing the loss function is: S31, performing deep clustering on the second target data block set and the second non-target data block set respectively to obtain a target class cluster center Q' and a non-target class cluster center F'; S32, selecting any independent data block and calculating distance values of the independent data block from the target class cluster center Q and the target class cluster center Q' respectively, and obtaining probability values W of the independent data block corresponding to the target class Q and the target class Q' based on the distance values. According to a calculation formula the loss parameter LOSS is calculated. kl ; wherein N is the number of all independent data blocks, W'i is the probability value of the i-th independent data block corresponding to the target class Q', and Wi is the probability value of the i-th independent data block corresponding to the target class Q. S33, repeating S32 to obtain the probability value W of the independent data block corresponding to the non-target class F and the non-target class F', comparing the probability value of the independent data block target class Q and the non-target class F, and taking the probability value with the maximum as the category of the independent data block to obtain the first category of the independent data block; similarly, comparing the probability value of the independent data block target class Q' and the non-target class F' to obtain the second category of the independent data block, if the first category and the second category corresponding to the independent data block are not the same, the independent data block is marked as an abnormal data block; According to the calculation formula The loss parameter LOSS is calculated jl Wherein, m is the number of abnormal data blocks; S34, according to the loss parameter LOSS kl And the loss parameter LOSS jl The loss function LOSS is constructed, LOSS=b×LOSS kl +d×LOSS jl Wherein, b and d are preset coefficients.

[0010] As a further scheme of the application: the S13 further includes calculating the offset value of the target class clustering center Q' and the target class clustering center Q, and if the offset value is less than or equal to a preset offset threshold, the motion decoding model is not corrected.

[0011] As a further scheme of the application: the S31 further includes obtaining the probability value of the target class and the non-target class corresponding to any independent data block in the second target data block set, calculating the absolute value of the difference between the target class probability value and the non-target class probability value, and if the absolute value of the difference is less than or equal to a preset screening threshold, the independent data block is removed from the second target data block set.

[0012] As a further scheme of the application: in the S2, the data signal corresponding to the current independent data block is input into the motion decoding model for motion decoding, and the data signal is preprocessed, and the specific process of the preprocessing is: The data signal is amplified by an amplifier, the amplified data signal is filtered, and the filtered data signal is denoised based on wavelet transform.

[0013] The application has the following advantages: The application first acquires a training task of a patient in current rehabilitation training, determines a corresponding motion decoding model based on the training task, and can understand that the brain activity and motion intention of the patient can be recognized and analyzed through the decoding model matched with the training task. Data signals of the patient in the current rehabilitation training are collected in real time, the stability of the data signal features is judged in real time by calculating the KL divergence of adjacent data blocks, if the KL divergence is lower than a threshold value, it is indicated that the data signal features of the patient in the current training are relatively stable, and therefore the current model is directly used for decoding to ensure the continuity of the rehabilitation training, if the KL divergence is greater than or equal to the threshold value, it is indicated that the data signal of the patient has abnormal changes in the training process, and if decoding is performed according to the pre-trained decoding model, motion deviation will be caused, which is not conducive to the rehabilitation training of the patient. Therefore, in the application, the historical data signals of the patient are first acquired, and each historical independent data block is preliminarily classified by using a preset static decoding model to obtain a target data block set and a non-target data block set and respectively perform deep clustering to obtain a target class clustering center and a non-target class clustering center. The patient data signals are acquired in real time and segmented to obtain a plurality of independent data blocks, the distance between each independent data block and the target class clustering center and the non-target class clustering center is calculated, each independent data block is classified according to the distance to obtain a second target data block set and a second non-target data block set, the second target data block set and the second non-target data block set are deeply clustered to obtain a current target class clustering center and a current non-target class clustering center, a loss function is constructed according to the current target class clustering center and the current non-target class clustering center, and the motion decoding model is back propagated according to the loss function to obtain a corrected motion decoding model. The application selects the corresponding model according to the current rehabilitation training task, dynamically adjusts in combination with the real-time signal features, ensures that the decoding result is highly matched with the training target, and thus improves the rehabilitation training effect of the patient. BRIEF DESCRIPTION OF DRAWINGS

[0014] The application will be further described below in combination with the drawings.

[0015] Figure 1 It is a neural patient rehabilitation training method process schematic diagram based on task training and brain-computer interaction. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the application will be clearly and completely described below in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0017] Please refer toFigure 1 As shown, the present application is a neural patient rehabilitation training method based on task training and brain-computer interaction, comprising the following steps: S1, acquiring the training task of the patient in the current rehabilitation training, determining the corresponding motion decoding model based on the training task; S2, real-time acquisition of data signals in the current rehabilitation training of the patient, and segmentation processing according to a preset time window to obtain a plurality of independent data blocks, frequency domain conversion of any independent data block and extraction of time-frequency features of the independent data block, calculation of the KL divergence between adjacent independent data blocks according to the time-frequency features; If the KL divergence between any adjacent independent data blocks is less than a preset threshold, the data signal corresponding to the current independent data block is input into the motion decoding model for motion decoding to obtain a motion action, and the target operation of the rehabilitation device is determined according to the motion action; S3, if the KL divergence between any adjacent independent data blocks is greater than or equal to the preset threshold, the data signals of the patient in the historical task rehabilitation training are acquired and the motion decoding model is modified, and the patient is motion decoded according to the modified motion decoding model to obtain the target operation of the patient on the rehabilitation device.

[0018] It can be understood that different rehabilitation training tasks (such as hand grip training, leg stretching training, and elbow flexion and extension training) correspond to different activated regions of the patient's brain motor cortex and brain electrical signal features, for example, "hand grip" mainly activates the parietal lobe motor area, and the energy ratio of beta wave (13-30Hz) in the brain electrical signal increases; "leg stretching" more activates the frontal lobe motor area, and the alpha wave (8-13Hz) inhibition is more obvious. Therefore, it is necessary to match the exclusive decoding model through the task to improve the initial decoding accuracy.

[0019] Firstly, the patient determines the specific task of the current rehabilitation training by active selection (such as "right hand finger grip - relaxation cycle training" and "left knee flexion and extension training"); the rehabilitation system is built-in with multiple sets of pre-trained motion decoding models, each set of model corresponds to a specific rehabilitation task - the model training stage has optimized the parameters through a large number of patient EEG data under the same task (such as the model for the "hand grip" task, which has learned the time-frequency feature rules of the EEG signal under the task); according to the current training task, the corresponding motion decoding model can be automatically called as the initial decoding tool, but the traditional static decoding model cannot cope with the feature distribution drift caused by patient fatigue, attention fluctuation and other factors, resulting in the decay of decoding performance over time. Therefore, the core step S2 is used to calculate the KL divergence between adjacent data blocks in real time, so as to quantitatively evaluate and monitor the signal distribution change, and once the distribution change exceeds the preset threshold, the model correction mechanism is triggered immediately, the stable clustering center reference (Q, F) is established by using the historical data, and the real-time data is reclassified based on the t-distribution probability, and the joint loss function combining the distribution alignment loss (LOSS kl ) and the classification consistency loss (LOSS jl ) is constructed to correct the model by back propagation. It ensures that the motion decoding model can dynamically adapt to the current physiological state of the patient, overcomes the gradual failure of the traditional fixed model, enables the rehabilitation device to continuously and stably respond to the real movement intention of the patient, and guarantees the effective length and continuity of a single training course.

[0020] The KL divergence threshold and the clustering center offset threshold are used for double verification, effectively distinguishing between distribution drift caused by significant state changes and slight fluctuations caused by random noise. This avoids unnecessary and computationally expensive model adjustments, greatly saving system computing resources and meeting the stringent real-time requirements of brain-computer interface systems. Secondly, when correction is necessary, the classification method based on clustering center distance and t-distribution probability, as well as the rejection mechanism for low confidence samples, enhances the robustness to noise and artifacts, ensuring the quality of the data set used to construct the loss function. Finally, through the joint loss function, the model parameters are updated smoothly with targeted and constrained, absorbing new data information while avoiding forgetting historical knowledge, thereby maintaining the model's generalization ability and stability while quickly adapting.

[0021] The high-level perception of signal stability is realized through time-frequency feature extraction and KL divergence calculation. Finally, in the model correction link, the clustering centers (Q, F, Q', F') obtained by deep clustering are innovatively used as the representation of distribution. By measuring the difference between the current data and the historical clustering centers and the difference between the new and old clustering centers, the abstract "distribution change" is converted into a specific loss objective that can be calculated and optimized. This enables the model to automatically adjust its internal parameters (model weights) based on its own output feedback, forming a continuous self-optimizing positive cycle. The target operation performed by the rehabilitation device is highly matched with the patient's brain motor intention, thereby improving the patient's sense of achievement and enthusiasm in actively participating in training, and effectively promoting the remodeling and functional rehabilitation of neural pathways through correct neural feedback.

[0022] In a preferred case of the embodiment, the specific calculation process of KL divergence in S2 is as follows: For each independent data block, perform frequency domain conversion and extract time-frequency features to obtain a feature value range. The feature value range is divided into several intervals by histogram binning, and the frequency of feature values in each interval is counted as a probability. The feature distribution of the previous data block is taken as the reference distribution, and the feature distribution of the current data block is taken as the distribution to be compared. The probability value of the reference distribution is multiplied by the natural logarithm of the probability ratio of the reference distribution to the current distribution, and the calculation results of all intervals are accumulated to obtain the K-L divergence value.

[0023] In another preferred case of the embodiment, the specific process of modifying the motion decoding model in S3 is as follows: S11, obtaining data signals of the patient in historical rehabilitation training, and segmenting the data signals according to a preset time window to obtain a plurality of historical independent data blocks; performing preliminary classification on each historical independent data block by using a preset static decoding model to obtain a target data block set and a non-target data block set, and performing deep clustering on the target data block set and the non-target data block set respectively to obtain a target class clustering center Q and a non-target class clustering center F; S12, obtaining data signals of the patient in rehabilitation training within a preset observation period H starting from the current time window, and segmenting the data signals according to a preset time window to obtain a plurality of independent data blocks and generate a reference data block set. Select any reference data block and calculate the distance value of the reference data block to the target class clustering center Q and the distance value of the reference data block to the non-target class clustering center F. Based on the distance values, the probability values of the reference data block corresponding to the target class and the non-target class are obtained by t-distribution probability. Compare the probability values of the target class and the non-target class, and the probability value with the maximum probability is taken as the class of the reference data block. The class is target data block and non-target data block; S13, obtaining a second target data block set and a second non-target data block set according to the category of the reference data block, constructing a loss function according to the second target data block set and the second non-target data block set, and performing back propagation on the motion decoding model according to the loss function to obtain a corrected motion decoding model.

[0024] Firstly, the data signals recorded in the past rehabilitation training of the patient are called, and the historical data is cut according to the pre-set time length, so as to obtain a plurality of independent historical data blocks; this segmentation processing is to convert the continuous data stream into an independent analysis unit, so as to facilitate the subsequent feature extraction and pattern recognition. Then, a pre-trained static decoding model is used to preliminarily classify the historical data blocks. The static model is a reference model trained on a large amount of calibration data, which has a preliminary distinguishing ability. Through the classification, the data blocks are divided into a "target data block set" related to the target action and a "non-target data block set" irrelevant to the target action. The reason for this step is to provide preliminary data division with semantic labels for subsequent deep clustering by using the knowledge of the existing model. Then, the target data block set and the non-target data block set are respectively subjected to deep clustering processing. Deep clustering is a method combining deep learning feature extraction and clustering algorithm. It nonlinearly transforms data through a neural network, mines the internal distribution structure of data in a high-dimensional feature space, and finds the core feature clustering center that best represents each category. In this process, the target class clustering center Q and the non-target class clustering center F are calculated, which condense the core feature patterns of the two types of signals in the historical data, providing a reliable reference benchmark for subsequent real-time data comparison.

[0025] With the current time as the starting point, a time length H is set as the observation window, the patient data signals in the window are collected in real time, and are also subjected to segmentation processing to generate a new set of real-time independent data blocks, constituting a reference data block set. For each data block in the data set, the distance between the data block and the two clustering centers Q and F obtained in the historical stage is calculated. The distance is usually calculated by using Euclidean distance or cosine distance, etc. to measure the similarity between the features of the current data block and the two historical patterns. Based on the calculated distance, the probability values of the current data block belonging to the target class and the non-target class are estimated by using a t-distribution probability function. The t-distribution has a thicker tail than the normal distribution, and shows better robustness to noise and outliers, which makes the probability estimation more stable on the data signal which is easy to be disturbed. By comparing the two calculated probability values, the category with the larger probability value is determined as the current category of the data block, thereby completing the reclassification of the real-time data block.

[0026] According to the category labels of all the data blocks obtained in the foregoing, a new "second target data block set" and a new "second non-target data block set" are reassembled; the two sets reflect the latest distribution of the data signal features at the current time window. Subsequently, a loss function is constructed based on the two new data sets, which measures the difference between the performance of the model on the current new data and its performance on the historical data; finally, the internal parameters of the motion decoding model are iteratively updated according to the gradient calculated by the loss function using the back propagation algorithm, so as to obtain a corrected model that better adapts to the current physiological state of the patient.

[0027] A dynamic learning closed loop capable of coping with the non-stationarity of the data signal is constructed. The data signal will drift over time due to factors such as the fatigue, attention, and environmental noise of the patient, resulting in the performance degradation of the static model trained early. First, stable and pure category feature prototypes (cluster centers Q and F) are extracted from historical data. These prototypes are used as "anchor points" to reliably reclassify new, possibly drifted real-time data. This process essentially maps the new data back to the historical feature space for interpretation, avoiding direct classification decisions using an outdated model. Finally, the high-quality, current-state-consistent new data set obtained after reclassification is used to guide model updating, which makes the model adjustment no longer blind but directional, i.e., the decision boundary of the model is moved closer to the current data distribution, while its update is constrained by historical cluster centers (representing historical knowledge) to prevent overfitting to the latest small amount of noisy data. Ultimately, this process ensures that the motion decoding model can continuously and adaptively track changes in the patient's brain signal, maintain high-precision intention decoding, and thus ensure that the rehabilitation training device can accurately execute the patient's motion intention, improving the effectiveness and reliability of rehabilitation training.

[0028] In another preferred case of the embodiment, in the S11, the acquisition process of the preset static decoding model is: The training set data includes a sample set and a training label, and a back propagation network model is constructed and training parameters are set. The training set data is normalized, and the back propagation network model is trained using the sample set data to obtain a trained static decoding model.

[0029] The establishment of the preset static decoding model starts from obtaining training set data, which contains a large number of labeled data signal sample sets and their corresponding explicit training labels, for example, which data signal fragments correspond to "left hand movement intention", which correspond to "right hand movement intention" or "no movement intention"; obtaining these data is to enable the model to learn the stable and universal mapping relationship between data signal features and specific movement intention, and to provide the basic knowledge for the model to learn. Then, a neural network model based on the principle of error back propagation is constructed, which usually includes input layer, hidden layer and output layer, and sets key training parameters such as learning rate, iteration number, number of hidden layer neurons; such model is constructed because it has strong nonlinear fitting ability and can capture complex and weak feature patterns in data signal, and the back propagation algorithm is a mechanism for optimizing the connection weights of neural network, which calculates the error between predicted output and real label, and propagates the error from output layer to input layer layer by layer, so as to guide the update of each connection weight, so that the predicted output of the model continuously approaches the real situation. Then, the training set data is normalized, that is, the feature values of all data samples are scaled to a unified range through linear transformation; Normalization is performed because the original voltage values of different channels of data signal may differ by orders of magnitude, and normalization processing can eliminate the dimensional influence and avoid some features from dominating the model training because of large numerical value, thereby accelerating the convergence process of the model and improving the training stability. Finally, the normalized sample set data is used to train the back propagation network model that has been constructed, and through the iteration process of forward propagation to calculate the predicted value, calculate the loss function, and update the weight value by back propagation, the internal parameters of the model are continuously optimized, and finally a static decoding model with stable mapping relationship and good performance on the training set is obtained, which is used as a reference model in the subsequent adaptive adjustment process.

[0030] In another preferred case of the embodiment, in the S13, the process of constructing the loss function is: S31, respectively, the second target data block set and the second non-target data block set are clustered in depth to obtain the target class clustering center Q' and the non-target class clustering center F'; S32, select any independent data block and calculate the distance value of the independent data block from the target class clustering center Q and the distance value of the independent data block from the target class clustering center Q', and obtain the probability value W of the independent data block corresponding to the target class Q and the target class Q' based on the distance value; According to the calculation formula The loss parameter LOSS is calculated kl; wherein N is the number of all independent data blocks, W'i is the probability value of the i-th independent data block corresponding to the target class Q', and Wi is the probability value of the i-th independent data block corresponding to the target class Q; S33, repeating S32 to obtain the probability values W of the independent data block corresponding to the non-target class F and the non-target class F', comparing the probability values of the independent data block corresponding to the target class Q and the non-target class F, and taking the probability value with the maximum value as the class of the independent data block to obtain the first class of the independent data block; similarly, comparing the probability values of the independent data block corresponding to the target class Q' and the non-target class F' to obtain the second class of the independent data block, and if the first class and the second class corresponding to the independent data block are not the same, the independent data block is marked as an abnormal data block; According to the calculation formula The loss parameter LOSS is calculated jl , wherein m is the number of abnormal data blocks; S34, according to the loss parameter LOSS kl and the loss parameter LOSS jl , a loss function LOSS is constructed, LOSS = b x LOSS kl + d x LOSS jl , wherein b and d are preset coefficients.

[0031] The second target data block set and the second non-target data block set obtained by classifying the real-time data are again subjected to deep clustering processing, the deep clustering extracts high-level nonlinear features of the data through a neural network and groups in a feature space, thereby obtaining two clustering centers representing the current latest data distribution, i.e., a current target class clustering center Q' and a current non-target class clustering center F'; this step is performed to extract the most essential class features in the current state from the newly divided data, thereby providing an accurate current state representation for subsequent comparison with the historical benchmark.

[0032] Then, an independent data block is randomly selected, and the distance of the independent data block from the historical target class clustering center Q and the distance of the independent data block from the current target class clustering center Q' are calculated, respectively. The distance reflects the similarity of the data point to the class core, and the closer the distance, the higher the similarity. Based on the two distance values calculated, a t-distribution probability transformation formula is used to obtain the probability values W of the data block belonging to the historical target class Q and belonging to the current target class Q'. The t-distribution probability function can map the distance to a soft probability value, which is not sensitive to outliers and makes the probability estimation more robust. Subsequently, according to the two probability values calculated from all data blocks, a loss parameter LOSS kl, KL divergence is used to measure the difference between two probability distributions, thereby quantifying the overall difference between the "probability distribution of the current data block belonging to the historical target class" and the "probability distribution of the current data block belonging to the current target class". The larger this difference value, the more significant the drift in the distribution characteristics of the data.

[0033] The above process is repeated for non-target classes, and the probability values of the same data block belonging to historical non-target classes F and current non-target classes F' are calculated, and the data block is classified twice according to the historical clustering centers (Q and F) and the current clustering centers (Q' and F'), respectively, to obtain two class labels (first class and second class). Compare the two class labels. If they are not consistent, mark the data block as an abnormal data block, because a data point gets different results in two independent classifications based on historical benchmarks and current states, which indicates that the characteristics of the data point may be in a fuzzy boundary region or severely disturbed by noise, and the classification result is unreliable. Count the number of all abnormal data blocks m, and calculate another loss parameter LOSS_ jl , which directly reflects the number of abnormal points with high classification uncertainty in the current data set.

[0034] It can be understood that using LOSS_ kl (distribution difference loss) alone can effectively capture the overall drift trend of data characteristics, ensuring that the learning direction of the model is towards the direction of adapting to the new data distribution, but it may be sensitive to local noise and abnormal points. LOSS_ jl (classification consistency loss) acts as a "noise filter" and "stability constraint", focusing on abnormal points with uncertain classification results, and by punishing the number of abnormal points, it forces the model not to overfit to these potentially problematic data when adjusting, thereby maintaining the generalization ability and robustness of the model. By combining the two in a weighted manner, the joint loss function LOSS can simultaneously achieve two major goals: on the one hand, it sensitively tracks and adapts to the overall distribution change of the data (through LOSS kl ), and on the other hand, it robustly resists the interference of local noise and outliers (through LOSS jl ). Ultimately, the adaptive correction process of the model is no longer simply fitting new data, but has achieved the best balance between "absorbing effective new information" and "maintaining its stability", thereby driving the model to evolve in a more accurate and reliable direction, ensuring that the rehabilitation decoding task can be performed long-term, stably and efficiently.

[0035] In another preferred case of the embodiment, the S13 further comprises calculating an offset value of the target class cluster center Q' and the target class cluster center Q, and if the offset value is less than or equal to a preset offset threshold, the motion decoding model is not corrected.

[0036] The data signal is susceptible to noise, and a slight offset can be caused by noise rather than a real state change. If the offset does not exceed the threshold, such as due to random noise or slight state fluctuation, the model correction process is skipped, the calculation overhead of back propagation and parameter updating is reduced, the system operation efficiency is improved, the generalization ability of the model to historical data is retained, the model is corrected only when the offset is significant, the experience of historical data is utilized, new features are adapted, and the adaptability of the model to dynamic signals is improved.

[0037] In another preferred case of the embodiment, the S31 further comprises obtaining the probability values of the target class and the non-target class corresponding to any independent data block in the second target data block set, calculating the absolute value of the difference between the target class probability value and the non-target class probability value, and if the absolute value of the difference is less than or equal to a preset screening threshold, the independent data block is removed from the second target data block set.

[0038] It can be understood that if the absolute value of the difference is less than or equal to the preset screening threshold, the independent data block is determined to be signal noise, artifacts or state fluctuation, and thus the classification result is uncertain. Therefore, removing the independent data block can reduce the interference of noise on the cluster center and the loss function, improve the stability of the model, retain the independent data blocks with large probability difference, enable the model to focus on learning features with high discrimination, avoid being misled by ambiguous samples, and enhance the adaptability to dynamic changes of data signals.

[0039] In another preferred case of the embodiment, the S2 further comprises pre-processing the data signal corresponding to the current independent data block before inputting the data signal into the motion decoding model for motion decoding, and the specific process of the pre-processing is as follows: The data signal is amplified by an amplifier, the amplified data signal is filtered, and the filtered data signal is denoised based on wavelet transform.

[0040] The above describes one embodiment of the present application in detail, but the content described is only a preferred embodiment of the present application and cannot be considered as limiting the scope of the present application. Any equivalent changes and improvements made within the scope of the present application should still be included in the patent coverage of the present application.

Claims

1. A rehabilitation training method for neurological patients based on task training and brain-computer interaction, characterized in that, Includes the following steps: S1, Obtain the patient's training task in the current rehabilitation training, and determine the corresponding motion decoding model based on the training task; S2, real-time acquisition of patient data signals during current rehabilitation training, segmentation processing according to preset time windows to obtain several independent data blocks, frequency domain transformation of any independent data block and extraction of the time-frequency characteristics of the independent data block, and calculation of KL divergence between adjacent independent data blocks based on the time-frequency characteristics; If the KL divergence between any two adjacent independent data blocks is less than a preset threshold, the data signal corresponding to the current independent data block is input into the motion decoding model for motion decoding to obtain the motion action, and the target operation of the rehabilitation device is determined based on the motion action. S3. If the KL divergence between any adjacent independent data blocks is greater than or equal to a preset threshold, the data signal of the patient in the historical task rehabilitation training is obtained and the motion decoding model is corrected. The patient is then motion-decoded according to the corrected motion decoding model to obtain the motion action. The target operation of the rehabilitation device is determined according to the motion action.

2. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 1, characterized in that, In S2, the specific calculation process of the KL divergence is as follows: For each independent data block, frequency domain transformation is performed and time-frequency features are extracted to obtain the feature value range. Histogram binning is used to divide the feature value range into several intervals. The frequency of occurrence of feature values ​​in each interval is counted as the probability. The feature distribution of the previous data block is used as the reference distribution, and the feature distribution of the current data block is used as the distribution to be compared. The probability value of the reference distribution is used as the weight and multiplied by the natural logarithm of the probability ratio of the reference distribution to the current distribution. The calculation results of all intervals are summed to obtain the KL divergence value.

3. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 1, characterized in that, In step S3, the specific process of correcting the motion decoding model is as follows: S11, acquire the patient's data signals from historical rehabilitation training, and segment the data signals according to a preset time window to obtain several historical independent data blocks; perform preliminary classification on each historical independent data block using a preset static decoding model to obtain a target data block set and a non-target data block set, and perform deep clustering on the target data block set and the non-target data block set respectively to obtain the target cluster center Q and the non-target cluster center F; S12, with the current time window as the starting point, a preset observation period H is established. Data signals from the patient's rehabilitation training within the observation period are acquired. The data signals are then segmented according to the preset time window to obtain several independent data blocks and generate a set of reference data blocks. Any reference data block is selected, and the distance values ​​between the reference data block and the target class cluster center Q and the non-target class cluster center F are calculated. Based on the distance values, the probability values ​​of the reference data block corresponding to the target class and the non-target class are obtained through the t-distribution probability. The probability values ​​of the target class and the non-target class are compared, and the one with the largest probability value is taken as the category of the reference data block. The categories are target data blocks and non-target data blocks; S13, a second target data block set and a second non-target data block set are obtained according to the category of the reference data block. A loss function is constructed based on the second target data block set and the second non-target data block set. The motion decoding model is backpropagated based on the loss function to obtain a modified motion decoding model.

4. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 3, characterized in that, In step S11, the process of obtaining the preset static decoding model is as follows: Acquire training set data, which includes a sample set and training labels; construct a backpropagation network model and set training parameters; normalize the training set data; train the backpropagation network model using the sample set data to obtain a trained static decoding model.

5. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 3, characterized in that, In S13, the process of constructing the loss function is as follows: S31, perform deep clustering on the second target data block set and the second non-target data block set respectively to obtain the target class cluster center Q' and the non-target class cluster center F'; S32, Select any independent data block and calculate the distance value between the independent data block and the target class cluster center Q and the target class cluster center Q' respectively, and obtain the probability value W of the independent data block corresponding to the target class Q and the target class Q' based on the distance value; According to the calculation formula The loss parameter LOSS_ is calculated. kl Where N is the number of all independent data blocks, W'i is the probability value of the i-th independent data block corresponding to the target class Q', and Wi is the probability value of the i-th independent data block corresponding to the target class Q. S33, repeat S32 to obtain the probability values ​​W of non-target class F and non-target class F' corresponding to the independent data block. Compare the probability values ​​of target class Q and non-target class F of the independent data block, and take the one with the largest probability value as the category of the independent data block to obtain the first category of the independent data block. Similarly, compare the probability values ​​of target class Q' and non-target class F' of the independent data block to obtain the second category of the independent data block. If the first category and the second category of the independent data block are not the same, then the independent data block is marked as an abnormal data block. According to the calculation formula The loss parameter LOSS_ is calculated. jl , where m is the number of abnormal data blocks; S34, according to the loss parameter LOSS_ kl and loss parameter LOSS_ jl Construct the loss function LOSS, LOSS = b × LOSS_ kl +d×LOSS_ jl , where b and d are preset coefficients.

6. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 5, characterized in that, S13 further includes calculating the offset value between the target cluster center Q' and the target cluster center Q. If the offset value is less than or equal to a preset offset threshold, the motion decoding model is not modified.

7. A method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 5, characterized in that, S31 further includes obtaining the probability values ​​of the target class and non-target class corresponding to any independent data block in the second target data block set, calculating the absolute value of the difference between the target class probability value and the non-target class probability value, and if the absolute value of the difference is less than or equal to a preset filtering threshold, then the independent data block is removed from the second target data block set.

8. The method for rehabilitation training of neurological patients based on task training and brain-computer interaction according to claim 1, characterized in that, In step S2, the data signal corresponding to the current independent data block is input into the motion decoding model for motion decoding. The step also includes preprocessing the data signal. The specific preprocessing process is as follows: The data signal is amplified by an amplifier, then filtered, and finally denoised using wavelet transform.

Citation Information

Patent Citations

  • Deep clustering method for bridge time sequence anomaly classification

    CN118656752A

  • Training scheme analysis system for kidney rehabilitation

    CN118711751A

  • Electroencephalogram signal decoding method, device, equipment and medium

    CN119848673A

  • Athletic and cognitive ability assessment method, system and device

    CN119993384A

  • Balance training coordination management method based on foot data analysis

    CN120148750A

Cited By

  • Parameter adjusting method of motion intention recognition model and implantable neural rehabilitation equipment

    CN121881163A

  • Parameter tuning method of motion intention recognition model, implantable neural rehabilitation device

    CN121881163B