Adaptive electrical stimulation method fusing gait information, electronic equipment and medium
By collecting lower limb gait data in real time and using a pre-trained model to determine the phase of the affected side's footsteps, the electrical stimulator is controlled to release electrical stimulation at the appropriate time in the gait cycle and the intensity is dynamically adjusted. This solves the problem of mismatch between the electrical stimulation time and the patient's gait, and improves the effect of electrical stimulation and rehabilitation training.
Patent Information
- Application Number
- CN202510856655.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-10
Smart Images

Figure CN120754439A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical rehabilitation technology, and more specifically to an adaptive electrical stimulation method, electronic equipment, and medium integrating gait information. Background Art
[0002] Neurological conditions such as stroke and spinal cord injury often lead to impaired motor function, necessitating motor rehabilitation training in rehabilitation departments. Functional electrical stimulation (FES) is an effective rehabilitation treatment. By applying low-frequency pulsed current to one or more muscle groups, the patient can induce muscle movement or simulate normal voluntary movement. This method can significantly improve the motor function of a patient's muscles or muscle groups and enhance their motor abilities.
[0003] In related technologies, when using electrical stimulators to assist patients in rehabilitation training, electrical stimulation is usually applied at fixed intervals. However, the gait frequency and rhythm of different patients vary greatly, and this fixed stimulation scheme is often difficult to adapt to individual differences. As a result, the timing of the electrical stimulation may not be precise enough to synchronize with the patient's actual gait, ultimately affecting the effectiveness of rehabilitation training.
[0004] In view of this, the present invention is proposed. Summary of the Invention
[0005] The present invention is proposed in view of the above problems. According to one aspect of the present invention, an adaptive electrical stimulation method integrating gait information is provided, comprising: The following steps are executed in a loop: Obtaining lower limb gait data of a target subject at a current moment, the lower limb gait data including data within a target duration ending at the current moment, the target duration being greater than or equal to a maximum theoretical gait cycle; the lower limb gait data being obtained by detecting a gait analysis device worn by the target subject; Inputting the lower limb gait data into a pre-trained electrical stimulation prediction model, the electrical stimulation prediction model comprising a feature extraction module, a footstep judgment module, and a phase prediction module, wherein the feature extraction module is connected to the footstep judgment module and the phase prediction module, respectively, the footstep judgment module is used to judge whether the lower limb gait data is footstep data based on features extracted by the feature extraction module, and the phase prediction module is used to determine, if the lower limb gait data is footstep data, the footstep phase of the target side corresponding to the current moment in the gait cycle based on the lower limb gait data; According to the operation result of each execution of the footstep phase determination operation, at least when the footstep phase of the affected side reaches a target phase at the current time, control the electrical stimulator to release electrical stimulation; the operation result includes whether the lower extremity gait data is footstep data, and when the lower extremity gait data is footstep data, the footstep phase of the affected side corresponding to the current time in the gait cycle, wherein the footstep phase of the affected side is determined according to the footstep phase of the target side.
[0006] Exemplarily, the at least when the footstep phase of the affected side reaches the target phase at the current time, control the electrical stimulator to release electrical stimulation, includes: When the footstep phase of the affected side reaches the target phase for the first time in the current gait cycle, control the electrical stimulator to release electrical stimulation.
[0007] Exemplarily, the method further includes: After each execution of the footstep phase determination operation, the following judgment operation is cyclically executed: judging whether the footstep phase of the affected side at the current time exceeds a first phase threshold value; Wherein, when the footstep phase of the affected side at the current time exceeds the first phase threshold value, the following judgment operation is cyclically executed after each execution of the footstep phase determination operation until a new gait cycle is determined to start: judging whether the footstep phase of the affected side determined by the footstep phase determination operation is less than a second phase threshold value; Wherein, when the footstep phase of the affected side determined by the footstep phase determination operation is less than the second phase threshold value, it is determined that a new gait cycle starts; Wherein, the second phase threshold value is less than the first phase threshold value.
[0008] Exemplarily, the method further includes: When the footstep phase of the affected side exceeds the target phase in the output result of the electrical stimulation prediction model at the current time, and the time interval from the last time the electrical stimulator releases electrical stimulation is greater than a preset time length, it is determined that the footstep phase of the affected side detected at the current time is the first time that the footstep phase of the affected side reaches the target phase in the current gait cycle; Wherein, the preset time length is less than the minimum theoretical gait cycle.
[0009] Exemplarily, the electrical stimulation prediction model is trained by the following operation: Obtain a plurality of sample gait data and their respective sample labels, the sample labels including whether the corresponding sample gait data is footstep data, and when the corresponding sample gait data is footstep data, the footstep phase of the target side corresponding to the sample gait data; The feature extraction module and the step judgment module are trained by using the plurality of sample gait data until the output result of the step judgment module meets the requirement. After the output result of the step judgment module meets the requirement, the parameters of the feature extraction module are fixed, and the phase prediction module is trained by using the sample gait data belonging to the step data in the plurality of sample gait data.
[0010] Exemplarily, the method further comprises: When the quantity of the acquired lower limb gait data of the target object reaches a preset quantity, the electric stimulation prediction model is optimized by using the lower limb gait data of the target object.
[0011] Exemplarily, the method further comprises: According to the lower limb gait data acquired each time, a symmetry error between the momentum when the healthy side of the target object is used as a swing leg and the momentum when the affected side is used as a swing leg is determined; At least according to the symmetry error, the electric stimulation intensity of the electric stimulator is adjusted; When the current electric stimulation is the first electric stimulation, the electric stimulation intensity is a preset intensity.
[0012] Exemplarily, the at least according to the symmetry error, the electric stimulation intensity of the electric stimulator is adjusted, comprises: When the current electric stimulation is the second electric stimulation, the electric stimulation intensity is increased or decreased according to the symmetry error and a preset step length; Otherwise, the electric stimulation intensity of the electric stimulator is adjusted according to the electric stimulation intensities of the two electric stimulations closest to the current electric stimulation and the momentum error.
[0013] According to another aspect of the present application, an electronic device is provided, comprising a processor and a memory, the memory storing a computer program, and the processor is configured to execute the computer program to implement the method as described above.
[0014] According to still another aspect of the present application, a computer readable storage medium is provided, storing a computer program / instruction, which is executed by a processor to implement the method as described above.
[0015] In the above technical solution, by collecting the target subject's lower limb gait data in real time and inputting the collected data into a pre-trained electrical stimulation prediction model, real-time judgment of the affected-side footstep phase can be achieved. Thus, electrical stimulation can be applied to the target subject's affected side based on the real-time determined affected-side footstep phase. This significantly improves the degree of matching between the electrical stimulation timing and the target subject's actual movements, implements an electrical stimulation scheme based on the timing of the gait cycle, and solves the problem of electrical stimulation timing not matching the patient's inactive movements. This helps to improve the effectiveness of electrical stimulation and rehabilitation training.
[0016] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features, and advantages of the present invention will become more apparent through a more detailed description of the embodiments of the present invention with reference to the accompanying drawings. The accompanying drawings are provided to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and are not intended to limit the present invention. In the drawings, the same reference numerals generally represent the same components or steps.
[0018] Figure 1 A schematic flow chart showing an adaptive electrical stimulation method integrating gait information according to one embodiment of the present invention; Figure 2 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present invention more apparent, exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.
[0020] As described above, functional electrical stimulation (FES) stimulates one or more muscle groups in a patient by applying low-frequency pulsed current, thereby inducing muscle movement or simulating normal voluntary movement. During gait rehabilitation, each step is achieved through the coordinated activation of multiple muscle groups, primarily in the lower limbs. Muscles in specific areas activate only at specific times during the gait cycle. Therefore, when using electrical stimulation to treat muscle dysfunction in specific areas, electrical stimulation should be delivered at appropriate moments during the gait cycle. However, current electrical stimulation protocols are designed to deliver electrical stimulation at fixed intervals (typically preset by the manufacturer or adjusted by the physician). Due to significant variations in gait frequency and cadence between patients, this fixed stimulation protocol is often difficult to adapt to individual differences, resulting in poor electrical stimulation effectiveness and ultimately hindering the effectiveness of rehabilitation training. To address the issue of uncertain electrical stimulation timing, some related technologies have introduced pressure sensor assemblies placed on the sole of the foot (typically at the heel) and typically configured to release electrical stimulation upon detecting a pressure change. These solutions can only detect a few moments, such as when the foot touches or leaves the ground, and cannot capture the entire gait cycle. This limits their use cases and results in poor results. In light of this, the present invention provides an adaptive electrical stimulation method, electronic device, and storage medium that integrates gait information. This method can identify different phases of walking and implement an electrical stimulation scheme based on the timing of the gait cycle. This allows electrical stimulation to be applied based on the patient's (hereinafter referred to as the target subject) footstep phase, resolving the issue of electrical stimulation timing not being able to align with the patient's walking movements. This method, electronic device, and storage medium are described in detail below.
[0021] According to one aspect of an embodiment of the present invention, an adaptive electrical stimulation method integrating gait information is provided. Figure 1 FIG. 1 is a schematic flow chart showing an adaptive electrical stimulation method integrating gait information according to an embodiment of the present invention. Figure 1 As shown, the method may include step S110 and step S120.
[0022] In step S110, a step phase determination operation is executed cyclically, which includes steps S111 and S112.
[0023] In step S111, the lower limb gait data of the target object at the current moment is obtained, and the lower limb gait data includes data within a target duration with the current moment as the end point, and the target duration is greater than or equal to the maximum theoretical gait cycle; the lower limb gait data is obtained by detecting a gait analysis device worn on the target object.
[0024] The gait analysis device of this embodiment can be any gait analysis device that is currently available or will be developed in the future. In some embodiments, the gait analysis device includes a plurality of inertial sensors for measuring the spatial angles of different positions of the lower limbs and two distributed pressure sensors for measuring the pressure on the soles of each foot; the number of inertial sensors is 7, which are used to measure the pelvis, left thigh, right thigh, left calf, right calf, left foot and right foot of the target object respectively; each distributed pressure sensor is used to measure the pressure data of the heel, arch and toe of the corresponding foot. Among them, the inertial sensor can be fixed to the corresponding position by an elastic strap. Of course, it can also be fixed in other ways. Those skilled in the art understand the specific wearing method of the gait analysis device and will not go into details.
[0025] Gait analysis devices in related technologies typically have built-in gait algorithms that can restore a complete gait cycle based on the gait data collected by the gait analysis device. However, these algorithms analyze the gait cycle only after it has completed, which does not meet the requirements of real-time judgment.
[0026] In this embodiment, each sensor collects data at the same sampling rate. After each sampling, each inertial sensor can calculate the real-time spatial angle data through the attitude solution method, which can generally be expressed by Euler angles. The data dimension is 3. The pressure sensor of each foot can be divided into three areas: heel, arch, and toe. The values of multiple pressure sensors in each area are summed and averaged to obtain the pressure value in each area. Each foot corresponds to pressure data of dimension 3. The total data dimension of each sampling is: 7*3+2*3=27. The data is normalized, and the angle data can be obtained by (Where, e Represents the original angle data, Represents the normalized angle data) is normalized to the [-1,1] interval, and the pressure data is normalized to the [-1,1] interval. (Where, p Represents the original angle data, represents the normalized angle data) normalized to the interval [0,1], where is the maximum value of plantar pressure that can be counted, and the normalized data is recorded as: .
[0027] In this embodiment, the lower limb gait data includes data within a target duration ending at the current moment. In some embodiments, a gait analysis device can be used to acquire data in real time, and then the data acquired at the current moment and within the target duration before the current moment is used as the lower limb gait data. In a specific embodiment, a time window of the target duration can be set, with the right edge of the time window being the current moment.
[0028] The target duration in this embodiment is greater than or equal to the maximum theoretical gait cycle. It will be understood that a gait cycle refers to the time from the heel of one side touching the ground to the heel of the same side touching the ground again. In this article, the time from the heel of the affected side touching the ground to the heel of the affected side touching the ground again is considered to be a gait cycle. In this article, the gait cycles of different patients can be counted in advance, and the maximum gait cycle in the statistical value can be used as the maximum theoretical gait cycle. In this way, it can be ensured that each data used to determine the phase of a step contains at least one complete step. In a specific embodiment, the target duration can be set to 4s. In this embodiment, if the sampling rate is 60, the lower limb gait data contains 240 groups of data.
[0029] In step S112, the lower limb gait data is input into a pre-trained electrical stimulation prediction model. The electrical stimulation prediction model includes a feature extraction module, a step judgment module and a phase prediction module. The feature extraction module is connected to the step judgment module and the phase prediction module respectively. The step judgment module is used to judge whether the lower limb gait data is step data based on the features extracted by the feature extraction module. The phase prediction module is used to determine the step phase of the target side corresponding to the current moment in the gait cycle based on the lower limb gait data when the lower limb gait data is step data.
[0030] After obtaining the lower limb gait data, the lower limb gait data can be input into a pre-trained electrical stimulation prediction model. In the electrical stimulation prediction model, the lower limb gait data is first extracted using a feature extraction module. The extracted feature values are then input into a footstep judgment module to determine whether the data collected at the current moment belongs to a footstep, that is, to determine whether the target object is in a walking state. When the target object is in a walking state, the extracted feature values are input into a phase prediction module to predict the footstep phase of the target side footstep of the target object.
[0031] In the scheme of this example, the electrical stimulation prediction model is trained by sample gait data. For the sample gait data belonging to the footstep data, the starting point of the cycle phase of each sample gait data is the time point when the heel of the target side foot touches the ground. The phase label of the sample gait data is the footstep phase of the target side foot. When the affected side is the target side, the footstep phase output by the phase prediction module is the footstep phase of the affected side. When the affected side is the other side of the target side, the footstep phase of the affected side can be obtained based on the footstep phase mapping output by the phase prediction module. It can be understood that there is a mapping relationship between the footstep phase on the left side and the footstep phase on the right side. For example, when the heel of the left foot touches the ground, the footstep phase of the corresponding right foot is 50%. Therefore, the footstep phase of one side can be directly determined based on the footstep phase of the other side. That is, when the target side and the affected side are not the same side, the footstep phase of the affected side can be determined based on the footstep phase of the target side output by the model and the mapping relationship between the footstep phases of the two sides.
[0032] In the solution of this example, the inputs of the footstep judgment module and the phase prediction module are both the outputs of the feature extraction module. This method of sharing the same feature extraction module only requires one forward deduction each time the data is processed, reducing the amount of computation and the complexity of the model. The network structures of the feature extraction module, the footstep judgment module, and the phase prediction module can be constructed according to actual needs. In a specific embodiment, the feature extraction module uses a one-dimensional convolutional network to extract features, and the convolutional network can include multiple layers of one-dimensional convolutional layers and pooling layers. Specifically, the network structure can be: the first convolution unit: contains 64 7×1 convolution kernels, step size 1, symmetric padding; the second convolution unit: contains 128 5×1 convolution kernels, step size 1, symmetric padding; the third convolution unit: contains 256 3×1 convolution kernels, step size 1, symmetric padding; the fourth convolution unit: contains 512 3×1 convolution kernels, step size 1, symmetric padding; each convolution layer is connected to a batch normalization layer; the first three batch normalization layers are followed by a maximum pooling layer, 2×1 window, step size 2, and the last batch normalization layer is connected to an adaptive averaging layer, and the output is fixed length 10.
[0033] Both the step judgment module and the phase prediction module can employ fully connected networks. The fully connected network of the step judgment module can employ the following structure to predict the probability of a step: fully connected layer: 1024 neurons, ReLU activation; dropout layer: 50% dropout rate; fully connected layer: 512 neurons, ReLU activation; dropout layer: 30% dropout rate; output layer: 1 neuron, linear activation. In this embodiment, the output value of the step judgment module can be within the range of [0, 1]. If the probability of a step output by the step judgment module is greater than a probability threshold (which can be 0.5), it is determined that the data collected at the current moment is a step.
[0034] The fully connected network in the phase prediction module is used to predict the phase of footsteps. Its output value can vary in a cycle from 0% to 100% and then from 0% to 100%. Because the sudden change between 100% and 0% is detrimental to neural network learning, a dual-channel trigonometric function encoding architecture can be considered to eliminate the 2π boundary discontinuity. The output is two values corresponding to (sin(a) and cos(a)). From (y0, y1), we can derive a = atan2(y0, y1) mod (2π), with a ranging from [0, 2π]. y0 and y1 are the model outputs, and a / (2π)*100% represents the phase of the current position in the cycle. A specific design might include: fully connected layer with 1024 neurons, Reinforced Lu (ReLU) activation; dropout layer with a dropout rate of 30%; fully connected layer with 512 neurons, Reinforced Lu (ReLU) activation; and output layer with 2 neurons, tanh activation, forcing the output to the interval [-1, 1].
[0035] In step S120, based on the operation result of each execution of the footstep phase determination operation, at least when the footstep phase of the affected side at the current moment reaches the target phase, the electrical stimulator is controlled to release electrical stimulation; the operation result includes whether the lower limb gait data is footstep data, and when the lower limb gait data is footstep data, the footstep phase of the affected side corresponding to the gait cycle at the current moment, wherein the footstep phase of the affected side is determined according to the footstep phase of the target side.
[0036] It can be understood that the electrical stimulator is installed on the affected side to assist in rehabilitation training of the affected side.
[0037] The target phase can be selected based on actual needs. In some implementations of this embodiment, the ipsilateral footstep phase can be considered to have reached the target phase when the difference between the current ipsilateral footstep phase and the target phase is less than or equal to a difference threshold. Of course, the ipsilateral footstep phase can also be considered to have reached the target phase when the ipsilateral footstep phase exceeds the target phase for the first time in the current footstep cycle.
[0038] The above technical solution collects the target subject's lower limb gait data in real time and inputs the collected data into a pre-trained electrical stimulation prediction model. This allows for real-time determination of the affected-side footstep phase, allowing electrical stimulation to be applied to the affected side based on the real-time determined affected-side footstep phase. This significantly improves the degree of matching between the electrical stimulation timing and the target subject's actual movements, enabling an electrical stimulation scheme based on the timing of the gait cycle and resolving the issue of electrical stimulation timing not matching the patient's inactive movements. This helps improve the effectiveness of electrical stimulation and rehabilitation training.
[0039] Exemplarily, at least when the affected side footstep phase reaches the target phase at the current moment, the electrical stimulator is controlled to release electrical stimulation, including: when the affected side footstep phase reaches the target phase for the first time in the current gait cycle, the electrical stimulator is controlled to release electrical stimulation.
[0040] The inventors discovered through research that the footstep phase output by the model may fluctuate around the target phase. Therefore, if electrical stimulation is only delivered when the affected-side footstep phase reaches the target phase at the current moment, multiple electrical stimulations may occur within a single gait cycle. Given this, this embodiment considers controlling the electrical stimulator to deliver electrical stimulation only when the footstep phase reaches the target phase for the first time during each gait cycle. This ensures that electrical stimulation is delivered only once per gait cycle, thereby suppressing possible secondary fluctuations within a short period of time and improving electrical stimulation accuracy.
[0041] Exemplarily, the method also includes: after each footstep phase determination operation, cyclically executing the following judgment operation: determining whether the footstep phase of the affected side at the current moment exceeds the first phase threshold; wherein, when the footstep phase of the affected side at the current moment exceeds the first phase threshold, cyclically executing the following judgment operation each time the footstep phase determination operation is performed thereafter until it is determined that a new gait cycle begins: determining whether the footstep phase of the affected side determined by the footstep phase determination operation is less than the second phase threshold; wherein, when the footstep phase of the affected side determined by the footstep phase determination operation is less than the second phase threshold, it is determined that a new gait cycle begins; wherein, the second phase threshold is less than the first phase threshold.
[0042] For ease of description, a specific embodiment is used for illustration. In this embodiment, the first phase threshold is 0.8, and the second phase threshold is 0.2. In this embodiment, when the output phase of the affected side footstep is greater than 0.8, the affected side footstep phase is compared with the second phase threshold until the affected side footstep phase is observed to be less than 0.2. At this time, it can be considered that a new gait cycle has begun, and in this new gait cycle, when the affected side footstep phase is observed to reach the target phase for the first time, the electrical stimulator is controlled to release electrical stimulation. In this way, by accurately judging the beginning of each gait cycle, the situation in which the affected side footstep phase is detected to reach the target phase for the first time within the gait cycle can be accurately identified, thereby further improving the accuracy of electrical stimulation.
[0043] Exemplarily, the method also includes: when the affected side footstep phase exceeds the target phase in the output result of the electrical stimulation prediction model at the current moment, and the time interval from the last time the electrical stimulation was released by the electrical stimulator is greater than a preset duration, determining that the affected side footstep phase detected at the current moment is the first time in the current gait cycle that the affected side footstep phase is detected to reach the target phase; wherein the preset duration is less than the minimum theoretical gait cycle.
[0044] In the above example, we considered counting the gait cycles of different patients and using the maximum gait cycle in the statistics as the maximum theoretical gait cycle. In this example, we can use the minimum gait cycle in the statistics as the minimum theoretical gait cycle. By setting the preset duration to be less than the minimum theoretical gait cycle, we can avoid incorrect inhibition of electrical stimulation (for example, incorrectly inhibiting electrical stimulation in the next gait cycle), thereby further improving the accuracy of electrical stimulation.
[0045] In some embodiments, the preset duration can be a maximum fluctuation time. It will be appreciated that data fluctuations typically occur within a relatively short period of time, much shorter than the duration of a gait cycle. In this embodiment, the maximum fluctuation time around the target phase in the gait cycles of different patients can be calculated. In a specific embodiment, the maximum fluctuation time can be within the range of [0.05s, 0.1s].
[0046] In this example, a preset timer is added to determine whether the current detected step phase reaches the target phase for the first time in the current gait cycle. This effectively avoids erroneous electrical stimulation caused by short-term data fluctuations, further improving electrical stimulation accuracy and the effectiveness of rehabilitation training.
[0047] Exemplarily, the electrical stimulation prediction model is trained by the following operations: obtaining multiple sample gait data and their respective corresponding sample labels, the sample labels including whether the corresponding sample gait data is footstep data (which can be called footstep labels), and when the corresponding sample gait data is footstep data, the footstep phase on the target side corresponding to the sample gait data (which can be called phase labels); using multiple sample gait data to train the feature extraction module and the footstep judgment module until the output result of the footstep judgment module meets the requirements (that is, the training termination condition is met); after the output result of the footstep judgment module meets the requirements, fixing the parameters of the feature extraction module, and using the sample gait data belonging to footstep data in the multiple sample gait data to train the phase prediction module.
[0048] In some embodiments, gait data from different patients can be collected (this data can be obtained using a gait analysis device). Then, existing gait algorithms can be used to identify footsteps, with the moment the heel of the target foot (either the left or right foot) leaves the ground being used as the starting point of the footstep phase. Specifically, a sliding window of length m can be used, and the window can be slid from the starting point of the data with a step size of 1. Initially, the label indicating whether it is a footstep is 0 (the window does not contain a complete footstep at this time). When the window slides to the point where it contains the first complete footstep, i.e., the right edge of the window is at the moment of the second heel strike, if there are further footsteps, the output begins to be 1, and this continues until the right edge of the window reaches the last heel strike, at which point the output begins to be 0 again. When the label indicating whether it is a footstep is 1, assuming that the sample corresponding to the right edge of the window is the kth sample out of the total number of samples n in the corresponding cycle, its phase label value is k / n. When using the fully connected network structure with dual-channel trigonometric function encoding described above, the phase label can be converted to (sin(k / n)), cos(k / n)) as the training label. When the footstep label is 0, the phase label is meaningless. In this way, multiple sample gait data and their corresponding sample labels can be obtained.
[0049] After obtaining the sample gait data, the sample gait data and the footstep labels of each sample gait data can first be used to train the feature extraction module and the footstep judgment module. In a specific embodiment, the optimizer can be configured as Adam (lr=0.001, β1=0.9, β2=0.999), the loss function uses cross entropy loss, and the training termination condition is that the accuracy of the validation set does not improve for 10 consecutive rounds. After the training of the footstep judgment module is completed, the parameters of the feature extraction module are fixed, and the footstep data in the multiple sample gait data (i.e., the data with the footstep label of 1) and its corresponding phase label are used to train the phase prediction module. The specific training parameters are selected as the optimizer configured as Adam (lr=0.001, β1=0.9, β2=0.999), the loss function uses the minimum mean square error loss, and the training is terminated after 300 cycles of training on the training set.
[0050] The above technical solution can use sample gait data to optimize the parameters of the electrical stimulation prediction model, thereby improving the accuracy of the output results of the electrical stimulation prediction model.
[0051] Exemplarily, the method further includes: when the amount of acquired lower limb gait data of the target object reaches a preset amount, optimizing the electrical stimulation prediction model using the lower limb gait data of the target object.
[0052] In this example, when sufficient lower limb gait data is available for a given subject, this data can be used as a new training set to further train the model, resulting in a personalized model more suitable for that subject. This allows each subject to use a model optimized based on their own data, resulting in more accurate judgments. The specific training process is similar to that used to train the electrical stimulation prediction model using sample gait data and will not be detailed here.
[0053] Exemplarily, the method also includes: determining the symmetry error between the momentum of the target object's healthy side when it is the swing leg and the momentum of the affected side when it is the swing leg based on the lower limb gait data obtained each time; adjusting the electrical stimulation intensity of the electrical stimulator based on at least the symmetry error; wherein, when the current electrical stimulation is the first electrical stimulation, the electrical stimulation intensity is a preset intensity.
[0054] It is understood that each acquired lower limb gait data includes at least one complete gait cycle, that is, at least one walk on the healthy side and one walk on the affected side. Therefore, each acquired lower limb gait data can calculate the healthy-affected side error. Then, the symmetry error can be determined based on the total healthy-affected side error.
[0055] In this example, symmetry is considered as the evaluation criterion. In a specific embodiment, for parameters represented by a single number in the lower limb gait data (such as stride length, stride time, etc.), the error can be calculated as follows: ,in, represents the error in one of the parameters expressed as a single number, represents the parameter on the affected side, Represents the parameter of the healthy side. For parameters represented in array form (such as the rotation curve, angle, trajectory of the limb in the sagittal plane, etc.), the error can be calculated as follows: ,in, Indicates the error of one of the parameters represented in array form, represents the parameter on the affected side, Indicates the parameter of the healthy side, The value range of is [-1, 1]. After obtaining the errors of each parameter, the arithmetic sum or weighted sum of the errors can be calculated to obtain the total error, i.e., the symmetry error between the healthy and affected sides. When the weighted sum of the errors is used as the symmetry error, the weight of each error can be set as needed. For example, for errors that require special consideration, a larger weight can be assigned. This will not be discussed in detail here.
[0056] In the above, for parameters expressed in array form, the covariance of the two corresponding arrays on both sides is used as the error. Before calculating the covariance, considering that the actual duration of each step is different, the length of the corresponding data is also different at the same sampling rate, which leads to different parameter array lengths between the healthy and affected sides. Therefore, the longer array can be adjusted to the same length as the shorter array through linear interpolation. In some embodiments, the array length can be adjusted in the following way: if the original array a is m long and is to be adjusted to n (m>n), then the value of the kth (0<=k<=n) is first calculated as t=k / n*m, and t1=floor(t) and t2=t1+1, then the new array b[k]=a[t1]+(a[t2]-a[t1])*(t-t1).
[0057] Electrical stimulation is typically performed only on the affected side. Therefore, the comparison of the affected and unaffected sides after stimulation (i.e., symmetry error) can be used as an evaluation metric to automatically fine-tune the set stimulation intensity parameters. Since there are no previous stimulation results to reference during the first stimulation, the preset intensity can be used directly. This predicted intensity can be determined based on the physician's experience and will not be detailed here.
[0058] During the research process, the inventors also discovered the following problem: Among the parameters of the electrical stimulator, the electrical stimulation intensity is also one of the important parameters that affect the effect of electrical stimulation. At present, the electrical stimulation intensity is usually obtained by manual adjustment by a doctor. However, doctors usually lack effective feedback means to know whether the current stimulation intensity is appropriate, and can only adjust the stimulation intensity through trial and error. This method is time-consuming and labor-intensive, and has low efficiency, which seriously affects the effect of electrical stimulation. In the scheme of this example, it is considered to adjust the electrical stimulation intensity of the electrical stimulator according to the symmetry error. Thus, after each electrical stimulation, the electrical stimulation intensity can be dynamically adjusted according to the symmetry difference between the healthy side and the affected side after the electrical stimulation, thereby improving the accuracy of the electrical stimulation intensity and further improving the electrical stimulation effect.
[0059] Exemplarily, the electrical stimulation intensity of the electrical stimulator is adjusted at least according to the symmetry error, including: when the current electrical stimulation is the second electrical stimulation, increasing or decreasing the electrical stimulation intensity according to the symmetry error and a preset step size; otherwise, adjusting the electrical stimulation intensity of the electrical stimulator according to the electrical stimulation intensities and symmetry error of the two electrical stimulations closest to the current electrical stimulation.
[0060] In this example, when the current electrical stimulation is the second electrical stimulation, the direction of adjustment (increase or decrease) of the electrical stimulation intensity can be determined based on the magnitude of the symmetry error, and the electrical stimulation intensity can be adjusted according to a preset step size. During the third and subsequent electrical stimulations, the electrical stimulation intensity of the electrical stimulator can be adjusted based on the electrical stimulation intensities of the x-1 and x-2 electrical stimulations and the symmetry error.
[0061] In some embodiments, the method may further include: stopping adjustment of the electrical stimulation intensity when the difference in symmetry error between the two electrical stimulations closest to the current electrical stimulation is less than a preset difference threshold. In this embodiment, considering that the symmetry error between two adjacent electrical stimulations is relatively close, the current electrical stimulation intensity is generally close to the ideal value, and further adjustment will have little effect, adjustment may be stopped and electrical stimulation may continue at the current electrical stimulation intensity. This can reduce the amount of computation while ensuring the effectiveness of electrical stimulation.
[0062] In one specific embodiment, the total difference E between the symmetry of the healthy side and the affected side can be calculated every gait cycle during the walking of the target object, at this time, the electrical stimulation intensity can be fine-tuned, and the stimulation intensity can be slightly increased or decreased in the adjustable range. After the parameters are changed, the symmetry difference of multiple steps is recorded, and the symmetry difference is recorded under different parameters. The smallest symmetry difference is the optimal stimulation intensity. The specific strategy can use a Newton-like method, record the symmetry difference E1 and E2 before and after the fine-tuning of the electrical stimulation, and the intensity P1 and P2 of the two electrical stimulations. Then the new electrical stimulation intensity can be set as P3=argmin(E1,E2) p1,p2 -k*(E2-E1) / (P2-P1), wherein k is a preset step parameter, and the termination condition is that E2-E1 is less than a preset threshold.
[0063] The above technical solution can realize dynamic adjustment of the electrical stimulation intensity, so as to improve the matching degree of the electrical stimulation intensity and the actual situation of the target object, and further improve the electrical stimulation effect.
[0064] According to another aspect of the embodiments of the present application, an electronic device is also provided. Figure 2 A schematic block diagram of an electronic device according to one embodiment of the present application is shown. As shown, the electronic device 200 includes a processor 210 and a memory 220. The memory 220 stores a computer program, and the processor 210 is configured to execute the computer program to implement the above method. Figure 2
[0065] According to still another aspect of the embodiments of the present application, a computer readable storage medium is also provided. The storage medium stores a computer program / instruction, and the computer program / instruction is executed by a processor to implement the above method. The storage medium may, for example, include a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer readable storage medium can be any combination of one or more computer readable storage media.
[0066] Those skilled in the art can easily understand the implementation structure, working principle and beneficial effects of the electronic device and the computer readable storage medium by reading the above method. For brevity, they will not be described here.
[0067] Although example embodiments have been described herein with reference to the accompanying drawings, it will be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present application. Those skilled in the art can make various changes and modifications without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as claimed in the appended claims.
[0068] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software mode depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0069] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of units is only a logical function division, and actual implementation can have another division mode, for example, multiple units or components can be combined or integrated into another device, or some features can be omitted or not executed.
[0070] In the specification provided herein, a large number of specific details are described. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some examples, well-known methods, structures and techniques are not shown in detail in order not to obscure the understanding of the present specification.
[0071] Similarly, it should be understood that, in order to simplify the present application and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of the present application should not be interpreted as reflecting an intention that the claimed application requires more features than those explicitly recited in each claim. Rather, as reflected by the corresponding claims, the inventive point is that the corresponding technical problem can be solved with fewer features than all the features of a certain disclosed single embodiment. Therefore, the claims following the specific embodiments are hereby expressly incorporated into the specific embodiments, wherein each claim itself is a separate embodiment of the present application.
[0072] Those skilled in the art can understand that, except for the mutual exclusion between features, all features disclosed in the specification (including the accompanying claims, abstract and drawings) and all processes or units of any method or device disclosed in this way can be combined in any combination. Unless explicitly stated otherwise, each feature disclosed in the specification (including the accompanying claims, abstract and drawings) can be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0073] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
[0074] The various component embodiments of the present invention may be implemented in hardware, as software modules running on one or more processors, or as a combination thereof. Those skilled in the art will appreciate that, in practice, a microprocessor or digital signal processor (DSP) may be used to implement some or all of the functions of some modules in electronic devices according to embodiments of the present invention. The present invention may also be implemented as a device program (e.g., a computer program or computer program product) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium or in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0075] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0076] The foregoing description is merely a specific embodiment of the present invention or an illustration of a specific embodiment. The scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be readily conceived by a person skilled in the art within the technical scope disclosed in the present invention are intended to be encompassed by the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. An adaptive electrical stimulation method integrating gait information, characterized in that: include: The following steps are executed in a loop: Obtaining lower limb gait data of a target subject at a current moment, the lower limb gait data including data within a target duration ending at the current moment, the target duration being greater than or equal to a maximum theoretical gait cycle; the lower limb gait data being obtained by detecting a gait analysis device worn by the target subject; Inputting the lower limb gait data into a pre-trained electrical stimulation prediction model, the electrical stimulation prediction model comprising a feature extraction module, a footstep judgment module, and a phase prediction module, wherein the feature extraction module is connected to the footstep judgment module and the phase prediction module, respectively, the footstep judgment module is used to judge whether the lower limb gait data is footstep data based on features extracted by the feature extraction module, and the phase prediction module is used to determine, if the lower limb gait data is footstep data, the footstep phase of the target side corresponding to the current moment in the gait cycle based on the lower limb gait data; According to the operation result of each execution of the step phase determination operation, at least when the step phase of the affected side reaches the target phase at the current moment, the electrical stimulator is controlled to release electrical stimulation; the operation result includes whether the lower limb gait data is step data, and when the lower limb gait data is step data, the step phase of the affected side corresponding to the gait cycle at the current moment, wherein the step phase of the affected side is determined according to the step phase of the target side.
2. The method according to claim 1, characterized in that When the footstep phase of the affected side reaches the target phase at least at the current moment, controlling the electrical stimulator to release electrical stimulation includes: When it is detected for the first time in the current gait cycle that the footstep phase of the affected side reaches the target phase, the electrical stimulator is controlled to release electrical stimulation.
3. The method according to claim 2, characterized in that The method further comprises: After each step phase determination operation, the following judgment operation is performed cyclically: judging whether the step phase of the affected side at the current moment exceeds a first phase threshold; When the footstep phase of the affected side exceeds the first phase threshold at the current moment, the following judgment operation is performed cyclically each time the footstep phase determination operation is performed thereafter until a new gait cycle is determined to have begun: judging whether the footstep phase of the affected side determined by the footstep phase determination operation is less than a second phase threshold; Wherein, when the footstep phase of the affected side determined by the footstep phase determination operation is less than a second phase threshold, it is determined that a new gait cycle begins; The second phase threshold is smaller than the first phase threshold.
4. The method according to claim 2, characterized in that The method further comprises: When the footstep phase of the affected side exceeds the target phase in the output result of the electrical stimulation prediction model at the current moment, and the time interval since the last electrical stimulation released by the electrical stimulator is greater than a preset time length, it is determined that the footstep phase of the affected side detected at the current moment is the first time in the current gait cycle that the footstep phase of the affected side is detected to have reached the target phase; The preset duration is smaller than the minimum theoretical gait cycle.
5. The method according to claim 2, characterized in that The electrical stimulation prediction model is trained by the following operations: Acquire a plurality of sample gait data and their respective corresponding sample labels, wherein the sample labels include whether the corresponding sample gait data is footstep data, and, if the corresponding sample gait data is footstep data, a target-side footstep phase corresponding to the sample gait data; Using the plurality of sample gait data, the feature extraction module and the footstep judgment module are trained until the output result of the footstep judgment module meets the requirements; After the output result of the step judgment module meets the requirements, the parameters of the feature extraction module are fixed, and the phase prediction module is trained using the sample gait data belonging to the step data among the plurality of sample gait data.
6. The method according to claim 5, characterized in that The method further comprises: When the amount of the acquired lower limb gait data of the target object reaches a preset amount, the electrical stimulation prediction model is optimized using the lower limb gait data of the target object.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: determining, based on each acquired lower limb gait data, a symmetry error between the momentum of the healthy side of the target subject when the target subject is used as the swing leg and the momentum of the affected side when the target subject is used as the swing leg; adjusting the electrical stimulation intensity of the electrical stimulator based at least on the symmetry error; Wherein, when the current electrical stimulation is the first electrical stimulation, the electrical stimulation intensity is a preset intensity.
8. The method according to claim 7, characterized in that The step of adjusting the electrical stimulation intensity of the electrical stimulator at least according to the symmetry error comprises: When the current electrical stimulation is the second electrical stimulation, increasing or decreasing the electrical stimulation intensity according to the symmetry error and a preset step size; Otherwise, the electrical stimulation intensity of the electrical stimulation device is adjusted according to the electrical stimulation intensities and momentum errors of the two electrical stimulations closest to the current electrical stimulation.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that A computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 8 is implemented.