A method and system for predicting upper limb rehabilitation exercise
By collecting and processing the force data and acceleration data of the upper limbs, combined with the force signal model and the long and short-term memory network model, the movement trajectories of patients with weak muscle strength are predicted, which solves the problem of poor upper limb rehabilitation movement prediction in the existing technology and realizes Develop and implement more accurate rehabilitation exercise strategies.
Patent Information
- Application Number
- CN202311799486.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2043-12-26
AI Technical Summary
Existing upper limb rehabilitation movement prediction methods have poor prediction effect on small movement behaviors of patients with weak muscle strength, and it is difficult to accurately predict movement trajectories, resulting in movement displacement deviation and inability to reach the target position.
By collecting the force data and acceleration data of the patient's upper limbs, using three-dimensional force sensors and acceleration sensors for preprocessing, a force signal model is generated, combined with the long-short-term memory network model to predict motion trajectories, and the three-dimensional force data are processed based on the gain coefficient to formulate rehabilitation exercises. Strategy.
It can effectively predict the upper limb movement trajectories of patients with weak muscle strength, improve the accuracy and effect of rehabilitation exercises, and avoid the problem of failed movement prediction.
Smart Images

Figure CN117462117B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of upper limb rehabilitation, and in particular to an upper limb rehabilitation movement prediction method and system. Background Art
[0002] The upper limbs are involved in most movements in daily activities, and their functional impairment seriously affects patients' motor ability and quality of life. Therefore, upper limb motor function training is an extremely important part of the rehabilitation process.
[0003] The main rehabilitation movement modes of upper limb rehabilitation robots for human bodies include: active mode, passive mode, assisted mode, and resistance mode. Active mode: the upper limbs of the human body are actively moved, and the rehabilitation robot follows; passive mode: the rehabilitation robot moves according to a predetermined trajectory, and the upper limbs of the human body follow; assisted mode: the upper limbs of the human body are actively moved, and the rehabilitation robot performs assisted movement; resistance mode: the upper limbs of the human body are actively moved, and the rehabilitation robot provides movement resistance.
[0004] When the patient's upper limb muscle strength is insufficient to support upper limb movement, the patient cannot perform active and assisted mode training and can only perform passive rehabilitation exercises. The significance of this method is to detect the tiny force signal of the human upper limb through a three-dimensional force sensor, predict the trajectory of the upper limb, and combine with an upper limb rehabilitation robot to help the upper limb of patients with insufficient muscle strength reach the target position, so as to better complete early rehabilitation training.
[0005] In summary, among the existing technologies, the existing motion prediction methods mostly predict the next movement based on the movement behavior that has already occurred or is changing. The prediction effect of small movement changes in patients with weak upper limb muscle strength is poor or even unpredictable. For patients with weak upper limb muscle strength, there is a big difference between the desired upper limb movement behavior and the actual upper limb movement result. There may be a deviation in movement displacement, or the upper limb is unable to reach the target position. In the field of motion prediction, deep learning algorithm models are often used to predict motion trajectories. Deep learning algorithms require a large amount of collected data for model training and learning, and for patients with 0~1 level muscle strength, data collection is extremely difficult. Summary of the invention
[0006] Based on this, the purpose of the present invention is to provide a method and system for predicting upper limb rehabilitation exercise, so as to at least solve the deficiencies in the above-mentioned prior art.
[0007] In a first aspect, the present invention provides an upper limb rehabilitation movement prediction method, which is applied to an upper limb rehabilitation robot, and the method comprises:
[0008] Collecting several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, preprocessing the several groups of force data and the several groups of acceleration data to obtain median group force data and average acceleration data, and obtaining the current position and current posture of the patient's upper limbs;
[0009] Acquire three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position, and the current posture;
[0010] collecting the movement tendency of the patient's upper limb, outputting a force signal model based on the movement tendency, and generating muscle strength evaluation data based on the force signal model;
[0011] Determining a gain coefficient according to the muscle strength evaluation data, and processing the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data;
[0012] The three-dimensional acceleration data and the processed three-dimensional force data are input into the long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and a rehabilitation exercise strategy is formulated according to the movement trajectory prediction result.
[0013] Compared with the prior art, the beneficial effects of the present invention are: by collecting the force data and acceleration data of the patient's upper limbs, combined with the force signal model output by the movement tendency, the movement of the patient's upper limbs can be predicted, and the patient's movement data can be effectively collected, and the three-dimensional force data can be processed based on the gain coefficient, so as to predict the micro-movement behavior of patients with weak upper limb muscle strength, and the movement trajectory of the patient's upper limb can be predicted by the long short-term memory network model to obtain the movement trajectory prediction result, thereby avoiding the problem of unpredictable micro-movements of patients with weak upper limb muscle strength, thereby achieving better rehabilitation exercise effects.
[0014] Further, the steps of collecting several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, preprocessing the several groups of force data and the several groups of acceleration data to obtain the median group force data and the average acceleration data, and obtaining the current position and current posture of the patient's upper limbs include:
[0015] Collecting several groups of force data of the patient's upper limbs through a three-dimensional force sensor, and collecting several groups of acceleration data of the patient's upper limbs through an acceleration sensor;
[0016] Sorting the force data of the plurality of groups according to the module length to obtain the median force data, and calculating the average acceleration data according to the acceleration data of the plurality of groups;
[0017] The current position and current posture of the patient's upper limbs are collected based on the upper limb rehabilitation robot.
[0018] Furthermore, the step of acquiring three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position and the current posture includes:
[0019] Constructing a three-dimensional space coordinate system based on the current position and the current posture;
[0020] Based on the current position, the current posture, the median group force data and the average acceleration data, the force direction and acceleration direction of the patient's upper limb are corrected to output three-dimensional force data and three-dimensional acceleration data based on the three-dimensional space coordinate system.
[0021] Furthermore, the step of confirming the gain coefficient according to the muscle strength evaluation data includes:
[0022] generating a data evaluation result based on the muscle strength evaluation data;
[0023] Establishing an individual training model, and introducing rapid upper limb movement, slow upper limb movement, medium-speed upper limb movement, long-distance upper limb movement, short-distance upper limb movement, and arc movement of the upper limb to train the individual training model, so as to obtain an optimized individual training model;
[0024] The gain coefficient is confirmed based on the data evaluation result by the optimized individual training model.
[0025] Furthermore, the expression of the confirmation gain coefficient is:
[0026] ;
[0027] In the formula, F out represents the output signal of the signal amplification and shaping process, D represents the selection coefficient, n ranges from 1 to 60, m represents the gain coefficient, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Indicates the force data in the z-axis direction, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz Represents the gain coefficient of the z-axis force corresponding to group n.
[0028] Furthermore, the step of optimizing the individual training model to confirm the gain coefficient based on the data evaluation result includes:
[0029] A particle swarm algorithm is used to assign a number of particles to each parameter in the optimization individual training model to calculate the optimal solution of the gain coefficient;
[0030] Wherein, the expression for calculating the optimal solution of the gain coefficient is:
[0031] min f zy (m nx , m ny , m nz )= ;
[0032] In the formula, the value range of n is 1~60. is the end point of the sampling time, t is the specific parameter value corresponding to time t, Choose parameter D for time t n The value of are the given trajectory coordinates and speed at time t, The speed and The speed is the same, represents the long-short time neural network model, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz represents the gain coefficient of the z-axis force corresponding to group n, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z represents the force data in the z-axis direction, A represents the three-dimensional acceleration data, and f zy It represents the sum of the deviations between the predicted target position and the set target position using the same gain parameter in the motion trajectory.
[0033] Furthermore, the steps of using the long short-term memory network model to predict the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulating a rehabilitation exercise strategy according to the movement trajectory prediction result include:
[0034] Collect historical rehabilitation movement data of upper limb rehabilitation robots;
[0035] Converting the three-dimensional acceleration data and the processed three-dimensional force data into target point position information and target point velocity;
[0036] Predicting the motion trajectory of the patient's upper limb based on the historical rehabilitation motion data, the target point position information, and the target point speed by using the long short-term memory network model to obtain a motion trajectory prediction result;
[0037] A rehabilitation movement strategy is formulated according to the motion trajectory prediction result and based on the upper limb rehabilitation robot.
[0038] Furthermore, the step of formulating a rehabilitation exercise strategy based on the upper limb rehabilitation robot according to the motion trajectory prediction result includes:
[0039] Converting the historical rehabilitation movement data into an input vector;
[0040] The input vector is input into the long short-term memory network model, and a rehabilitation exercise strategy is formulated based on the motion trajectory prediction result, so that the upper limb rehabilitation exercise robot performs rehabilitation exercise on the patient's upper limb based on the rehabilitation exercise strategy.
[0041] Furthermore, the step of enabling the upper limb rehabilitation exercise robot to perform rehabilitation exercise on the patient's upper limb based on the rehabilitation exercise strategy includes:
[0042] Recording the corresponding movement trajectory of the rehabilitation exercise to obtain a movement trajectory result;
[0043] The movement trajectory result is compared with the predetermined trajectory result, and the rehabilitation movement strategy is adjusted to obtain the optimal rehabilitation movement strategy.
[0044] In a second aspect, the present invention further provides an upper limb rehabilitation exercise prediction system, which is applied to the above-mentioned upper limb rehabilitation exercise prediction method, and the system comprises:
[0045] The first acquisition module is used to collect several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, pre-process the several groups of force data and the several groups of acceleration data to obtain the median group force data and average acceleration data, and obtain the current position and current posture of the patient's upper limb;
[0046] An acquisition module, configured to acquire three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position, and the current posture;
[0047] A second acquisition module is used to acquire the movement tendency of the patient's upper limbs, output a force signal model based on the movement tendency, and generate muscle strength evaluation data based on the force signal model;
[0048] a processing module, configured to determine a gain coefficient according to the muscle strength evaluation data, and process the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data;
[0049] A prediction and formulation module is used to input the three-dimensional acceleration data and the processed three-dimensional force data into a long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulate a rehabilitation exercise strategy based on the movement trajectory prediction result. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of the upper limb rehabilitation exercise prediction method in the first embodiment of the present invention;
[0051] Figure 2 is a structural diagram of a long short-term memory network model in the first embodiment of the present invention;
[0052] Figure 3 4 is a structural block diagram of an upper limb rehabilitation movement prediction system in a second embodiment of the present invention.
[0053] Description of main component symbols:
[0054] 11. The first acquisition module;
[0055] 12. Get module;
[0056] 13. The second acquisition module;
[0057] 14. Processing module;
[0058] 15. Forecast making module.
[0059] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0060] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0061] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0063] Embodiment 1
[0064] See also Figure 1 , which shows an upper limb rehabilitation motion prediction method in a first embodiment of the present invention, applied to an upper limb rehabilitation robot, and the method includes steps S1 to S5:
[0065] S1, collecting several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, preprocessing the several groups of force data and the several groups of acceleration data to obtain median group force data and average acceleration data, and obtaining the current position and current posture of the patient's upper limbs;
[0066] It is worth mentioning that the upper limb rehabilitation robot integrates a three-dimensional force sensor, a gyroscope, a magnetometer, an accelerometer and a velocity sensor.
[0067] Specifically, the step S1 includes steps S11 to S13:
[0068] S11, collecting several groups of force data of the patient's upper limbs through a three-dimensional force sensor, and collecting several groups of acceleration data of the patient's upper limbs through an acceleration sensor;
[0069] S12, sorting the plurality of groups of force data according to the module length to obtain a median group of force data, and calculating average acceleration data according to the plurality of groups of acceleration data;
[0070] It should be explained that, in this embodiment, 5 groups of force data are collected as a large group of data, and are sorted according to the module length. After sorting, the median group of force data is obtained, and the average acceleration data is calculated based on the average value of several groups of acceleration data;
[0071] S13, collecting the current position and current posture of the patient's upper limb based on the upper limb rehabilitation robot;
[0072] It can be understood that the current position and current posture of the patient's upper limbs can be obtained through the force data, acceleration data and position of the patient's upper limbs collected by the upper limb rehabilitation robot.
[0073] S2, acquiring three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position and the current posture;
[0074] Specifically, the step S2 includes steps S21 to S22:
[0075] S21, constructing a three-dimensional space coordinate system based on the current position and the current posture;
[0076] It can be understood that a three-dimensional space coordinate system is constructed by the current position and current posture of the patient's upper limb, so that the position of the patient's upper limb can be expressed in the three-dimensional space coordinate system.
[0077] S22, correcting the force direction and acceleration direction of the patient's upper limb based on the current position, the current posture, the median group force data and the average acceleration data, so as to output three-dimensional force data and three-dimensional acceleration data based on the three-dimensional space coordinate system;
[0078] It can be understood that the force data and acceleration data are integrated according to the current position and posture of the upper limb to correct the force direction and acceleration direction of the patient's upper limb to ensure that the force direction and acceleration coordinates will not shift with the movement, and finally the three-dimensional force data and three-dimensional acceleration data relative to the three-dimensional space coordinate system can be output. It is worth noting that in this embodiment, the expression of the vector of the three-dimensional force data is: F=[ f x ,f y ,f z ], f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Represents the force data in the z-axis direction. The expression of the vector of three-dimensional acceleration is: A= [A x ,A y ,A z ], A x represents the acceleration in the x-axis direction, A y represents the acceleration in the y-axis direction, A z Indicates the acceleration in the z-axis direction.
[0079] S3, collecting the movement tendency of the patient's upper limb, outputting a force signal model based on the movement tendency, and generating muscle strength evaluation data based on the force signal model;
[0080] It is understandable that the movement tendency of the patient's upper limbs is collected through the upper limb rehabilitation robot. It is worth explaining that the movement tendency means that when the patient's upper limbs make a slight movement, it can be judged that the patient's upper limbs are moving in one of the forward, backward, left and right directions. Therefore, the force signal model is output according to the movement tendency of the patient's upper limbs to output the force signal model of the patient's upper limbs in the actual movement process and form muscle strength evaluation data.
[0081] S4, confirming a gain coefficient according to the muscle strength evaluation data, and processing the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data;
[0082] Specifically, the step S4 includes steps S41 to S43:
[0083] S41, generating a data evaluation result based on the muscle strength evaluation data;
[0084] It can be understood that the muscle strength evaluation data is evaluated to generate data evaluation results.
[0085] S42, establishing an individual training model, and introducing rapid movement of upper limbs, slow movement of upper limbs, medium-speed movement of upper limbs, long-distance movement of upper limbs, short-distance movement of upper limbs, and arc movement of upper limbs to train the individual training model, so as to obtain an optimized individual training model;
[0086] It can be understood that introducing rapid movements of the upper limbs, slow movements of the upper limbs, medium-speed movements of the upper limbs, long-distance movements of the upper limbs, short-distance movements of the upper limbs and arc movements of the upper limbs into the individual training model can effectively optimize the individual training model, so that the individual training model can be optimized according to various movements of the upper limbs.
[0087] S43, the optimized individual training model confirms the gain coefficient based on the data evaluation result;
[0088] It needs to be explained that the expression for confirming the gain coefficient is:
[0089] ;
[0090] In the formula, F out represents the output signal of the signal amplification and shaping process, D represents the selection coefficient, m represents the gain coefficient, and F=[f x ,f y ,f z ] represents the force data generated by the patient's upper limb based on the origin space coordinate system, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Indicates the force data in the z-axis direction, mnx Represents the gain coefficient of the x-axis direction force corresponding to n groups, m ny Represents the gain coefficient of the y-axis direction force corresponding to n groups, m nz Represents the gain coefficient of the z-axis direction force corresponding to n groups.
[0091] It can be understood that f is the force output by the patient's upper limb, and D is the selection coefficient. Its significance lies in selecting the corresponding gain parameter according to the direction and magnitude of the input force data F. Therefore, at the same moment, only one of D1 to D 60 is 1, and the rest are 0. n Since there is only one selection coefficient at the same moment, it is necessary to confirm the selection coefficient D
[0092] The confirmation method of D n is determined by the direction and magnitude of the input data F. n , f represents the corresponding force level of the patient, that is, using f1 to f j to distinguish the levels of the patient's force exertion. F 10 is the maximum force output during the movement of the patient's upper limb. j takes values from 1 to 10, and it is required that |F| is less than f max and greater than f j , for example, when f7 < |F| < f8, j takes 8, and f j-1 represents the corresponding force level of the patient, f j-1 is less than f j-1 , that is, fj-1 is the force level before fj, and the value of j can be obtained. j , k represents the selection of direction. k is confirmed by the direction of F. The values of k corresponding to the front, back, left, right, up, and down directions of F are 0 to 5 in sequence. That is, different k values are confirmed according to different directions of the input force F. The gain coefficient is divided into groups according to the direction and magnitude of the input force data, with 10 levels of force magnitudes, and each level corresponds to 6 directions. Its actual significance lies in dealing with the non-linear growth problem of different directions and magnitudes of the patient's output force. m is the gain coefficient, and m
[0093] represents the gain coefficient of the x-axis direction force corresponding to n groups, m nx represents the gain coefficient of the y-axis direction force corresponding to n groups, m ny represents the gain coefficient of the z-axis direction force corresponding to n groups, m nz represents the gain coefficient of the z-axis direction force corresponding to n groups. The meaning of n in m nx is as follows: , k is confirmed by the direction of F, corresponding to 0 to 5 in sequence for front, back, left, right, up, and down. j can take values from 1 to 10. , and it is required that |F| is less than f j and greater than f j-1, the value of j can be obtained. That is, the gain coefficients for input force data of different sizes and directions are different.
[0094] m nx 、m ny 、m nz It can be different, that is, nonlinear amplification, allowing directional deviation, but it is necessary to ensure that the deviation angle after F gain is less than 45°.
[0095] Its practical significance lies in amplifying and correcting the force data of different sizes and directions emitted by the patient to different degrees, so as to solve the problems of nonlinear growth and directional deviation during the amplification of the patient's rehabilitation movement.
[0096] In this embodiment, m is the gain coefficient, and the F after gain out The angle with F is less than 45°, where the calculation process of m and d is to collect the patient's maximum force output data within 5 seconds and save it as f 60 , confirm the data output gain m 60 , the calculation expression is:
[0097] m 60x =m 60y =m 60z =|f man | / |f 60 |;
[0098] In the formula, f man It represents the average value of the maximum force output by healthy people of the corresponding gender and age group, f 60 represents the maximum force output of the patient, where m1=m2=···=m 60 , output gain coefficient m to the signal amplification and shaping process, use this set of coefficients to process the input data, and output F out , and conduct guided fast movement, slow movement, medium speed movement, long distance movement, short distance movement, and arc movement training with a predetermined trajectory. It is worth noting that the three-dimensional acceleration data is directly processed into the long-short time neural network model.
[0099] Specifically, the step S43 includes step S431:
[0100] A particle swarm algorithm is used to assign a number of particles to each parameter in the optimization individual training model to calculate the optimal solution of the gain coefficient;
[0101] Wherein, the expression for calculating the optimal solution of the gain coefficient is:
[0102] min f zy (m nx , m ny , m nz)= ;
[0103] In the formula, the value range of n is 1~60. is the end point of the sampling time, t is the specific parameter value corresponding to time t, Choose parameter D for time t n The value of are the given trajectory coordinates and speed at time t, The speed and The speed is the same, represents the long-short time neural network model, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz represents the gain coefficient of the z-axis force corresponding to group n, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z represents the force data in the z-axis direction, A represents the three-dimensional acceleration data, and f zy Represents the sum of the offset variances between the predicted target position and the set target position using the same gain parameter in the motion trajectory;
[0104] It should be explained that, in this embodiment, each parameter in the optimization individual training model is assigned to 5 particles for calculation, and the optimal solution corresponding to m is found, and m1~m is corrected. 60 Parameter configuration;
[0105] It is worth noting that, in this embodiment, the number of particles is 5, the maximum number of iterations is 2000, the maximum speed is 20, the minimum limit is 20 mm, each particle is a three-dimensional real vector, and the gain direction deviation is limited to 45°.
[0106] In addition, the input data is processed using the gain coefficient according to the training results of the individual training model, and the acceleration is not additionally processed.
[0107] S5, inputting the three-dimensional acceleration data and the processed three-dimensional force data into a long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulating a rehabilitation exercise strategy according to the movement trajectory prediction result;
[0108] Specifically, the step S5 includes steps S51 to S54:
[0109] S51, collecting historical rehabilitation movement data of the upper limb rehabilitation robot;
[0110] It needs to be explained that the long short-term memory network model is a machine learning algorithm widely used in time series signal prediction and classification. LSTM is a special type of RNN that can learn long-term dependent information. The basic structure is the same as RNN, which is a chain form of repeated neural network modules. LSTM has four special layers for interaction between input and output. The LSTM network is like a cell that is constantly updating, and its key concept is the cell state. LSTM has the ability to remove or add information to the cell state through carefully designed structures called "gates". The gate allows information to pass selectively, 0 means that no amount is allowed to pass, and 1 means that any amount passes. LSTM has three gates to update the cell state, namely the forget gate, input gate, and output gate. Among them, the forget gate and input gate are the main parts of the long short-term memory network that can maintain the activity of the network. As the network continues to iterate and update, it determines the information that needs to be discarded and retained in the network. For example Figure 2 As shown, the structure diagram of the long short-term memory network model is shown;
[0111] The first step is to decide what information to discard from the cell state. This is done through the sigmoid layer of the "forget gate", which reads the output information of the previous moment. and the current input information x t , output a value f between 0 and 1 t Give each cell state a number, 1 means completely keep it, 0 means completely discard it.
[0112] ;
[0113] In the formula, represents the sigmoid function, W f represents the weight of the forget gate, b f represents the bias of the forget gate. The second step is to determine the new information stored in the cell state. First, the sigmoid layer of the "input gate" determines the value i to be updated. t Second, a new cell state candidate value vector is created through the tanh layer , the expressions of the updated value and the new cell state candidate value vector are respectively;
[0114] ;
[0115] ;
[0116] Where W i represents the sigmoid function weight corresponding to the input gate, b i Represents the sigmoid function bias corresponding to the input gate, Represents the tanh function weight corresponding to the input gate, represents the input function value at time t, Represents the tanh function weight corresponding to the input gate.
[0117] The old cell state And the f obtained by the “forget gate” t Multiply, discard the information that needs to be discarded, and add the updated value i obtained by the "input gate" t With the new cell candidate value vector C t The product of , gets the new cell state C t。
[0118] ;
[0119] The third step is to determine the output result (prediction result). The output result will be based on the current state of the cell C t The current input information x t It will go through a sigmoid layer to determine the output result o t Next, the output result o t Multiply C by the cell state processed by the tanh layer t , get the output h determined at the current moment t , the expression of the processing process is:
[0120] ;
[0121] ;
[0122] Where W o Represents the output gate o t The weight of b o Represents the output gate o t The bias.
[0123] The LSTM model was built in the MATLAB environment; the LSTM network architecture was defined as follows, the number of input features and the number of output responses were both 6, and the number of hidden units in the network was set to 300; the solver for the training model was set to 'Adam' and 200 rounds of training were performed; to prevent gradient explosion, the gradient threshold was set to 1, the initial learning rate was 0.005, and the learning rate was reduced by multiplying it by a reduction factor of 0.5 after every 50 rounds of training;
[0124] It can be understood that the historical rehabilitation movement data of the upper limb rehabilitation robot is collected, and the historical rehabilitation movement data is composed of the corresponding rehabilitation training movement trajectory and collected data of the healthy person using the upper limb rehabilitation robot;
[0125] S52, converting the three-dimensional acceleration data and the processed three-dimensional force data into target point position information and target point velocity;
[0126] It can be understood that, in this embodiment, the three-dimensional acceleration data is A= [A x ,A y ,A z ], A x Represents the acceleration data in the x-axis direction, A y Represents the acceleration data in the y-axis direction, A z It represents the acceleration data in the z-axis direction, and the three-dimensional force data is F=[ f x ,f y ,f z ], f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Represents the force data in the z-axis direction. The converted target point position information is P=[P x ,P y ,P z ], P x Represents the coordinate in the x-axis direction, P y , represents the coordinate in the y-axis direction, P z Represents the coordinate in the z-axis direction, and the target point speed is V=[V x ,V y ,V z ],V x represents the velocity in the x-axis direction, V y Indicates the velocity in the y-axis direction, V z Indicates the speed in the z-axis direction;
[0127] S53, predicting the motion trajectory of the patient's upper limb based on the historical rehabilitation exercise data, the target point position information, and the target point speed through the long short-term memory network model to obtain a motion trajectory prediction result;
[0128] It should be explained that in order to prevent the training divergence of the long short-term memory network model, the historical rehabilitation exercise data first need to be standardized into a data set with zero mean and unit variance. The data set is divided into a training data set and a test data set in a ratio of 6:4.
[0129] S54, formulating a rehabilitation exercise strategy based on the upper limb rehabilitation robot according to the motion trajectory prediction result;
[0130] Specifically, the step S54 includes step S541 to step S542:
[0131] S541, converting the historical rehabilitation exercise data into an input vector;
[0132] S542, inputting the input vector into the long short-term memory network model, and formulating a rehabilitation exercise strategy based on the motion trajectory prediction result, so that the upper limb rehabilitation exercise robot performs rehabilitation exercise on the patient's upper limb based on the rehabilitation exercise strategy;
[0133] It can be understood that the historical rehabilitation movement data is converted into an input vector with the goal of using past historical collected data to predict the motion trajectory of the next time step. The prediction time step is defined as 1 sampling point, and the historical rehabilitation movement data is used as the input vector. The motion trajectory prediction result vector is the output vector of the long short-term memory network model, and the upper limb rehabilitation robot assists the patient's upper limbs to complete the corresponding rehabilitation movement.
[0134] Specifically, the step S542 includes step S5421 to step S5422:
[0135] S5421, recording the corresponding movement trajectory of the rehabilitation exercise to obtain a movement trajectory result;
[0136] It is understandable that rehabilitation exercises can be divided into free exercises and guided exercises along a predetermined trajectory. When guiding patients to perform rehabilitation exercises along a predetermined trajectory, the corresponding movement trajectories are recorded to obtain movement trajectory results.
[0137] S5422, comparing the movement trajectory result with the predetermined trajectory result, and adjusting the rehabilitation movement strategy to obtain an optimal rehabilitation movement strategy;
[0138] It is understandable that by comparing the motion trajectory results with the established trajectory results, and optimizing the parameter configuration of signal amplification and shaping by micro-disturbance through the particle swarm algorithm, the motion prediction effect will be more accurate as the number of training increases, and it can be adaptively changed according to the patient's rehabilitation status, that is, accurate motion prediction can still be performed in the case of gradual recovery. It needs to be explained that rehabilitation motion prediction can be performed for patients with muscle strength levels 0 to 1, and the motion prediction results are gradually optimized.
[0139] In summary, the upper limb rehabilitation movement prediction method in the above-mentioned embodiment of the present invention can predict the movement of the patient's upper limbs by collecting the force data and acceleration data of the patient's upper limbs and combining the force signal model output by the movement tendency, and can effectively collect the patient's movement data, and process the three-dimensional force data based on the gain coefficient, so as to predict the micro-movement behavior of patients with weak upper limb muscle strength, and predict the movement trajectory of the patient's upper limb through the long short-term memory network model to obtain the movement trajectory prediction result, thereby avoiding the problem of unpredictable micro-movements of patients with weak upper limb muscle strength, thereby achieving better rehabilitation exercise effects.
[0140] Embodiment 2
[0141] See also Figure 3 , shown is an upper limb rehabilitation movement prediction system in a second embodiment of the present invention, the system comprising:
[0142] The first acquisition module 11 is used to collect several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, pre-process the several groups of force data and several groups of acceleration data to obtain the median group force data and average acceleration data, and obtain the current position and current posture of the patient's upper limbs;
[0143] An acquisition module 12, configured to acquire three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position, and the current posture;
[0144] A second acquisition module 13 is used to acquire the movement tendency of the patient's upper limbs, output a force signal model based on the movement tendency, and generate muscle strength evaluation data based on the force signal model;
[0145] A processing module 14, configured to determine a gain coefficient according to the muscle strength evaluation data, and process the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data;
[0146] The prediction and formulation module 15 is used to input the three-dimensional acceleration data and the processed three-dimensional force data into the long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulate a rehabilitation exercise strategy based on the movement trajectory prediction result.
[0147] In some optional embodiments, the first acquisition module 11 includes:
[0148] A first acquisition unit is used to acquire several groups of force data of the patient's upper limbs through a three-dimensional force sensor, and to acquire several groups of acceleration data of the patient's upper limbs through an acceleration sensor;
[0149] A sorting unit, used for sorting the plurality of groups of force data according to the module length to obtain a median group of force data, and calculating average acceleration data according to the plurality of groups of acceleration data;
[0150] The second acquisition unit is used to acquire the current position and current posture of the patient's upper limb based on the upper limb rehabilitation robot.
[0151] In some optional embodiments, the acquisition module 12 includes:
[0152] A construction unit, configured to construct a three-dimensional space coordinate system based on the current position and the current posture;
[0153] A correction unit is used to correct the force direction and acceleration direction of the patient's upper limb based on the current position, the current posture, the median group force data and the average acceleration data, so as to output three-dimensional force data and three-dimensional acceleration data based on the three-dimensional space coordinate system.
[0154] In some optional embodiments, the processing module 14 includes:
[0155] A generating unit, configured to generate a data evaluation result based on the muscle strength evaluation data;
[0156] An establishing unit is used to establish an individual training model, and introduce fast movement of upper limbs, slow movement of upper limbs, medium-speed movement of upper limbs, long-distance movement of upper limbs, short-distance movement of upper limbs and arc movement of upper limbs to train the individual training model, so as to obtain an optimized individual training model;
[0157] A confirmation unit, used for confirming a gain coefficient of the optimized individual training model based on the data evaluation result;
[0158] The expression of the confirmation gain coefficient is:
[0159] ;
[0160] In the formula, F out represents the output signal of the signal amplification and shaping process, D represents the selection coefficient, n ranges from 1 to 60, m represents the gain coefficient, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Indicates the force data in the z-axis direction, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz Represents the gain coefficient of the z-axis force corresponding to group n.
[0161] In some optional embodiments, the confirmation unit includes:
[0162] An allocation calculation subunit is used to allocate a number of particles to each parameter in the optimization individual training model by using a particle swarm algorithm to calculate the optimal solution of the gain coefficient;
[0163] Wherein, the expression for calculating the optimal solution of the gain coefficient is:
[0164] min f zy (mnx , m ny , m nz )= ;
[0165] In the formula, the value range of n is 1~60. is the end point of the sampling time, t is the specific parameter value corresponding to time t, Choose parameter D for time t n The value of are the given trajectory coordinates and speed at time t, The speed and The speed is the same, represents the long-short time neural network model, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz represents the gain coefficient of the z-axis force corresponding to group n, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z represents the force data in the z-axis direction, A represents the three-dimensional acceleration data, and f zy It represents the sum of the deviations between the predicted target position and the set target position using the same gain parameter in the motion trajectory.
[0166] In some optional embodiments, the prediction formulation module 15 includes:
[0167] The acquisition submodule is used to collect historical rehabilitation movement data of the upper limb rehabilitation robot;
[0168] A conversion submodule, used for converting the three-dimensional acceleration data and the processed three-dimensional force data into target point position information and target point velocity;
[0169] A prediction submodule, configured to predict the motion trajectory of the patient's upper limb based on the historical rehabilitation motion data, the target point position information, and the target point speed through the long short-term memory network model to obtain a motion trajectory prediction result;
[0170] A formulation submodule is used to formulate a rehabilitation movement strategy based on the upper limb rehabilitation robot according to the motion trajectory prediction result.
[0171] In some optional embodiments, the formulation submodule includes:
[0172] A conversion unit, used for converting the historical rehabilitation movement data into an input vector;
[0173] A formulation unit is used to input the input vector into the long short-term memory network model, and formulate a rehabilitation exercise strategy based on the motion trajectory prediction result, so that the upper limb rehabilitation exercise robot performs rehabilitation exercise on the patient's upper limb based on the rehabilitation exercise strategy.
[0174] In some optional embodiments, the formulation unit includes:
[0175] A recording subunit, used for recording the corresponding motion trajectory of the rehabilitation exercise to obtain a motion trajectory result;
[0176] The adjustment subunit is used to compare the motion trajectory result with the predetermined trajectory result, and adjust the rehabilitation motion strategy to obtain the optimal rehabilitation motion strategy.
[0177] The functions or operation steps implemented when the above modules and units are executed are generally the same as those in the above method embodiments, and will not be repeated here.
[0178] The upper limb rehabilitation movement prediction system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference can be made to the corresponding contents in the aforementioned method embodiment.
[0179] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0180] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for predicting upper limb rehabilitation movement, applied to an upper limb rehabilitation robot, characterized in that: The method comprises: Collecting several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, preprocessing the several groups of force data and the several groups of acceleration data to obtain median group force data and average acceleration data, and obtaining the current position and current posture of the patient's upper limbs; Acquire three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position, and the current posture; collecting the movement tendency of the patient's upper limb, outputting a force signal model based on the movement tendency, and generating muscle strength evaluation data based on the force signal model; Determining a gain coefficient according to the muscle strength evaluation data, and processing the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data; The step of confirming the gain coefficient according to the muscle strength evaluation data comprises: generating a data evaluation result based on the muscle strength evaluation data; Establishing an individual training model, and introducing rapid upper limb movement, slow upper limb movement, medium-speed upper limb movement, long-distance upper limb movement, short-distance upper limb movement, and arc movement of the upper limb to train the individual training model, so as to obtain an optimized individual training model; Determining a gain coefficient based on the data evaluation result by optimizing the individual training model; The step of optimizing the individual training model and confirming the gain coefficient based on the data evaluation result comprises: A particle swarm algorithm is used to assign a number of particles to each parameter in the optimization individual training model to calculate the optimal solution of the gain coefficient; Wherein, the expression for calculating the optimal solution of the gain coefficient is: min f zy (m nx , m ny , m nz )= ; In the formula, the value range of n is 1~60. is the end point of the sampling time, t is the specific parameter value corresponding to time t, Choose parameter D for time t n The value of are the given trajectory coordinates and speed at time t, The speed and The speed is the same, represents the long short-term memory network model, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz represents the gain coefficient of the z-axis force corresponding to group n, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z represents the force data in the z-axis direction, A represents the three-dimensional acceleration data, and f zy Represents the sum of the offset variances between the predicted target position and the set target position using the same gain parameter in the motion trajectory; The three-dimensional acceleration data and the processed three-dimensional force data are input into the long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and a rehabilitation exercise strategy is formulated according to the movement trajectory prediction result.
2. The upper limb rehabilitation exercise prediction method according to claim 1, characterized in that: The steps of collecting several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, preprocessing the several groups of force data and the several groups of acceleration data to obtain median group force data and average acceleration data, and obtaining the current position and current posture of the patient's upper limbs include: Collecting several groups of force data of the patient's upper limbs through a three-dimensional force sensor, and collecting several groups of acceleration data of the patient's upper limbs through an acceleration sensor; Sorting the force data of the plurality of groups according to the module length to obtain the median force data, and calculating the average acceleration data according to the acceleration data of the plurality of groups; The current position and current posture of the patient's upper limbs are collected based on the upper limb rehabilitation robot.
3. The upper limb rehabilitation exercise prediction method according to claim 1, characterized in that: The step of acquiring three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position and the current posture comprises: Constructing a three-dimensional space coordinate system based on the current position and the current posture; Based on the current position, the current posture, the median group force data and the average acceleration data, the force direction and acceleration direction of the patient's upper limb are corrected to output three-dimensional force data and three-dimensional acceleration data based on the three-dimensional space coordinate system.
4. The upper limb rehabilitation exercise prediction method according to claim 1, characterized in that: The expression of the confirmation gain coefficient is: ; In the formula, F out represents the output signal of the signal amplification and shaping process, D represents the selection coefficient, n ranges from 1 to 60, m represents the gain coefficient, f x Represents the force data in the x-axis direction, f y Represents the force data in the y-axis direction, f z Indicates the force data in the z-axis direction, m nx represents the gain coefficient of the x-axis force corresponding to n groups, m ny represents the gain coefficient of the y-axis force corresponding to n groups, m nz Represents the gain coefficient of the z-axis force corresponding to group n.
5. The upper limb rehabilitation exercise prediction method according to claim 1, characterized in that: The steps of using the long short-term memory network model to predict the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulating a rehabilitation exercise strategy according to the movement trajectory prediction result include: Collect historical rehabilitation movement data of upper limb rehabilitation robots; Converting the three-dimensional acceleration data and the processed three-dimensional force data into target point position information and target point velocity; Predicting the motion trajectory of the patient's upper limb based on the historical rehabilitation motion data, the target point position information, and the target point speed by using the long short-term memory network model to obtain a motion trajectory prediction result; A rehabilitation movement strategy is formulated according to the motion trajectory prediction result and based on the upper limb rehabilitation robot.
6. The upper limb rehabilitation exercise prediction method according to claim 5, characterized in that: The step of formulating a rehabilitation movement strategy based on the upper limb rehabilitation robot according to the motion trajectory prediction result comprises: Converting the historical rehabilitation movement data into an input vector; The input vector is input into the long short-term memory network model, and a rehabilitation movement strategy is formulated based on the motion trajectory prediction result, so that the upper limb rehabilitation robot performs rehabilitation movement on the patient's upper limb based on the rehabilitation movement strategy.
7. The upper limb rehabilitation exercise prediction method according to claim 6, characterized in that: The step of enabling the upper limb rehabilitation exercise robot to perform rehabilitation exercise on the patient's upper limb based on the rehabilitation exercise strategy comprises: Recording the corresponding movement trajectory of the rehabilitation exercise to obtain a movement trajectory result; The movement trajectory result is compared with the predetermined trajectory result, and the rehabilitation movement strategy is adjusted to obtain the optimal rehabilitation movement strategy.
8. An upper limb rehabilitation exercise prediction system, applied to the upper limb rehabilitation exercise prediction method according to any one of claims 1 to 7, characterized in that: The system comprises: The first acquisition module is used to collect several groups of force data of the patient's upper limbs and several groups of acceleration data of the patient's upper limbs, pre-process the several groups of force data and the several groups of acceleration data to obtain the median group force data and average acceleration data, and obtain the current position and current posture of the patient's upper limb; An acquisition module, configured to acquire three-dimensional force data and three-dimensional acceleration data based on the median group force data, the average acceleration data, the current position, and the current posture; A second acquisition module is used to acquire the movement tendency of the patient's upper limbs, output a force signal model based on the movement tendency, and generate muscle strength evaluation data based on the force signal model; a processing module, configured to determine a gain coefficient according to the muscle strength evaluation data, and process the three-dimensional force data based on the gain coefficient to obtain processed three-dimensional force data; A prediction and formulation module is used to input the three-dimensional acceleration data and the processed three-dimensional force data into a long short-term memory network model, so that the long short-term memory network model predicts the movement trajectory of the patient's upper limb to obtain a movement trajectory prediction result, and formulate a rehabilitation exercise strategy based on the movement trajectory prediction result.
