Rehabilitation exercise data processing method and computing device
Through sensors, the angle data of the big arm and forearm in rehabilitation actions and the pattern recognition algorithm is used to identify feature data, the problems of inefficiency and lack of objective data are solved, and efficient and accurate rehabilitation diagnosis is achieved.
Patent Information
- Application Number
- CN202411995827.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
AI Technical Summary
Traditional rehabilitation diagnosis methods are inefficient and lack objective data support, and rely on the subjective judgment of rehabilitation physicians.
The sensor collects Euler angle data and time data of the big arm and forearm, calculates the angle data, and recognizes the characteristic data of rehabilitation actions through the pattern recognition algorithm to generate objective rehabilitation diagnostic data.
It realizes that the data required for rehabilitation diagnosis can be generated without the need for patients to go to the hospital, provides objective support for judging rehabilitation situations, and improves diagnostic efficiency and accuracy.
Smart Images

Figure CN119889579A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method and a computing device for processing rehabilitation exercise data. Background Art
[0002] Rehabilitation medicine is a field of medicine that focuses on helping patients restore physical function and improve their quality of life. It focuses on functional impairments caused by illness, injury or surgery, and uses comprehensive treatment methods to improve patients' functions and independent living ability.
[0003] At present, rehabilitation diagnosis generally requires patients to go to a rehabilitation hospital and perform designated rehabilitation movements under the guidance of a rehabilitation physician, who will then assess the patient's motor ability based on their experience.
[0004] However, the traditional rehabilitation diagnosis method has the following problems: (1) Patients need to go to a rehabilitation hospital and be diagnosed on-site by a rehabilitation physician, which is inefficient; (2) The rehabilitation effect often depends on the subjective judgment of the rehabilitation physician and lacks objective data support. Summary of the invention
[0005] Purpose of the invention: The technical problem to be solved by the present invention is to provide a method and a computing device for processing rehabilitation exercise data in view of the deficiencies in the prior art.
[0006] A method for processing rehabilitation exercise data of the present invention includes the following steps: a first step: collecting Euler angle data and time data of a first part and a second part through a sensor, wherein the first part and the second part are parts connected by human joints; a second step: performing multiple calculations based on the Euler angle data and time data of the first part and the second part to obtain data on the change of the angle between the first part and the second part over time; a third step: inputting the angle data between the first part and the second part at the multiple time points into a pattern recognition algorithm to identify the characteristic data of the action.
[0007] Furthermore, the first part is the upper arm, and the second part is the forearm.
[0008] Furthermore, the angle data between the first part and the second part is calculated by converting the Euler angle data of the first part and the second part into quaternions, and calculating the angle data between the first part and the second part based on the quaternions.
[0009] Furthermore, the method for calculating the angle data between the first part and the second part based on quaternion is:
[0010] Suppose two unit quaternions are q1 = (w1, x1, y1, z1) and q2 = (w2, x2, y2, z2). Their dot product is:
[0011] dot(q1, q2)=w1w2+x1x2+y1y2+z1z2
[0012] The cosine of the angle θ is:
[0013] cos(θ)=|dot(q1,q2)|
[0014] To ensure that the angle is in the range [0, π], the absolute value notation can be used.
[0015] The angle θ is:
[0016] θ=arccos(cos(θ)).
[0017] Furthermore, the pattern recognition algorithm comprises the following steps:
[0018] Step 1: Smoothing the angle data between the first part and the second part at multiple time points by using a Gaussian filter;
[0019] Step 2: According to preset conditions, the start and end point data of the action are filtered out from the angle data between the first part and the second part at multiple time points to identify the characteristic data of the action.
[0020] Furthermore, the preset conditions include a time threshold and an angle data threshold.
[0021] Furthermore, the characteristic data includes: amplitude, frequency and number of actions.
[0022] Furthermore, the pattern recognition algorithm comprises the following steps:
[0023] A. Filter the peak points and valley points that meet the conditions in the angle data as the "pending start and end points" of the action;
[0024] B. According to the standard that a qualified complete action can be completed in a maximum of t seconds, the "pending start" of the action described in step B
[0025] The "undetermined start and end points" are screened in a cycle until no "undetermined start and end points" are screened out;
[0026] C. The start and end points selected above are defined as the start and end points of the identified designated action, and the signal data between the start and end points are defined as the identified action data.
[0027] Furthermore, the screening conditions of the aforementioned step A are:
[0028] Adjacent peak / trough points are at least 3 units apart; the height difference of the peak / trough point relative to the lowest / highest point around it ranges from 25-35 units; in the slope push-up movement, the height of the peak is between 95 degrees and 180 degrees, and the height of the trough is between 55 degrees and 160 degrees; in the elbow flexion and extension movement, the height of the peak is between 45 degrees and 200 degrees, and the height of the trough is between -15 degrees and 70 degrees.
[0029] Furthermore, the screening conditions of step B are: there is at least one valley / peak value within 3.5 seconds before and after each peak / valley value; and the time interval between every three adjacent peak / valley values does not exceed 14 seconds.
[0030] A computing device of the present invention comprises: a storage device for storing at least one program; a processing device connected to the storage device, for calling the at least one program from the storage device and implementing the method for processing rehabilitation exercise data as described in any one of claims 1 to 9 when executing it.
[0031] This application has the following beneficial effects:
[0032] A method for processing rehabilitation motion data and a computing device of the present invention collect motion data of a first part and a second part through a sensor, for example, data on the change over time of the Euler angles of the first part (in the X, Y, and Z directions) and the second part in a three-dimensional space coordinate system, so as to calculate the angle data of the upper arm and the forearm at multiple moments when performing rehabilitation movements. Furthermore, characteristic data such as the amplitude, frequency, and number of rehabilitation movements can be obtained through the angle data, thereby achieving the generation of data required for rehabilitation diagnosis without the patient having to go to the hospital, and being able to provide objective data support for the judgment of the rehabilitation situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The specific features of the invention involved in this application are shown in the attached claims. The features and advantages of the invention involved in this application can be better understood by referring to the exemplary embodiments and drawings described in detail below. The drawings are briefly described as follows:
[0034] Figure 1 Shown are steps in one embodiment of a method for processing rehabilitation exercise data of the present application.
[0035] Figure 2 Shown is a data schematic diagram of the change of the angle between the first part and the second part over time in one embodiment of a method for processing rehabilitation exercise data of the present application.
[0036] Figure 3 FIG. 1 is a flow chart of step S130 of a method for processing rehabilitation exercise data in one embodiment of the present invention.
[0037] Figure 4The diagram shows the Euler angle data collected in one embodiment of the present application. Figure 4 (a) is the collected Euler angle data of the upper arm, Figure 4 (b) is the collected forearm Euler angle data. DETAILED DESCRIPTION
[0038] The following is an explanation of the implementation of the present application by means of specific embodiments. People familiar with the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification.
[0039] In the following description, reference is made to the accompanying drawings, which describe several embodiments of the present application. It should be understood that other embodiments may also be used, and changes in module or unit composition, electrical and operational aspects may be made without departing from the spirit and scope of the present disclosure. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0040] Although the terms first, second, etc. are used to describe various elements or parameters in this article in some instances, these elements or parameters should not be limited by these terms. These terms are only used to distinguish one element or parameter from another element or parameter. For example, the first part can be referred to as the second part, and similarly, the second part can be referred to as the first part, without departing from the scope of the various described embodiments. The first part and the second part are both describing a sensor, but unless the context clearly indicates otherwise, they are not the same sensor.
[0041] Furthermore, as used in this article, the singular forms "one", "an" and "the" are intended to include plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions, steps or operations is inherently mutually exclusive in some way.
[0042] In view of the technical problems mentioned in the background technology, the present application discloses a method for processing rehabilitation motion data and a computing device. The motion data of a first part and a second part are collected by a sensor, such as the data of the change of the Euler angles of the first part and the second part in the X, Y, and Z directions in a three-dimensional space coordinate system over time, so as to calculate the angle data of the upper arm and the forearm at multiple moments when performing rehabilitation movements, such as elbow flexion and extension, and slope push-ups. Furthermore, characteristic data such as the amplitude, frequency, and number of rehabilitation movements can be obtained through the angle data, which can be used to evaluate the patient's rehabilitation status, thereby generating the data required for rehabilitation diagnosis without the patient having to go to the hospital.
[0043] The present application is described below by taking a computing device executing a method for processing rehabilitation exercise data as an example.
[0044] See also Figure 1 , Figure 1 The figure shows a flowchart of a method for processing rehabilitation exercise data in one embodiment of the present application. In step S110, the computing device collects Euler angle data and time data of a first part and a second part through a sensor, wherein the first part and the second part are parts connected by a human body joint, for example, the first part and the second part, the thigh is the first part, and the foreleg is the second part. The time data refers to the corresponding data at each time when the sensor collects multiple data.
[0045] The method for calculating the angle data between the first part and the second part based on quaternion of the present invention is:
[0046] Suppose two unit quaternions are q1 = (w1, x1, y1, z1) and q2 = (w2, x2, y2, z2). Their dot product is:
[0047] dot(q1, q2)=w1w2+x1x2+y1y2+z1z2
[0048] The cosine of the angle θ is:
[0049] cos(θ)=|dot(q1,q2)|
[0050] To ensure that the angle is in the range [0, π], the absolute value notation can be used.
[0051] The angle θ is:
[0052] θ=arccos(cos(θ)).
[0053] The method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0054] Wherein: θ is the angle between the first part and the second part. The method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0055] The method of calculating Euler angles based on quaternions of the present invention is as follows:
[0056] Assuming the quaternion is q = (w, x, y, z), the Euler angle can be calculated as:
[0057] 1. Rotation angle φ around the x-axis:
[0058] φ=arctan 2(2(wx+yz),1-2(x 2 +y 2 ))
[0059] 2. Rotation angle θ around the y-axis:
[0060] θ=arcsin(2(wy-zx))
[0061] (Note: If |2(wy-zx)|>1, truncation is required)
[0062] 3. Rotation angle ψ around the z-axis:
[0063] ψ=arctan 2(2(wz+xy),1-2(y 2 +z 2 )).
[0064] The method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0065] The method of calculating quaternion based on Euler angles of the present invention is:
[0066] Assuming that the Euler angles use the ZYX order (i.e., around the z-axis, then the y-axis, and finally the x-axis), the angles are φ (around the x-axis), θ (around the y-axis), and ψ (around the z-axis). The calculation formula for the quaternion is:
[0067]
[0068] In this implementation, if the Euler angle is a negative number, the Euler angle can also be directly converted into a quaternion to calculate the angle, and an accurate value can be obtained. When the Euler angle has an out-of-bounds problem, the angle between the first part and the second part will be greater than 180 degrees. For example, when a=(0, 0, 150), b=(0, 0, 170), the angle between the first part and the second part calculated by the quaternion is 20 degrees. When 170 in b increases by 15 degrees, an out-of-bounds situation will occur, b=(0, 0, -175), at this time, the angle value between the first part and the second part calculated by the quaternion is 325 degrees, which is greater than 180 degrees. At this time, the actual angle between the first part and the second part is 35 degrees, and the actual angle of 35 degrees can be obtained by subtracting the calculated value of 325 degrees from 360 degrees. Therefore, when the method of the present invention is actually calculated, if the angle α between the first part and the second part is greater than 180 degrees, it is judged that an out-of-bounds problem has occurred, and 360-α is used as the actual angle. The method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0069] Further, in step S120, the computing device performs multiple calculations based on the Euler angle data and time data of the first part and the second part to obtain data on the change of the angle between the first part and the second part over time. Figure 2 , Figure 2 The data diagram showing the change of the angle between the first part and the second part over time in one embodiment of the present application is shown. The horizontal axis represents the time value, and the vertical axis represents the angle between the first part and the second part. A method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0070] In actual operation, the patient's arms or legs and other parts do not necessarily move along a vertical plane. Therefore, directly calculating the angle of the arms or legs and other parts based on the angles of the three directions of the X, Y, and Z axes collected by the sensor will result in a very large error. The use of Euler angles may cause cumulative errors due to floating-point precision problems, and quaternions can reduce such numerical errors due to their high floating-point precision. In one embodiment, the angle data between the first part and the second part is calculated by converting the Euler angle data of the first part and the second part into a quaternion, so as to calculate the angle data between the first part and the second part based on the quaternion. The angle between the first part and the second part can be accurately calculated by converting the Euler angle data into a quaternion.
[0071] In one implementation of this embodiment, in step S130, the computing device inputs the angle data between the first part and the second part at the multiple time points into a pattern recognition algorithm to identify the characteristic data of the action. Figure 3, which is a flow chart of step S130 in one embodiment of the present application. Step S130 further includes step S131 and step S132.
[0072] In step S131, the computing device smoothes the angle data between the first part and the second part at multiple time points by using a Gaussian filter.
[0073] In step S132, the computing device selects the start and end point data of the action from the angle data of the first part and the second part at multiple time points according to preset conditions, which are used to identify the characteristic data of the action. The preset conditions include a time threshold and an angle data threshold.
[0074] For ease of understanding, the above process is described below by taking an embodiment of a complete processing process of rehabilitation exercise data as an example.
[0075] When the patient performs rehabilitation movements, the sensor collects Euler angle data and time data of the first and second parts of the patient. In this embodiment, the first and second parts are the upper arm and forearm, respectively, and the rehabilitation movement is elbow flexion and extension.
[0076] See also Figure 4 , Figure 4 Shown is a schematic diagram of Euler angle data collected in one embodiment of the present application. Figure 4 (a) is the collected Euler angle data of the upper arm, Figure 4 (b) is the collected Euler angle data of the forearm, which is used to calculate the angle data between the first part and the second part. In this embodiment, in order to reduce the calculation error, the collected Euler angle data is converted into quaternion, and the angle data between the first part and the second part is calculated based on the quaternion, such as Figure 4 As shown in FIG. 1 , the Euler angle data corresponds to the time data, so the angle data between the first part and the second part calculated based on the quaternion converted from the Euler angle data also corresponds to the time data, and thus the following can be obtained: Figure 2 The data showing the angle changing with time.
[0077] In another embodiment of the present invention, the pattern recognition algorithm includes the following steps: A. Screening the peak points and valley points that meet the conditions in the angle data as the "pending start and end points" of the action; B. According to the standard that a qualified complete action can be completed in a maximum of t seconds, the "pending start and end points" of the action described in step B are cyclically screened until no "pending start and end points" are screened out; C. The above-screened start and end points are defined as the start and end points of the identified specified action, and the signal data between the start and end points are defined as the identified action data. The t seconds of the present invention is 7 seconds. A method for processing rehabilitation exercise data of the present invention can further improve the accuracy of calculating the angle between the first part and the second part.
[0078] In another embodiment of the present invention, in the method for processing rehabilitation exercise data, the screening condition of step B is:
[0079] Adjacent peak / valley points are at least 3 units apart; the height difference of the peak / valley point relative to the lowest / highest point around it ranges from 25 to 35 units; in the slope push-up action, the height of the wave crest is between 95 degrees and 180 degrees, and the height of the wave trough is between 55 degrees and 160 degrees; in the elbow flexion and extension action, the height of the wave crest is between 45 degrees and 200 degrees, and the height of the wave trough is between -15 degrees and 70 degrees. A method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part. The unit described in the present invention is the actual recorded data point, and there is at most one peak value for every three points. If there are multiple points, only the largest one is retained. For example, [1, 2, 1, 3, 1], among the three consecutive points 2, 1, and 3, 2 and 3 are both peak points, so only 3 is retained. [1, 2, 1, 1, 3, 1], there is only one peak point in any three consecutive points, so 2 and 3 are both retained.
[0080] In another embodiment of the present invention, the screening condition of step B is: there is at least one valley / peak value within 3-4 seconds before and after each peak / valley value, preferably 3.5 seconds; the maximum time interval between each three adjacent peak / valley values is between 12-16 seconds, preferably 14 seconds. A method for processing rehabilitation exercise data of the present invention can further improve the calculation accuracy of the angle between the first part and the second part.
[0081] A computing device of the present invention comprises: a storage device for storing at least one program; a processing device connected to the storage device, for calling the at least one program from the storage device and implementing the method for processing rehabilitation exercise data as described in any one of claims 1 to 9 when executing.
Claims
1. A method for processing rehabilitation exercise data, characterized in that: The following steps are involved: Step 1: collecting Euler angle data and time data of a first part and a second part through a sensor, wherein the first part and the second part are parts connected by a human body joint; Step 2: Based on the Euler angle data and time data of the first part and the second part, multiple calculations are performed to obtain data on the change of the angle between the first part and the second part over time; Step 3: Input the angle data between the first part and the second part at the multiple time points into a pattern recognition algorithm to identify feature data of the action.
2. The method for processing rehabilitation exercise data according to claim 1, characterized in that: The first part is the upper arm, and the second part is the forearm.
3. The method for processing rehabilitation exercise data according to claim 1, characterized in that: The angle data between the first part and the second part is calculated by converting the Euler angle data of the first part and the second part into quaternions, and calculating the angle data between the first part and the second part based on the quaternions.
4. The method for processing rehabilitation exercise data according to claim 3, characterized in that: The method for calculating the angle data between the first part and the second part based on quaternion is: Suppose two unit quaternions are q1 = (w1, x1, y1, z1) and q2 = (w2, x2, y2, z2). Their dot product is: dot(q1, q2)=w1w2+x1x2+y1y2+z1z2 The cosine of the angle θ is: cos(θ)=|dot(q1,q2)| To ensure that the angle is in the range [0, π], the absolute value notation can be used. The angle θ is: θ=arccos(cos(θ)).
5. The method for processing rehabilitation exercise data according to claim 1, characterized in that: The pattern recognition algorithm comprises the following steps: Step 1: Smoothing the angle data between the first part and the second part at multiple time points by using a Gaussian filter; Step 2: According to preset conditions, the start and end point data of the action are filtered out from the angle data between the first part and the second part at multiple time points to identify the characteristic data of the action.
6. The method for processing rehabilitation exercise data according to claim 4, characterized in that: The preset conditions include a time threshold and an angle data threshold.
7. The method for processing rehabilitation exercise data according to claim 1, characterized in that: The characteristic data includes: The amplitude, frequency and number of movements.
8. The method for processing rehabilitation exercise data according to claim 1, characterized in that: The pattern recognition algorithm comprises the following steps: A. Filter the peak points and valley points that meet the conditions in the angle data as the "pending start and end points" of the action; B. According to the standard that a qualified complete action can be completed in a maximum of t seconds, the "pending start and end points" of the action described in step B are cyclically screened until no "pending start and end points" are screened out; C. The start and end points selected above are defined as the start and end points of the identified designated action, and the signal data between the start and end points are defined as the identified action data.
9. The method for processing rehabilitation exercise data according to claim 8, characterized in that: The screening conditions of step B are: Adjacent peak / valley points are at least 3 units apart; The height difference between the peak / valley point and the lowest / highest point around it ranges from 25 to 35 units; In the incline push-up movement, the height of the peak is between 95 degrees and 180 degrees, and the height of the trough is between 55 degrees and 160 degrees; During elbow flexion and extension, the height of the peak is between 45 degrees and 200 degrees, and the height of the trough is between -15 degrees and 70 degrees.
10. A computing device, characterized in that include: A storage device for storing at least one program; A processing device is connected to the storage device, and is used to call the at least one program from the storage device and implement the method for processing rehabilitation movement data as described in any one of claims 1 to 9 when executing it.
Citation Information
Patent Citations
Limb joint healing instrument based on parallel mechanism
CN104784012A
Joint included angle measuring system and method
CN108209931A
Rehabilitation exercise parameter measurement system and method
CN108225317A
System and method for measuring degree of limb dyskinesia of user and computer device
CN115192002A
Motion action judgment method based on human body recognition
CN115205967A