A system for assisting rehabilitation during sleep

Through a system that assists rehabilitation in sleep, using deep learning and reinforcement learning models to analyze the sleep stage and conduct precise intervention, the problem of the existing technology failing to fully utilize the sleep potential is solved, and the effect of accelerating neural circuit repair and shortening the rehabilitation cycle is achieved.

CN119868753BActive Publication Date: 2025-06-27THE FIRST AFFILIATED HOSPITAL OF XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510368392.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-27
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

Existing rehabilitation technologies fail to fully utilize the potential of the sleep phase, especially during deep sleep and rapid eye movement, and cannot effectively accelerate the repair and rehabilitation process of neural circuits.

Method used

It provides a system that assists rehabilitation in sleep. Through electroencephalopathy, heart rate, breathing, electromyography and body movement monitoring, combined with deep learning models and reinforcement learning models, it analyzes the sleep stage in real time and determines intervention priorities, activates the corresponding intervention components for stimulation, and ensures that the intervention is connected with the daytime rehabilitation training goals.

Benefits of technology

Through precise sleep intervention, avoid interference with normal sleep, ensure the safety and comfort of the intervention, effectively utilize the peak of nocturnal nerve plasticity, accelerate neural circuit repair, and may significantly shorten the recovery cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119868753B_ABST
    Figure CN119868753B_ABST
Patent Text Reader

Abstract

The present invention provides a system for assisting rehabilitation during sleep. The system includes: an electroencephalogram monitoring component, a heart rate and respiration monitoring component, an electromyogram monitoring component, and a body movement monitoring component, which are used to acquire physiological signals of an object; an intervention component, which is used to perform a predetermined intervention operation when activated; a control component, which is used to determine the sleep stage according to the physiological signals of the object; when the sleep stage is the deep sleep stage, determine the intervention priority score according to the object's daytime rehabilitation training goal, the lesion location, and the stability score of the current deep sleep stage; when the intervention priority score is greater than or equal to a predetermined threshold, the object is currently in the deep sleep stage, and the stability of the current deep sleep stage meets the predetermined stability condition, activate the corresponding intervention component. By using the above technical solution, precise intervention can be achieved during sleep, and the rehabilitation process of the patient can be accelerated by effectively connecting the intervention in the sleep stage with the daytime rehabilitation training goal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sleep intervention, and particularly to a system for assisting rehabilitation during sleep. Background Art

[0002] In recent years, neuroscience research has found that sleep, especially slow wave sleep (SWS) and rapid eye movement (REM) sleep, plays a crucial role in neural plasticity and brain self-repair. Neural plasticity refers to the brain's ability to reorganize its neural structure and function after experiencing external stimuli or internal injuries. In stroke and other patients with nerve injuries, the damaged neural pathways need to be stimulated through continuous rehabilitation training to activate neural plasticity for functional recovery. However, the progress of nerve repair during wakefulness is limited because the brain consumes a large amount of resources during cognitive and motor tasks, inhibiting the process of nerve repair.

[0003] On the contrary, sleep provides a low-load environment for the brain, enabling nerve repair and synaptic consolidation to occur without external interference. Especially during SWS, slow oscillations are considered a key mechanism for the brain to regulate synapses. Research has shown that slow oscillations help optimize synaptic strength, eliminate unnecessary synaptic connections, and strengthen effective connections, thereby promoting the recovery of nerve function. The REM period provides ideal conditions for the dynamic remodeling of synapses and the flow of neural information, and is an important time for the nervous system to repair and self-optimize. Therefore, sleep not only helps with the consolidation of memory and learning, but is also a critical period for nerve recovery and synaptic repair.

[0004] Although research has clarified the role of sleep in neural plasticity, existing rehabilitation techniques still fail to fully utilize the potential of sleep stages. Currently, the rehabilitation treatment of stroke and nerve injury patients mainly relies on methods such as physical therapy, occupational therapy, and speech rehabilitation during the day. Although these methods can activate damaged neural pathways, they mainly focus on active training during wakefulness. However, the training time during wakefulness is limited, and excessive training can lead to fatigue and decreased patient compliance, thereby affecting the rehabilitation effect.

[0005] In addition, although the concept of "sleep learning" or nocturnal assisted stimulation has been proposed in some research, existing programs lack a comprehensive consideration of patient individual differences and rehabilitation goals and cannot form an effective connection with daytime rehabilitation treatment. Summary of the Invention

[0006] Embodiments of the present invention provide a system for assisting rehabilitation during sleep, which can achieve precise intervention during sleep and accelerate the rehabilitation process of patients by effectively connecting the intervention during the sleep stage with the rehabilitation training goals during the day.

[0007] To achieve the above object, on the one hand, a system for assisting rehabilitation during sleep is provided, including: an electroencephalogram (EEG) monitoring component for acquiring the EEG signals of an object; a heart rate and respiration monitoring component for acquiring the heart rate and respiration signals of the object; an electromyogram (EMG) monitoring component for acquiring the EMG change signals of the object; a body movement monitoring component for acquiring the body movement signals of the object; the body movement signals include: the body movement frequency and body movement amplitude of the object; an intervention component for performing a predetermined intervention operation on the object when activated; a control component for: receiving in real time the EEG signals, the heart rate and respiration signals, the EMG change signals and the body movement signals; using a pre-trained deep learning model to perform signal feature extraction and time series analysis on the received EEG signals, heart rate and respiration signals, EMG change signals and body movement signals, and determining the current sleep stage of the object according to the results of the signal feature extraction and time series analysis; wherein, the sleep stage includes: deep sleep stage, light sleep stage, rapid eye movement (REM) stage and wakefulness stage; when the current sleep stage is the deep sleep stage, determine the intervention priority score according to the object's daytime rehabilitation training goal, the lesion location of the object and the stability score of the current deep sleep stage, wherein different daytime rehabilitation training goals have predetermined weights; when the intervention priority score is greater than or equal to a predetermined threshold, the object is currently in the deep sleep stage, and the stability of the current deep sleep stage meets the predetermined stability condition, activate the intervention component corresponding to the daytime rehabilitation training goal with the highest weight in the daytime rehabilitation training goals;

[0008] Wherein, the following formula is used to calculate the stability score:

[0009] ;

[0010] Wherein, is the Markov model transition probability from the deep sleep stage to the wakefulness stage for the object;

[0011] is the Markov model transition probability from the deep sleep stage to the deep sleep stage for the object;

[0012] is the Markov model transition probability from the deep sleep stage to the REM stage for the object;

[0013] Wherein, the following formula is used to determine the intervention priority score:

[0014]

[0015] Wherein, is for the th daytime rehabilitation training goal at The dynamic weight at a moment, whose initial value is preset in advance and is dynamically updated using a pre-trained reinforcement learning model; M is the total number of daily rehabilitation training targets;

[0016] For the th daily rehabilitation training target, the repair priority preset according to the lesion location of the object;

[0017] For the th daily rehabilitation training, the feedback gain preset in advance, which is used to mark the physiological feedback after intervention, where:

[0018]

[0019] Is a predetermined adjustment coefficient, Is the power change of the wave in the EEG signal after the predetermined intervention duration, Is the change in the root mean square value of the EMG after the predetermined intervention duration, and the initial value of the feedback gain is preset;

[0020] Is the stability score at time t;

[0021] Is the d-state decay coefficient at time t, which is used to mark the influence of the sustainable duration of the current deep sleep period on the intervention effect, where:

[0022]

[0023] Among them, Is the state decay coefficient at time t, Is the predetermined decay rate, Is the duration of the current deep sleep period, Is the current stability score, Is the predetermined individual baseline stability score of the object.

[0024] Preferably, for the system for assisting rehabilitation during sleep, the dynamic weight is dynamically updated using the proximal policy optimization algorithm, where:

[0025]

[0026] Among them, For the th daily rehabilitation training target, the dynamic weight at time; Is the learning rate adopted in reinforcement learning; For the daily rehabilitation training target The actual effect obtained after the intervention; For the reinforcement learning model for the day rehabilitation training target The predicted effect obtained.

[0027] Preferably, the system for assisting rehabilitation during sleep, after activating the intervention operation, further includes adjusting the intensity and / or mode of the intervention according to the physiological feedback of the subject, wherein: when the acquired physiological signals indicate that the current subject is about to wake up or is already in the light sleep stage, adjust or pause the intervention operation, and the physiological signals include: one or more of the electroencephalogram signal, the heart rate and respiration signal, the electromyogram change signal, and the body movement signal; when the acquired physiological signals indicate that the current heart rate or electroencephalogram of the subject is abnormal, adjust the intervention parameters; the adjusting the intervention parameters includes: reducing the intervention intensity or changing the intervention excitation mode; when the acquired physiological signals indicate that the current state of the subject meets the predetermined stability condition, maintain the current intervention operation or increase the intervention intensity within a predetermined range.

[0028] Preferably, the system for assisting rehabilitation during sleep, after using the deep learning model to determine the current sleep stage of the subject and before calculating the stability score, further includes triggering the deep learning model to re-determine the current sleep stage when at least one of the following conditions is met:

[0029] a. The ratio of the low-frequency component to the high-frequency component of the heart rate variability HRV is greater than or equal to a predetermined ratio threshold; b. The body movement frequency is greater than a predetermined frequency threshold; c. The number of apnea or hypopnea events per hour RDI is greater than or equal to a predetermined number threshold .

[0030] Preferably, the system for assisting rehabilitation during sleep, further includes adjusting the , or in the stability score when one or more of the conditions a, b, or c are met, wherein:

[0031] When the condition a is met,

[0032] The adjusted ,

[0033] wherein, is a predetermined first HRV gain coefficient, is the predetermined normal value of the current subject;

[0034] The adjusted

[0035] wherein, is a predetermined second HRV gain coefficient;

[0036] When the condition c is satisfied,

[0037] Adjusted

[0038] wherein, is a predetermined respiratory gain coefficient;

[0039] Adjusted

[0040] wherein, is a predetermined first attenuation coefficient;

[0041] Adjusted ;

[0042] wherein, is a predetermined second attenuation coefficient.

[0043] Preferably, for the system for assisting rehabilitation during sleep, the intervention operation includes applying a specified type of stimulus to one or more parts of the subject at a specified intensity and frequency.

[0044] On the other hand, there is also provided a method for assisting rehabilitation during sleep implemented using the system for assisting rehabilitation during sleep described in any of the above, including: obtaining an electroencephalogram signal of the subject using an electroencephalogram monitoring component;

[0045] obtaining a heart rate and a respiratory signal of the subject using a heart rate and respiratory monitoring component; obtaining an electromyogram change signal of the subject using an electromyogram monitoring component; obtaining a body movement signal of the subject using a body movement monitoring component; the body movement signal includes: the body movement frequency and the body movement amplitude of the subject; when the intervention component is activated, performing a predetermined intervention operation on the subject using the intervention component; using a control component to perform the following steps: receiving in real time the electroencephalogram signal, the heart rate and respiratory signal, the electromyogram change signal, and the body movement signal; performing signal feature extraction and time series analysis on the received electroencephalogram signal, heart rate and respiratory signal, electromyogram change signal, and body movement signal using a pre-trained deep learning model, and determining the current sleep stage of the subject according to the results of the signal feature extraction and time series analysis; wherein, the sleep stage includes: deep sleep stage, light sleep stage, rapid eye movement stage, and wakefulness stage; when the current sleep stage is the deep sleep stage, determining an intervention priority score according to the subject's daytime rehabilitation training goal, the lesion location of the subject, and the stability score of the current deep sleep stage, wherein different daytime rehabilitation training goals have predetermined weights; when the intervention priority score is greater than or equal to a predetermined threshold, the subject is currently in the deep sleep stage, and the stability of the current deep sleep stage meets a predetermined stability condition, activating the intervention component corresponding to the daytime rehabilitation training goal with the highest weight in the daytime rehabilitation training goals;

[0046] Among them, the following formula is used to calculate the stability score:

[0047] ;

[0048] Among them, is the Markov model transition probability from the deep sleep stage to the awakening stage of the object;

[0049] is the Markov model transition probability from the deep sleep stage to the deep sleep stage of the object;

[0050] is the Markov model transition probability from the deep sleep stage to the rapid eye movement stage of the object;

[0051] Among them, the following formula is used to determine the intervention priority score:

[0052]

[0053] Among them, is the dynamic weight at time for the th daytime rehabilitation training goal, whose initial value is preset and dynamically updated using a pre-trained reinforcement learning model; M is the total number of daytime rehabilitation training goals; is the repair priority preset according to the lesion location of the object for the th daytime rehabilitation training goal; is the feedback gain preset for the th daytime rehabilitation training, used to indicate the physiological feedback after intervention, where:

[0054]

[0055] is a predetermined adjustment coefficient, is the change in the power of the wave in the electroencephalogram signal after the preset intervention duration, is the change in the root mean square value of the electromyogram after the preset intervention duration, and the initial value of the feedback gain is preset; is the stability score at time ; is the state decay coefficient at time , used to indicate the impact of the sustainable duration of the current deep sleep stage on the intervention effect, where:

[0056]

[0057] Among them, is the state decay coefficient at time t, is the predetermined decay rate, is the duration of the current deep sleep period, is the current stability score, is the predetermined individualized baseline stability score of the subject.

[0058] Preferably, for the method of assisting rehabilitation during sleep, the dynamic weight is dynamically updated using the following formula:

[0059]

[0060] where, is the dynamic weight for the th daytime rehabilitation training goal at time ; is the learning rate adopted in reinforcement learning; is the actual effect obtained after intervention for the daytime rehabilitation training goal ; is the predicted effect obtained by the reinforcement learning model for the daytime rehabilitation training goal ;

[0061] Preferably, for the method of assisting rehabilitation during sleep, after activating the intervention operation, it further includes adjusting the intensity and / or mode of the intervention according to the physiological feedback of the subject, where: when the acquired physiological signals indicate that the current subject is about to wake up or is already in the light sleep stage, adjust or suspend the intervention operation, and the physiological signals include: one or more of the electroencephalogram signal, the heart rate and respiration signal, the electromyogram change signal, and the body movement signal; when the acquired physiological signals indicate that the current heart rate or electroencephalogram of the subject is abnormal, adjust the intervention parameters; the adjusting the intervention parameters includes: reducing the intervention intensity or changing the intervention excitation mode; when the acquired physiological signals indicate that the current state of the subject meets the predetermined stability condition, maintain the current intervention operation or increase the intervention intensity within a predetermined range.

[0062] Preferably, for the method of assisting rehabilitation during sleep, after using the deep learning model to determine the current sleep stage of the subject and before calculating the stability score, it further includes triggering the deep learning model to re-determine the current sleep stage and / or adjust the stability score when at least one of the following conditions is met , or :

[0063] a. The ratio of the low-frequency component to the high-frequency component of the heart rate variability HRV is greater than or equal to a predetermined ratio threshold;

[0064] b. The body movement frequency is greater than a predetermined frequency threshold;

[0065] c, the number of apnea or hypopnea events per hour, the RDI, is greater than or equal to a predetermined number threshold ;

[0066] Among them, in the adjusted stability score , or The steps of include:

[0067] When the condition a is satisfied,

[0068] The adjusted ,

[0069] Among them, is a predetermined first HRV gain coefficient, is the predetermined normal value of the current object;

[0070] The adjusted

[0071] Among them, is a predetermined second HRV gain coefficient;

[0072] When the condition c is satisfied,

[0073] The adjusted

[0074] Among them, is a predetermined respiratory gain coefficient;

[0075] The adjusted

[0076] Among them, is a predetermined first attenuation coefficient;

[0077] The adjusted ;

[0078] Among them, is a predetermined second attenuation coefficient.

[0079] The above technical solution has the following technical effects:

[0080] The technical solution of the embodiment of the present invention can avoid and more safely identify the best intervention timing by using the stability score and calculating the intervention priority score, ensuring that the intervention does not affect the normal sleep of the object; moreover, by combining with the daytime training goal, it can form an effective connection with the daytime rehabilitation treatment, effectively utilize the peak of nocturnal neuroplasticity, accelerate the repair of neural circuits, and may significantly shorten the rehabilitation cycle, thereby realizing personalized intervention for the object; in a further embodiment, by real-time monitoring of physiological feedback during the intervention execution, timely adjusting or stopping the stimulation, ensuring the safety and comfort of the intervention.

[0081] The technical solution of the embodiment of the present invention is particularly applicable to: (1) Motor function recovery after stroke: For patients with hemiplegia or local dysfunction, assist them in enhancing the solidification of motor skills at night; (2) Other nerve injury scenarios: Such as traumatic brain injury, spinal cord injury, Parkinson's disease, etc. can also refer to this technical path and customize the stimulation plan according to the specific disease characteristics. Of course, it can also be applied to other rehabilitation goals that can perform day-night linkage. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 It is a schematic structural diagram of a system for assisting rehabilitation during sleep according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0083] To further illustrate the embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, those of ordinary skill in the art should be able to understand other possible implementation manners and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are usually used to represent similar components.

[0084] The present invention will be further described below in conjunction with the drawings and specific embodiments.

[0085] Embodiment 1:

[0086] Figure 1 It is a schematic structural diagram of a system for assisting rehabilitation during sleep according to an embodiment of the present invention. As Figure 1 , the system for assisting rehabilitation during sleep in this embodiment includes:

[0087] An electroencephalogram (EEG) monitoring component for acquiring the EEG signal of an object; In a specific implementation, the EEG monitoring component is an EEG sensor; For example, it can be a head-mounted or helmet-mounted device for collecting the brain activity of an object such as a patient at night to distinguish different sleep stages of the rehabilitation object through the acquired EEG signal, such as light sleep, deep sleep, and rapid eye movement (REM) stage; In a further implementation, it also includes a preamplifier for filtering and preliminarily amplifying the weak EEG signal to reduce environmental noise; For example, an 8-16 channel EEG can better capture the activities in typical frequency bands such as δ, θ, α, and β during night sleep; A low-noise amplification chip is provided at the node and integrated with skin contact detection to ensure signal stability during long-term wearing; The EEG monitoring component transmits data to the control component in real time through a wired or wireless protocol such as Bluetooth Low Energy, Wi-Fi for corresponding processing or calculation;

[0088] A heart rate and respiration monitoring component for obtaining the heart rate and respiration signals of an object; in a specific implementation, the heart rate and respiration monitoring component includes a chest strap sensor or a mattress pressure monitoring device to obtain information on the heart rate and respiration rate of the object, and this information can be used to assist in determining the sleep stage of the object in subsequent sleep staging and to assist in judging the safety of intervention; in a specific implementation, this component makes precise measurements of the RR interval through a heart rate variability acquisition circuit and obtains a heart rate variability (HRV) index; further, information such as heart rate and blood oxygen saturation can also be obtained through a chest strap or a finger clip sensor to assist in determining deep sleep and rapid eye movement sleep; the heart rate and respiration monitoring component sends the obtained relevant heart rate and respiration signals to the control component for it to judge the sleep stage and / or sleep stability, and when apnea or a sudden change in heart rate occurs, issue a safety alarm or suspend the intervention such as suspending the stimulation;

[0089] An electromyogram monitoring component for obtaining the electromyogram change signals of an object; in a specific implementation, the electromyogram monitoring component is implemented as an electromyogram and body movement sensor, such as surface electromyogram electrodes pasted on the affected side or key muscle groups to collect weak electromyogram changes; the electromyogram change signals can be used to identify whether abnormal spasms or high muscle tension occur;

[0090] A body movement monitoring component for obtaining the body movement signals of an object; the body movement signals include: the body movement frequency and body movement amplitude of the object; in a specific implementation, the body movement of the object is detected by a triaxial accelerometer placed on the mattress or the belt, such as the turning over situation of the object, such as the turning over frequency and body movement amplitude; the body movement signals can be used by the control component to assist in judging whether the object is awakened by the intervention or whether discomfort occurs, and when these situations occur, suspend the intervention to avoid interrupting sleep;

[0091] An intervention component for performing a predetermined intervention operation on the object when activated; in a specific implementation, the intervention component is a multi-modal stimulation module, including: transcranial magnetic stimulation, microcurrent stimulation, an audio playback device or a mild vibration device, etc., for applying moderate external stimulation during specific periods at night to strengthen neural pathways; for example, it includes: (1) a transcranial magnetic stimulation coil: fitting to a specific position on the head for low-intensity regulation of the cerebral cortex; (2) a microcurrent or transcranial electrical stimulation patch: providing low-intensity electrical stimulation near the head or the affected limb; (3) an audio output device: such as a bone conduction headphone or a pillow speaker to play audio associated with rehabilitation training; (4) other sensory stimulations: optionally, light vibration, aromatherapy, etc. can be selected to strengthen specific memory pathways.

[0092] A control component for:

[0093] Receiving in real time the electroencephalogram signal, the heart rate and respiration signals, the electromyogram change signals and the body movement signals;

[0094] Use a pre-trained deep learning model to extract signal features and perform time series analysis on the received EEG signals, heart rate and respiratory signals, EMG change signals, and body movement signals, and determine the current sleep stage of the object according to the results of signal feature extraction and time series analysis; wherein, the sleep stages include: deep sleep stage, light sleep stage, rapid eye movement stage, and wakefulness stage;

[0095] When the current sleep stage is the deep sleep stage, determine the intervention priority score according to the object's daytime rehabilitation training goal, the location of the object's lesion, and the stability score of the current deep sleep stage, wherein different daytime rehabilitation training goals have predetermined weights;

[0096] When the intervention priority score is greater than or equal to a predetermined threshold, the object is currently in the deep sleep stage, and the stability of the current deep sleep stage meets the predetermined stability condition, activate the intervention component corresponding to the daytime rehabilitation training goal with the highest weight in the daytime rehabilitation training goal;

[0097] Among them, the following formula is used to calculate the stability score:

[0098] ;

[0099] Among them, is the Markov model transition probability of the object from the deep sleep stage to the wakefulness stage;

[0100] is the Markov model transition probability of the object from the deep sleep stage to the deep sleep stage;

[0101] is the Markov model transition probability of the object from the deep sleep stage to the rapid eye movement stage;

[0102] Among them, the following formula is used to determine the intervention priority score:

[0103]

[0104] Among them, is for the th daytime rehabilitation training goal at time, its initial value is preset in advance and dynamically updated using a pre-trained reinforcement learning model; M is the total number of daytime rehabilitation training goals;

[0105] is the repair priority preset according to the location of the object's lesion for the th daytime rehabilitation training goal;

[0106] is for the A pre-set feedback gain for daytime rehabilitation training, used to indicate the physiological feedback after intervention, where:

[0107]

[0108] is a pre-determined adjustment coefficient, is the power change of the wave in the EEG signal after the pre-determined intervention duration, is the change in the root mean square value of the EMG after the pre-determined intervention duration, and the initial value of the feedback gain is pre-set;

[0109] is the stability score at time t;

[0110] is the d-state decay coefficient at time t, used to indicate the impact of the sustainable duration of the current deep sleep period on the intervention effect, where:

[0111]

[0112] Among them, is the state decay coefficient at time t, is the pre-determined decay rate, is the duration of the current deep sleep period, is the current stability score, is the pre-determined individualized baseline stability score of the subject.

[0113] The control component is used to receive the multi-source physiological data of the subject in real time, identify the sleep stage and state of the subject, and accelerate nerve repair through stimulation such as multi-modal stimulation intervention at an appropriate time. The control component is not only used for efficient synchronous acquisition of the corresponding sensor data, but also includes real-time feedback of intelligent analysis, intervention decision-making, and execution control.

[0114] In a further implementation, the above system further includes: a human-computer interaction and data storage component, used to implement human-computer interaction and store relevant data, such as the data generated by the system and the initial data pre-set and input.

[0115] In a specific implementation, the human-computer interaction and data storage component includes: (1) a display terminal or a mobile application device: for medical staff or the patient himself / herself to view the results of night intervention and sleep stage charts; (2) a storage medium: a local SD card or a cloud database, used to save detailed physiological records and intervention logs. Medical staff can use this module to view the intervention details and compare with the training evaluation of the next day with one key, and can use long-term data to fine-tune the rehabilitation strategy or conduct big data research and analysis; further, medical staff can modify the intervention threshold, priority calculation rules or pause / emergency stop commands through this module; and automatically push alarm information to the interface when the security mechanism of the system is triggered for alarm.

[0116] Embodiment 2:

[0117] In a specific implementation, the control component includes a processor and a memory, and a computer program for implementing the above corresponding control and algorithms is stored in the memory. In this embodiment, a specific implementation of the control component in the system of the embodiment of the present invention is elaborated in detail from both the hardware and software levels.

[0118] 1. Hardware level

[0119] (1) Embedded processor or integrated MCU

[0120] In one implementation, the control component includes a high-performance embedded processor or an integrated microcontroller unit (MCU) as the core processing unit; among them, the selection of the embedded processor needs to have sufficient computing power to process the data streams from multiple sensors and perform real-time calculations and decisions through efficient algorithms.

[0121] Multi-channel analog-to-digital converter (ADC): The system needs to support high-precision analog signal acquisition, so the embedded processor needs to integrate a multi-channel ADC module. The role of the ADC is to convert the analog signals collected from sensors such as electroencephalogram, heart rate, respiration, and electromyogram into digital signals for subsequent processing. The multi-channel ADC supports multiple sensors to work simultaneously and can ensure the synchronization and accuracy of data acquisition. The sampling rate of each ADC channel should be able to meet the requirements of real-time monitoring and should be at least 100Hz per second.

[0122] High-speed communication interface: To ensure high-speed and stable data transmission, the system has multiple high-speed communication interfaces, such as UART, SPI, I2C, Bluetooth, and Wi-Fi, etc. These interfaces not only support the real-time transmission of sensor data but also can exchange data with the cloud platform or other medical devices to ensure the efficient cooperation of the system. For long-term running devices, low-power modes and intelligent regulation should also be supported to reduce energy consumption and extend the service life of the device.

[0123] (2) Redundant safety design

[0124] Considering that the device needs to operate at night for a long time and is crucial for the acquisition and intervention process of physiological data of objects such as patients, the control component adopts a redundant safety design to improve the stability and reliability of the system. Watchdog timer: The watchdog timer built into the control component is used to monitor the health status of the system. Once the system experiences deadlocks or unresponsive situations, the timer will automatically reset to ensure that the system can resume normal operation. The watchdog timer ensures that the system can prevent unexpected shutdowns caused by software or hardware failures during night operations. Circuit protection mechanism: The system is designed with multiple circuit protection mechanisms, including overvoltage protection, overcurrent protection, and over-temperature protection, etc. These protection mechanisms can prevent system damage caused by unstable voltage, abnormal current, or excessive temperature, ensuring that the device can work in a long-term and stable environment.

[0125] 2. Software level

[0126] The control component realizes data fusion, sleep staging, intervention priority evaluation, and closed-loop control strategies through a computer program, i.e., software, set in the memory; through efficient algorithms, it can intelligently judge the intervention timing, adjust intervention parameters in real time, and achieve the best rehabilitation effect.

[0127] (1) Real-time data fusion and sleep staging

[0128] The system analyzes multi-modal signals such as electroencephalogram (EEG), heart rate, respiration, and electromyogram in real time to identify and distinguish different sleep stages of patients, including light sleep, deep sleep, and rapid eye movement (REM) stage. For this purpose, the system adopts advanced deep learning models, such as the combination of convolutional neural network (CNN) and long short-term memory network (LSTM) or Transformer model, for signal feature extraction and time series analysis.

[0129] Signal feature extraction: The power changes of different frequency bands in the EEG signal, such as δ wave, θ wave, α wave, and β wave, can reflect different sleep stages; information such as the frequency changes of heart rate and respiration and the activity of electromyogram also provides important bases for sleep states; through CNN, the system can automatically extract key features from the original data and construct feature vectors.

[0130] Sleep staging: Based on the pre-selected deep learning model, the system can extract time series features from multiple modal signals and comprehensively analyze the time-varying characteristics of these signals; combined with the LSTM network, the system can effectively process time series data and achieve accurate staging of sleep stages; this model can not only efficiently distinguish different sleep states such as deep sleep, light sleep, and rapid eye movement stage, but also quantify the stability of sleep, providing a reliable basis for intervention decisions.

[0131] (2) Intervention priority evaluation

[0132] Intervention priority assessment is a key step in determining whether to activate the intervention module. Using the calculation method described in Example 1, the program module implementing this function calculates the intervention priority score according to the patient's daytime rehabilitation training goals, lesion location, and stability of the current sleep stage.

[0133] Daytime rehabilitation training label: Each patient's daytime rehabilitation plan will be personalized according to their specific condition and treatment goals, such as upper limb grasping, lower limb weight-bearing, etc.; the system will assign different intervention weights according to the patient's daytime rehabilitation goals, so that the system will give priority to the patient's weak areas or motor pathways that need to be strengthened during intervention.

[0134] Sleep stage stability: When the patient is in deep sleep, neuroplasticity is strongest and the effect of external intervention on synaptic repair is most obvious. Therefore, the system will evaluate the stability of the current sleep stage based on the sleep staging results. Only when the sleep stage is stable and meets the intervention criteria will the system activate the multimodal stimulation module.

[0135] Intervention priority determination: The system will combine the daytime rehabilitation training label and the stability of the current sleep stage to calculate the intervention priority score through an algorithm. When the score exceeds the set threshold and the patient is in a stable deep sleep stage, the system will activate the intervention module for stimulation.

[0136] (3) Closed-loop control strategy

[0137] Closed-loop control is designed to ensure adaptability and safety during intervention. The system monitors the patient's physiological feedback in real time and automatically adjusts the intensity and mode of intervention based on the feedback.

[0138] Physiological feedback monitoring: The system continuously monitors physiological signals such as EEG, heart rate, and electromyography to detect the patient's signs of awakening in a timely manner. For example, when there is an increase in alpha waves in the EEG signal, or a sudden increase in heart rate, it may mean that the patient is about to wake up or is already in a light sleep stage. The system can respond to these signals and adjust or suspend intervention.

[0139] Adaptive intervention adjustment: Once the system detects that the intervention effect is poor or there is a risk of awakening, such as abnormal heart rate or EEG, the system will immediately adjust the intervention parameters, reduce the stimulation intensity or change the stimulation mode to avoid the intervention interfering with the patient's normal sleep. Conversely, if the system detects that the patient's physiological signals are stable and the intervention effect is good, the stimulation intensity can be maintained or moderately increased.

[0140] The rehabilitation system of this embodiment of the present invention improves the effect of rehabilitation treatment by selecting the best intervention timing. Specifically, the system first detects whether the subject is currently in the "deep sleep stage" or the "rapid eye movement stage". If so, it continuously observes and confirms whether the subject remains in this state for a predetermined duration, such as dozens of seconds or minutes, to confirm the stability of the subject in the deep sleep or rapid eye movement stage. When the current sleep state is stable, combined with the intervention priority evaluation score, for a certain movement or brain area with a higher repair requirement, the corresponding intervention is triggered. Finally, through the real-time data feedback mechanism, the patient's state is continuously judged after the intervention starts to ensure that while generating intervention gains, the core sleep structure is not damaged.

[0141] In a further implementation, when the intervention component is triggered to perform an intervention such as stimulation: (1) The start and end times, intensity levels, and types of each stimulation are recorded in real time and sent back to the control component for closed-loop iteration; (2) Multiple stimulations may be rotated or superimposed according to different stages on the same night to achieve the maximum consolidation effect.

[0142] Next, in one implementation of the embodiment of the present invention, the steps of the control component for realizing the preliminary determination of the sleep stage, that is, sleep staging, the evaluation of sleep stability, the calculation of intervention priority, the processing of triggering intervention and closed-loop monitoring, and cross-night iteration and long-term optimization are described in detail.

[0143] (I) Preliminary determination of sleep staging (accelerated by integrating edge computing)

[0144] 1. Step description:

[0145] (1) Multimodal data collection: After the subject, such as the patient, falls asleep, the system collects data in real time through electroencephalogram (EEG), heart rate, respiration, electromyogram, and body movement sensors. The analysis window is shortened to a predetermined duration, such as 15 seconds, and low-latency processing can be achieved through FPGA hardware acceleration.

[0146] (2) Deep learning model optimization: The spatio-temporal convolutional network (ST-CNN) is combined with the Transformer model to synchronously extract the EEG frequency domain features (δ / θ / α wave power ratio), heart rate variability (HRV), and respiratory rhythm, and output the probability values of each sleep stage, such as light sleep N1, deep sleep N3, REM stage, etc.

[0147] (3) Rapid confirmation of the deep sleep stage: If the probability of the deep sleep stage > 85% and the determination is consistent in two consecutive windows, it is marked as a candidate intervention stage.

[0148] 2. Advantages and effects:

[0149] (1)FPGA edge computing reduces the data processing delay to <20ms, meeting the real-time requirements. (2)The spatio-temporal convolutional network improves the ability to capture the temporal correlation of multimodal signals, and the staging accuracy is increased by 12%.

[0150] (2)Implementing sleep stability evaluation based on Markov models such as Markov chain models

[0151] 1. Step description:

[0152] (1)State transition probability modeling: Construct a Markov chain model for sleep stages to dynamically calculate the stability of the deep sleep period; when the predetermined full score is 100, the scoring range is 0 - 100, and the higher the value, the more stable the current deep sleep stage; for example, 0 indicates extremely unstable, and 100 indicates highly stable;

[0153] ;

[0154] In a specific implementation, the value range of the Markov model transition probability is:

[0155] : 70% - 95%, which is the baseline for healthy people;

[0156] : 1% - 20%, among which, patients with respiratory disorders may rise to 20%;

[0157] : <10%, among which, healthy people are usually <5%.

[0158] (2)Multimodal verification: Combine real-time physiological indicators to verify stability; in a specific implementation, when the physiological indicators meet the following conditions, it indicates that the subject is currently in a relatively stable deep sleep period: the preset ratio threshold of LF / HF of HRV is 0.5, when LF / HF < 0.5, the parasympathetic nerve dominates, indicating that the deep sleep characteristics are met; body movement frequency: the number of body movements within 5 minutes ≤ 1 time; respiratory disturbance index (RDI, Respiratory Disturbance Index): <5 times / hour, when this indicator meets this condition, the interference of apnea is excluded.

[0159] 2. Advantages and effects: The Markov model quantifies the risk of sleep stage transition, avoiding the subjectivity of static thresholds. Cross-verification of multiple indicators reduces the misjudgment rate, and the stability scoring error is reduced to ±5%.

[0160] (3)Calculation of intervention priority

[0161] 1. Step description:

[0162] (1)Core formula (dynamic priority score):

[0163] Intervention priority score = Σ(dynamic weight × repair priority × feedback gain) + sleep stability score × state decay coefficient; It is represented by the following formula:

[0164]

[0165] is the th daytime rehabilitation training goal, and M is the total number of daytime rehabilitation training goals considered in the rehabilitation system; For different daytime rehabilitation training goals, corresponding are allocated in advance, is a natural number; t is the corresponding moment;

[0166] (2) Dynamic weight is the weight allocated for different daytime rehabilitation training goals, whose initial value is preset in advance and is dynamically updated using a pre-trained reinforcement learning model such as through the Proximal Policy Optimization (PPO) algorithm;

[0167]

[0168] Among them:

[0169] Among them, is the weight for the daytime rehabilitation training goal at time t; is the weight for the daytime rehabilitation training goal at time t - 1; is a specific implementation of the learning rate adopted in reinforcement learning. The initial value is 0.1, and its value is optimized through cross-validation; is the actual effect obtained after intervention for the daytime rehabilitation training goal . In a specific implementation, the daytime rehabilitation training goals include: grip strength improvement rate; is the predicted effect obtained by the reinforcement learning model for the daytime rehabilitation training goal ;

[0170] (3) Repair priority is a parameter preset according to the lesion location of the object, indicating the urgency of nerve repair. In one implementation, for example, for the lesion of the motor cortex , for the lesion of the hippocampal region ;

[0171] (4) Feedback gain is used to indicate the physiological feedback after intervention, where:

[0172]

[0173] For the feedback gain targeted at the daytime rehabilitation training goals is a predetermined adjustment coefficient, is the power change of the wave in the EEG signal after the predetermined intervention duration, and is the change in the root mean square value of the EMG after the predetermined intervention duration. The initial value of the feedback gain is preset. In a specific implementation, within the predetermined duration after the intervention, such as within 10 seconds, if the EEG δ wave power ↑ (increases) and the root mean square (RMS) value of the EMG ↑ (increases), it is normalized to 0.8 - 1.2;

[0174] (5) The state attenuation coefficient is also called the stability attenuation coefficient ): Dynamically reflects the potential impact of the current duration of the deep sleep period on the intervention effect:

[0175]

[0176] Among them, is the state attenuation coefficient at time t, is the predetermined attenuation rate, is the duration of the current deep sleep period, is the current stability score, is the predetermined individual baseline stability score of the subject; In a specific implementation, The unit of is minutes; is defaulted to 0.05, and its value can be optimized by fitting historical data; For example, the average value of the stability scores in the recent 7 days can be taken. In a specific implementation,

[0177] (6) Calculation example:

[0178] Assume that the current deep sleep period has lasted for 6 minutes (Δt = 6), the baseline stability score is 80, the current score is 85, and λ = 0.05:

[0179]

[0180] Function: As the deep sleep period lengthens, the attenuation coefficient gradually decreases, avoiding excessive intervention at the end of the sleep stage because the risk of awakening increases at this time.

[0181] (7) Total score determination logic:

[0182] Decision Threshold: If the priority score > the predetermined priority score threshold, intervention is triggered; wherein, this threshold is configurable according to individual circumstances. Exemplarily, this threshold is 6500.

[0183] Multi-objective Competition: When multiple rehabilitation goals, such as upper limb grasping and memory training, simultaneously meet the threshold, the goal with the highest score is selected for priority intervention.

[0184] (4) Triggering Intervention and Closed-loop Monitoring;

[0185] When the acquired physiological signals indicate that the current subject is about to wake up or is already in the light sleep stage, adjust or suspend the intervention operation. The physiological signals include one or more of the following: the electroencephalogram signal, the heart rate and respiratory signal, the electromyogram change signal, and the body movement signal;

[0186] When the acquired physiological signals indicate that the subject's current heart rate is abnormal or the electroencephalogram is abnormal, adjust the intervention parameters; the adjustment of the intervention parameters includes: reducing the intervention intensity or changing the intervention excitation mode;

[0187] When the acquired physiological signals indicate that the subject's current state meets the predetermined stability conditions, maintain the current intervention operation or increase the intervention intensity within a predetermined range.

[0188] In one implementation, closed-loop monitoring is achieved by integrating real-time feedback gain;

[0189] 1. Step Description:

[0190] (1) Dynamic Stimulation Intensity Adjustment:

[0191]

[0192] is the base intensity preset according to the patient's tolerance;

[0193] is the mean value of the feedback gain within a predetermined time range acquired recently, which can be used to smooth abnormal fluctuations.

[0194] (2) Termination Conditions, where any one of the predetermined termination conditions is met to suspend the intervention; among them, the termination conditions include:

[0195] The proportion of the power of the α wave in the EEG > the predetermined percentage. When it is greater than this predetermined percentage, it indicates that the subject shows signs of awakening. Preferably, this predetermined percentage is 30%; according to individual circumstances, the value of this predetermined percentage can be adjusted;

[0196] The ratio of low frequency component / high frequency component of heart rate variability (LF / HF) > 1.0, which indicates the activation of the sympathetic nerve of the subject when this condition is met; the above 1.0 is a predetermined ratio threshold, and according to the individual situation, this ratio threshold can be adaptively adjusted;

[0197] The body movement frequency is ≥ 3 times within 1 minute, and 3 times is a predetermined number threshold, and according to the individual situation, this number threshold can be adaptively adjusted.

[0198] 2. Advantages and effects:

[0199] Dynamically adjust the stimulation intensity through the feedback gain to avoid excessive stimulation caused by fixed parameters;

[0200] Integrate multi-modal termination conditions to improve the intervention safety. For example, based on clinical simulation data, it can be improved by 37%.

[0201] (V) Cross-night iteration and long-term optimization

[0202] 1. Step description:

[0203] (1) Closed-loop of night data: Record the key parameters (score, attenuation coefficient, feedback gain) after each intervention, and update the parameters (α, λ) of the reinforcement learning model through Bayesian optimization.

[0204] (2) Integration of daytime rehabilitation feedback: Associate the training effect of the next day with the night intervention, and dynamically adjust the target weight ( ) and the repair priority ( ).

[0205] (3) Example: If the daytime improvement rate of upper limb grasping < 5% after 3 consecutive night interventions, the system automatically reduces its weight ( ↓) and increases the target priority of the lower limb.

[0206] 2. Advantages and effects: This loop mechanism enables the present invention to flexibly respond to the sleep changes of the patient, ensuring full utilization of the nerve repair peaks in the deep sleep and REM periods during the whole night's sleep. Through multiple iterations and optimizations, the system can continuously improve the intervention strategy during the whole rehabilitation cycle to maximize the rehabilitation effect.

[0207] In a specific implementation, after using the deep learning model to determine the current sleep stage of the subject and before calculating the stability score, it further includes triggering the deep learning model to re-determine the current sleep stage and / or the , or of the overall stability score when at least one of the following conditions is met:

[0208] a. The ratio of the low-frequency component / high-frequency component of the heart rate variability HRV is greater than or equal to a predetermined ratio threshold;

[0209] b. The body movement frequency is greater than a predetermined frequency threshold;

[0210] c. The number of apnea or hypopnea events per hour, RDI, is greater than or equal to a predetermined number threshold ;

[0211] Among them, in adjusting the stability score , or The steps include:

[0212] When the condition a is satisfied,

[0213] The adjusted ,

[0214] Among them, is a predetermined first HRV gain coefficient, is the predetermined normal value of the current object;

[0215] The adjusted

[0216] Among them, is a predetermined second HRV gain coefficient;

[0217] When the condition c is satisfied,

[0218] The adjusted

[0219] Among them, is a predetermined respiration gain coefficient;

[0220] The adjusted

[0221] Among them, is a predetermined first attenuation coefficient;

[0222] The adjusted ;

[0223] Among them, is a predetermined second attenuation coefficient.

[0224] Among them, when the conditions a and c are satisfied simultaneously, the adjusted

[0225] .

[0226] Example 3:

[0227] Taking a cerebral infarction patient as an example, the following details the specific process of the priority score during the rehabilitation process using the system or method of the embodiment of the present invention.

[0228] I. Patient Background and Parameter Initialization

[0229] 1. Age and Gender: 60-year-old male

[0230] 2. Medical History: Right middle cerebral artery (MCA) stroke, resulting in left-sided hemiplegia, currently in the recovery period.

[0231] 3. Lesion Location: Right motor cortex (upper / lower limb control area) and hippocampal region (memory-related area).

[0232] 4. One of the Daytime Training Goals: Left upper limb grasping training, with a weight of 60%

[0233] 5. Another Daytime Training Goal: Lower limb weight-bearing training, with a weight of 30%

[0234] 6. The Third Daytime Training Goal: New cognitive function goal, short-term memory training, with a weight of 10%;

[0235] The priority score calculation formula for each training goal is the one described in Example 1 or 2 above, which will not be elaborated here. Among them, based on historical rehabilitation effects such as the grasping strength improvement rate, memory task accuracy, and real-time feedback such as EEG synchrony and EMG activation after intervention, the target weights are dynamically updated using reinforcement learning (PPO algorithm).

[0236] II. Step-by-Step Calculation Example

[0237] (I) Step 1: Initial Parameter Loading

[0238] 1. Dynamic Weights of Daytime Goals (Initialization of Reinforcement Learning), as shown in Table 1:

[0239] Table 1:

[0240]

[0241] 2. Other Parameters

[0242] Decay Rate λ: 0.05 (Fitted value of historical data)

[0243] Baseline Stability : 80 (Average value of the stability scores during the deep sleep period in the past 7 days)

[0244] (II) Step 2: Real-Time Data Collection and Processing

[0245] 1. Hardware Acceleration

[0246] FPGA parallel processing is used for multi-modal signals, including EEG, EMG, and body movement, with a total delay < 35ms (after optimization).

[0247] 2. Sleep Stability Calculation

[0248] In this example, set the duration of the current deep sleep period Δt: 4 minutes

[0249] In this example, assume the Markov model outputs:

[0250] - Probability of deep sleep → deep sleep : 88%

[0251] - Probability of deep sleep → wakefulness : 5%

[0252] - Probability of deep sleep → REM : 7%

[0253] Then the stability score :

[0254] Rounded to 95;

[0255] Note: The actual calculation includes HRV and respiratory compensation. The core logic is simplified here for presentation; RDI is a quantitative indicator for evaluating sleep apnea; respiratory compensation is the compensatory response of the human body to maintain ventilation through physiological mechanisms when breathing is obstructed. When considering HRV and respiratory compensation, the corrections to the corresponding probabilities include:

[0256] Adjusted ;

[0257] Adjusted ;

[0258] Adjusted ; where is ;

[0259] For the relationship between the adjusted probability and the original probability before adjustment, refer to the previous calculation formula.

[0260] The following is an example to illustrate the calculation of the stability score before and after correction:

[0261] 1. Original parameters (without correction): , ,

[0262]

[0263] 2. After adding HRV and RDI corrections:

[0264] (1) Decrease in HRV (HRV real-time = baseline × 80%, = 0.5) causes

[0265] ;

[0266] (2) RDI = 6 times per hour ( = 0.5) such that

[0267] ;

[0268] (3) RDI inhibits REM transition (ε = 0.2):

[0269] ;

[0270] (4) For , when HRV decreases, where HRV real - time = baseline × 80%, = 0.3, RDI = 6 times per hour, = 0.1, threshold = 5:

[0271] . Among them, both HRV and RDI affect , and their influence factors are multiplied to obtain the adjusted

[0272] 1. Revised score:

[0273]

[0274] The score drops from 95 to 92.2, reflecting the negative impacts of HRV and respiratory disorders.

[0275] Specifically:

[0276] When HRV↓ or RDI↑, ↑; when HRV↓ or RDI↑, ↓; when RDI↑, ; the above ↑ indicates an increase, and indicates a decrease; Clinical significance: HRV↓: Warning of the risk of sleep fragmentation, triggering a low - stability alarm. For example, when the score < 60, intervention is suspended; RDI↑: Indicating respiratory disorders, inhibiting REM - stage intervention to avoid aggravating the decrease in oxygen saturation. The formula for calculating the stability score using the adjusted Markov probability is as follows:

[0277]

[0278] This correction mechanism enables the system of the embodiment of the present invention to respond to physiological state changes in real - time, further ensuring the safety and effectiveness of intervention.

[0279] The specific content of the calculation including HRV and respiratory compensation will be explained in more detail below.

[0280] (3) Step 3: Dynamic Weight Update (Reinforcement Learning)

[0281] 1. Historical Feedback Data

[0282] Upper limb grasping: The synchronization of the EEG motor area increased by 12% after intervention → actual effect

[0283] Memory training: The memory test score only increased after intervention by

[0284] 2. Weight Update Formula:

[0285] Learning rate α: 0.1 (default value)

[0286] Prediction effect (Based on the model): Upper limb grasping = 10%, Memory training = 8%

[0287] 3. Update Results:

[0288] Weight of upper limb grasping: ; Rounded to 65; In addition, the maximum increase constrained by the system is +5 / period;

[0289] Weight of memory training: ; Rounded to 5, and the minimum weight limit predefined by the system is 5.

[0290] 4. Explanation of System Constraints

[0291] (1) System constraint: Maximum increase limit per cycle. To prevent the system stability from being affected by sudden weight changes, the single-update amplitude is set to ≤5.

[0292] Calculation logic:

[0293] : Weight upper limit, defaulting to 100;

[0294] In the example: 60 + 5 = 65, not reaching the upper limit, so 65 is taken;

[0295] (2) Clinical significance of system constraints: If weight is allowed to increase freely (e.g., 60.2→60), multiple intervention cycles are required to show the effect, delaying the rehabilitation process. By setting the minimum effective increase (+5), it is ensured that the target of significant effect can quickly obtain resource allocation.

[0296] 5. Explanation of Memory Training Weight Update

[0297] (1) Output value of the calculation formula:

[0298] The theoretical calculation result is 9.4, but the final weight is forced to be set to 5.

[0299] (2) Explanation of system constraints. Lower limit of minimum weight: To avoid invalid targets occupying resources, the lower limit of the weight is set to 5.

[0300] Calculation logic:

[0301] Explanation:

[0302] represents the weight value at time point

[0303] represents the weight value at the previous time point

[0304] In the formula, The function is used to take the larger of the two values.

[0305] In the example: 10 - 5 = 5. When the weight decreases by 5 from 10 and becomes 5, since it has reached the minimum weight limit of 5, the weight no longer decreases;

[0306] (3) Clinical significance: The actual effect of memory training (2%) is much lower than the expectation (8%), and resource allocation needs to be quickly reduced. However, to prevent completely abandoning potential needs (such as slight atrophy of the hippocampus), the minimum weight of 5 is retained as an observation window.

[0307] 6. The necessity of system constraint conditions is shown in Table 2 below:

[0308] Table 2

[0309]

[0310] (IV) Step 4: Feedback gain calculation

[0311] 1. Physiological response after intervention:

[0312] Increase in EEG δ-wave power: Δδ = +8% → Normalized value = 0.08 / 0.15 = 0.53, where 0.15 is the maximum expected value based on clinical consensus and clinical data;

[0313] Increase in EMG RMS value: ΔEMG = +15% → Normalized value = 0.15 / 0.20 = 0.75, where 0.20 is the maximum expected value based on clinical consensus and clinical data;

[0314] Feedback gain formula:

[0315] Among them, the adjustable sensitivity parameter (β): allows clinicians to adjust the gain intensity according to the patient type (acute / chronic), and the default value is 0.15. That is, β = 0.15 (default value).

[0316] Calculation:

[0317]

[0318] Note: In this example, there is no recent intervention in lower limb and memory training, and the feedback gains corresponding to lower limb and memory training are defaulted ;

[0319] (V) Step 5: Comprehensive score calculation

[0320] 1. Stability decay coefficient :

[0321]

[0322] 2. Priority score formula:

[0323] 3. Among them, the score calculation for upper limb grasping is:

[0324] (1) Parameter values:

[0325]

[0326]

[0327]

[0328] (2) Calculation formula: Upper limb score = 65×70×1.10 = 5005

[0329] (3) Clinical significance: High weight (65) and high priority (70) indicate that the system allocates major resources to the recovery of upper limb function, meeting the clinical needs of the patient with right motor cortex injury.

[0330] 4. Priority score calculation for memory training

[0331] (1) Parameter values:

[0332]

[0333]

[0334]

[0335] (2) Calculation formula: Memory score = 5×40×1.0 = 200

[0336] (3)Clinical significance: A low weight (5) reflects that the system reduces the intervention for memory training. For example, a low weight is set for memory training due to poor historical effects, but the minimum resources are still reserved to monitor potential needs.

[0337] 5. Calculation of lower limb weight-bearing score

[0338] (1)Parameter value: Weight ; Repair priority ; Feedback gain

[0339] = 1.0 (default value)

[0340] (2)Calculation formula: Lower limb score = 30 × 50 × 1.0 = 1,500

[0341] 6. Calculation of sleep stability gain

[0342] (1)Parameter value:

[0343] Current stability score

[0344] Decay coefficient = 0.972

[0345] (2)Calculation formula: Stability gain = 95 × 0.972 = 92.34

[0346] 7. Total score integration

[0347] Total score = 5005 (upper limb) + 1,500 (lower limb) + 200 (memory) + 92.34 (stability) = 6797.34

[0348] 8. Sub-item calculation, see Table 3 below:

[0349] Table 3

[0350]

[0351] 9. Decision: Threshold = 6,500 → 6797.34 > 6,500, triggering upper limb grasping intervention.

[0352] IV. Direct impact of weight on total score

[0353] 1. High weight (65) of upper limb grasping: After multiplying the weight by the priority (70), the total contribution score accounts for 73.6% (i.e., 5005 / 6797.34), which reflects the resource allocation of the system towards the core rehabilitation goals. 2. Low weight (5) of memory training: Only accounts for 2.9% of the total score (i.e., 200 / 6797.34), reflecting the system's inhibitory strategy towards inefficient goals. 3. Medium weight (30) of lower limb weight-bearing: A secondary goal of balance, accounting for 22.1% of the total score (i.e., 1500 / 6797.34).

[0354] V. Visualization and Clinical Interpretation

[0355] (I) SHAP value analysis: Generate a feature contribution graph to show the quantitative impact of each factor on the score (as shown in Table 4 below):

[0356] Table 4

[0357]

[0358] (II) SHAP (Shapley Additive Explanations) is a model interpretation method based on game theory, and its core is to decompose the model prediction value into the marginal contributions of each feature. The calculation formula is as follows:

[0359]

[0360] 1. Symbol definition:

[0361] : Feature The SHAP value of, indicating the contribution degree of this feature to the model prediction. : The set of all features (such as dynamic weight, repair priority, etc.). : Any subset that does not contain the feature is represented as

[0362] , and the above summation formula represents the summation over all subsets S that do not contain the feature . : The model output value based on the feature subset , such as the intervention priority score. : The factorial of the size of the subset . : The factorial of the total number of features. : Is the factorial of the remaining number of features minus 1, where 1 is subtracted because the feature is excluded. is the weight coefficient, used to fairly allocate the contribution of the feature . : Is the contribution of the feature to the subset Marginal contribution; among which, : The output value of the model after adding feature ; Difference: indicating the contribution increment of feature to the current subset ;

[0363] Example: If the subset has a model score , and the score becomes after adding feature , then the contribution of feature to the subset is . The SHAP formula fairly decomposes the prediction result of the black-box model into the contribution values of each feature by weighted-averaging the marginal contributions of all subsets; it provides an intuitive and mathematically rigorous explanation for medical decisions.

[0364] 2. Definition of model input features, as shown in Table 5 below:

[0365] Table 5

[0366]

[0367] 3. Model output formula:

[0368]

[0369] Note: Only the upper limb grasping item is shown below. The calculation types for other rehabilitation training goals such as lower limbs and memory training are not elaborated here.

[0370] 4. SHAP value calculation method, taking as an example in this case:

[0371] (1) Step 1: Generate all possible feature subsets S. There are 2 5 = 32 combinations in this case.

[0372] Total number of features: There are 5 features in this case, namely , , , and .

[0373] Number of subsets: 2 5 - 1 = 31 (all combinations excluding the current feature W upper limb).

[0374] (2) Step 2: Calculate the feature contribution difference

[0375] Example 1: Subset .

[0376] contains Output at

[0377]

[0378] Does not contain Output at

[0379]

[0380] Difference:

[0381] Example 2: 。

[0382] Contains Output at

[0383]

[0384] Does not contain Output at

[0385]

[0386] Difference:

[0387] is the expected value (historical mean) of

[0388] is the expected value (historical mean) of

[0389] the expected value (historical mean) of the sleep stability score, assuming here 。Calculation method:

[0390]

[0391] Where:

[0392] N : The size of the historical data window, whose value is preset in advance, for example, data for the last 7 days, N = 7.

[0393] : The sleep stability score on the kth day;

[0394] is the expected value of the decay coefficient, i.e., the historical mean. In this example, it is assumed that = 0.95, and the calculation method is:

[0395]

[0396] N : The size of the predetermined historical data window, such as the data for the last 7 days, N = 7.

[0397] is the attenuation coefficient for the th intervention.

[0398] (3) Weighted summation subset weight calculation: For subset with a size of , its weight formula is:

[0399]

[0400] Formula explanation: is the size of subset (i.e., the number of features included in the subset). is the set of all features (Feature Set).

[0401] When = 2 (as in Example 1), the weight is: 2!×(5 - 2 - 1)! / 5! = 2!×2! / 5! = 0.0333

[0402] When = 1 (as in Example 2), the weight is: 1!×(5 - 1 - 1)! / 5! = 1!×3! / 5! = 0.05

[0403] SHAP value calculation:

[0404]

[0405] (4) Average SHAP value and contribution degree

[0406] Generate simulated data: Create 100 groups of data, covering the reasonable ranges of each parameter (such as ).

[0407] Calculate the average contribution degree, as shown in Table 6 below:

[0408] Table 6

[0409]

[0410] Average absolute value:

[0411] Total absolute contribution:

[0412]

[0413] Contribution degree ratio: Contribution degree

[0414] Clinical interpretability: Dynamic weights are dominant, accounting for 48.3%, indicating that the system gives priority to responding to real-time rehabilitation needs. Repair priority is the second, accounting for 31.7%, reflecting the clinical diagnostic value of lesion localization. Feedback gain assistance accounts for 12.1%, verifying the role of physiological signals in assisting decision-making.

[0415] (4) Doctor operation interface: It supports dragging to adjust thresholds, such as reducing the weight of memory training, and the system automatically generates new decision tree branches. The advantages of the system and method of this embodiment of the present invention compared with existing traditional systems and methods include: 1. Dynamic adaptability: The weights and feedback gains are updated in real time, avoiding the problem of "outdated strategies" of static models. 2. Clinical interpretability: SHAP values and decision tree visualization help doctors understand the intervention logic, such as "why upper limb grasping is prioritized". 3. Scalability verification: After adding cognitive rehabilitation labels, the system automatically allocates resources to effective targets, such as weakening ineffective memory stimuli.

[0416] Embodiment 4:

[0417] The present invention also provides a method for assisting rehabilitation during sleep implemented using the above system embodiment, including: obtaining the electroencephalogram signal of an object using an electroencephalogram monitoring component; obtaining the heart rate and respiratory signal of the object using a heart rate and respiratory monitoring component; obtaining the electromyogram change signal of the object using an electromyogram monitoring component; obtaining the body movement signal of the object using a body movement monitoring component; the body movement signal includes: the body movement frequency and body movement amplitude of the object; when the intervention component is activated, performing a predetermined intervention operation on the object using the intervention component; using a control component to perform the following steps: receiving the electroencephalogram signal, heart rate and respiratory signal, electromyogram change signal, and body movement signal in real time; using a pre-trained deep learning model to perform signal feature extraction and time series analysis on the received electroencephalogram signal, heart rate and respiratory signal, electromyogram change signal, and body movement signal, and determining the current sleep stage of the object according to the results of the signal feature extraction and time series analysis; wherein, the sleep stage includes: deep sleep stage, light sleep stage, rapid eye movement stage, and wakefulness stage; when the current sleep stage is the deep sleep stage, determining the intervention priority score according to the object's daytime rehabilitation training target, the location of the object's lesion, and the stability score of the current deep sleep stage; when the intervention priority score is greater than or equal to a predetermined threshold, the object is currently in the deep sleep stage, and the stability of the current deep sleep stage meets the predetermined stability condition, activating the intervention component; wherein, the following formula is used to calculate the stability score:

[0418] ;

[0419] wherein, is the Markov model transition probability of the object from the deep sleep stage to the wakefulness stage;

[0420] The Markov model transition probability for an object from a deep sleep stage to a deep sleep stage;

[0421] The Markov model transition probability for an object from a deep sleep stage to a rapid eye movement stage;

[0422] Among them, the following formula is used to determine the intervention priority score:

[0423] Intervention priority score = Σ(dynamic weight × repair priority × feedback gain) + sleep stability score × state decay coefficient;

[0424]

[0425] Among them, the dynamic weight is the weight assigned for different daytime rehabilitation training goals, whose initial value is preset and dynamically updated using a pre-trained reinforcement learning model; the repair priority is a parameter preset according to the lesion location of the object, indicating the urgency of nerve repair;

[0426] The feedback gain is used to indicate the physiological feedback after intervention, where:

[0427]

[0428] is the feedback gain for the daytime rehabilitation training goal of, is a predetermined adjustment coefficient, is the power change amount of the wave in the electroencephalogram signal after the predetermined intervention duration, is the change amount of the root mean square value of the electromyogram after the predetermined intervention duration, and the initial value of the feedback gain is preset;

[0429] The state decay coefficient is used to indicate the influence of the sustainable duration of the current deep sleep stage on the intervention effect, where:

[0430]

[0431] Among them, is the state decay coefficient at time t, is a predetermined decay rate, is the duration of the current deep sleep stage, is the current stability score, is the predetermined individual baseline stability score of the object.

[0432] Although the present invention is specifically shown and described in combination with preferred embodiments, those skilled in the art should understand that various changes can be made to the present invention in form and detail without departing from the spirit and scope of the present invention defined by the appended claims, and all are within the protection scope of the present invention.

Claims

1. A system for assisting recovery during sleep, characterized in that: include: An EEG monitoring component, used to obtain EEG signals of a subject; A heart rate and respiration monitoring component, used to obtain the heart rate and respiration signals of the subject; An electromyographic monitoring component, used to obtain an electromyographic change signal of a subject; A body motion monitoring component is used to obtain a body motion signal of the subject; the body motion signal includes: the body motion frequency and body motion amplitude of the subject; An intervention component, used to perform a predetermined intervention operation on the object when activated; Control components for: Receiving the EEG signal, the heart rate and breathing signal, the myoelectric change signal and the body movement signal in real time; Using a pre-trained deep learning model, extracting signal features and performing time series analysis on the received EEG signal, the heart rate and breathing signal, the electromyographic change signal, and the body movement signal, and determining the current sleep stage of the subject according to the results of the signal feature extraction and time series analysis; wherein the sleep stage includes: deep sleep, light sleep, rapid eye movement, and wakefulness; When the current sleep stage is a deep sleep period, determining an intervention priority score according to the subject's daytime rehabilitation training goal, the subject's lesion location, and the stability score of the current deep sleep period, wherein different daytime rehabilitation training goals have predetermined weights; When the intervention priority score is greater than or equal to a predetermined threshold, the subject is currently in a deep sleep period, and the stability of the current deep sleep period meets a predetermined stability condition, activating an intervention component corresponding to the daytime rehabilitation training goal with the highest weight among the daytime rehabilitation training goals; The stability score is calculated using the following formula: ; in, is the Markov model transition probability of the subject from deep sleep to wakefulness; is the Markov model transition probability of the subject from deep sleep to deep sleep; is the Markov model transition probability of the subject from deep sleep to REM sleep; The following formula is used to determine the intervention priority score: in, For the The goal of day rehabilitation training is The dynamic weight of each moment, whose initial value is preset and dynamically updated using a pre-trained reinforcement learning model; M is the total number of daytime rehabilitation training targets; For the The daytime rehabilitation training goals and the pre-set repair priorities according to the lesion location of the subject; For the The feedback gain pre-set during the day rehabilitation training is used to indicate the physiological feedback after the intervention, where: is the predetermined adjustment coefficient, After the intervention for a predetermined period of time, the EEG signal The power change of the wave, The initial value of the feedback gain is set in advance as the change in the root mean square value of the electromyography after the predetermined duration of intervention; for Stability score at each moment; for The state attenuation coefficient at the moment is used to indicate the impact of the current deep sleep duration on the intervention effect, where: in, for The state attenuation coefficient at time , is the predetermined decay rate, is the duration of the current deep sleep period, Score the current stability, A predetermined, subject-individualized baseline stability score was given.

2. The system for assisting rehabilitation during sleep according to claim 1, characterized in that: The dynamic weights are dynamically updated using a proximal policy optimization algorithm, where: in, For the day rehabilitation training goals, Dynamic weight of the moment; is the learning rate used in reinforcement learning; To target day rehabilitation training the actual effects achieved after the intervention; The reinforcement learning model is targeted at the day rehabilitation training goal The predicted effect obtained.

3. The system for assisting rehabilitation during sleep according to claim 1, characterized in that: After the intervention operation is activated, the intensity and / or mode of the intervention is adjusted according to the subject's physiological feedback, wherein: When the acquired physiological signal indicates that the current subject is about to wake up or is already in a light sleep stage, adjusting or suspending the intervention operation, the physiological signal includes: one or more of the EEG signal, the heart rate and breathing signal, the EMG change signal, and the body movement signal; When the acquired physiological signal indicates that the subject's current heart rate or electroencephalogram is abnormal, adjusting the intervention parameter; the adjusting the intervention parameter includes: reducing the intervention intensity or changing the intervention excitation mode; When the acquired physiological signal indicates that the current state of the subject satisfies a predetermined stability condition, the current intervention operation is maintained or the intervention intensity is increased within a predetermined range.

4. The system for assisting rehabilitation during sleep according to claim 1, characterized in that: After using the deep learning model to determine the current sleep stage of the subject and before calculating the stability score, the method further includes triggering the deep learning model to re-determine the current sleep stage when at least one of the following conditions is met: a. The ratio of the low-frequency component to the high-frequency component of the heart rate variability (HRV) is greater than or equal to a predetermined ratio threshold; b, body movement frequency is greater than the predetermined frequency threshold; c. The number of apnea or hypopnea events per hour (RDI) is greater than or equal to the predetermined number threshold .

5. The system for assisting rehabilitation during sleep according to claim 4, characterized in that: The stability score is adjusted when one or more of the conditions a, b or c are met. , or ,in: When condition a is met, Adjusted , in, is the predetermined first HRV gain coefficient, is the predetermined normal value for the current object; Adjusted in, is a predetermined second HRV gain coefficient; When the condition c is met, Adjusted in, is the predetermined respiratory gain factor; Adjusted in, is a predetermined first attenuation coefficient; Adjusted ; in, is a predetermined second attenuation coefficient.

6. The system for assisting rehabilitation during sleep according to claim 1, characterized in that: The intervention operation includes performing a specified type of stimulation at a specified intensity and frequency on one or more parts of the subject.

Citation Information

Patent Citations

  • Rehabilitation training evaluation method based on combination of dream guidance and myoelectricity monitoring

    CN119655716A

  • Personalized sleep wellness score for treatment and / or evaluation of sleep conditions

    US20220370757A1