Muscle movement state detection method, device, electronic device and storage medium

By collecting and analyzing the shortest distance between the electromyography signals on the healthy and affected sides in electronic devices, combining the punishment coefficient and standard deviation correction, the inaccurate assessment caused by the doctor's subjective evaluation is solved, and a more accurate assessment of the degree of recovery is achieved.

CN115211872BActive Publication Date: 2025-08-15GUANGZHOU UNIVERSITY OF CHINESE MEDICINE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210904619.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-08-15
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

In the prior art, doctors' assessment of rehabilitation levels depends on subjective experience, resulting in low accuracy of evaluation and affecting the effectiveness of rehabilitation training.

Method used

By prestoring muscle position and weight values in electronic devices, collecting electromyography signals on the healthy and affected sides, using dynamic time regularization algorithm to calculate the shortest distance, and combining the penalty coefficient and standard deviation correction, the detection result is finally determined based on the weight value of the muscle position.

Benefits of technology

It improves the accuracy of rehabilitation assessment and helps doctors develop more effective rehabilitation training plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115211872B_ABST
    Figure CN115211872B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a muscle movement state detection method, device, electronic device and storage medium, which relate to the field of medical instruments. Applied to electronic equipment, the electronic device pre-stores multiple muscle positions and a weight value for each muscle position. The method includes: determining a target muscle position from multiple muscle positions. Within a preset time period, collecting electromyographic signals of the target muscle position on the healthy side of the human body to obtain a healthy side signal sequence. And collecting electromyographic signals of the target muscle position on the affected side of the human body to obtain an affected side signal sequence. Calculate and obtain the shortest distance between the healthy side signal sequence and the affected side signal sequence. Repeat the above steps until the shortest distance at each muscle position is obtained. According to the shortest distance at each muscle position and the weight value of the muscle position, obtain a detection result. In this way, based on the detection results of the muscle movement state, it helps doctors to be more accurate in assessing the degree of rehabilitation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical instruments, and in particular to a muscle movement state detection method, device, electronic equipment and storage medium. Background Art

[0002] Joints, such as the shoulder and elbow, are among the most frequently used parts of the limbs in daily life. For example, due to the relatively complex anatomical structure of the shoulder joint and its involvement of numerous muscles, traumatic surgery often leads to various sequelae or complications that can severely impact shoulder motor function. Therefore, upper limb function assessment is necessary to determine the severity and extent of dysfunction and provide a basis for clinical treatment and rehabilitation training.

[0003] However, existing technologies generally rely on doctors' experience to judge and evaluate the degree of rehabilitation. Due to the significant subjective influence of doctors, the accuracy of the judgment and evaluation is low, which affects subsequent rehabilitation training. Summary of the Invention

[0004] The purpose of the present invention includes, for example, providing a muscle movement state detection method, device, electronic device and storage medium, which can evaluate the muscle movement state based on electromyographic signals, thereby helping doctors to be more accurate in evaluating the degree of rehabilitation.

[0005] The embodiments of the present invention can be implemented as follows:

[0006] In a first aspect, an embodiment of the present invention provides a muscle motion state detection method, which is applied to an electronic device, wherein the electronic device pre-stores multiple muscle positions and a weight value of each muscle position, and the method includes:

[0007] determining a target muscle position from the plurality of muscle positions;

[0008] Within a preset time period, collecting electromyographic signals at the target muscle position on the healthy side of the human body to obtain a healthy side signal sequence; and collecting electromyographic signals at the target muscle position on the affected side of the human body to obtain an affected side signal sequence;

[0009] Calculating the shortest distance between the healthy side signal sequence and the affected side signal sequence;

[0010] Repeat the above steps until the shortest distance under each muscle position is obtained;

[0011] A detection result is obtained according to the shortest distance at each muscle position and the weight value of the muscle position.

[0012] Furthermore, the step of calculating the shortest distance between the healthy side signal sequence and the affected side signal sequence includes:

[0013] Based on a dynamic time warping algorithm, the distance between each element in the contralateral signal sequence and each element in the ipsilateral signal sequence is calculated; wherein the element includes the time when the electromyographic signal is collected and the digital signal; the distance is related to the difference between the current element in the contralateral signal sequence and the current element in the ipsilateral signal sequence, and the distance between the element before the current element in the contralateral signal sequence and the element before the current element in the ipsilateral signal sequence;

[0014] The distance between the last element in the healthy side signal sequence and the last element in the affected side signal sequence is taken as the shortest distance.

[0015] Furthermore, after the step of calculating the shortest distance between the healthy side signal sequence and the affected side signal sequence, the method further includes:

[0016] Obtaining a distance matrix based on the calculated distances between each element in the healthy side signal sequence and each element in the affected side signal sequence;

[0017] Obtaining a first distance according to the distance matrix and the shortest distance;

[0018] Obtaining a second distance according to the healthy side signal sequence, the affected side signal sequence, and the shortest distance;

[0019] Obtaining an average distance based on the first distance and the second distance;

[0020] The step of repeating the above steps until the shortest distance at each muscle position is obtained includes:

[0021] Repeating the steps of determining a target muscle position from the multiple muscle positions and obtaining an average distance based on the first distance and the second distance until an average distance is obtained for each muscle position;

[0022] The step of obtaining a detection result according to the shortest distance at each muscle position and the weight value of the muscle position includes:

[0023] A detection result is obtained according to the average distance at each muscle position and the weight value of the muscle position.

[0024] Furthermore, the method obtains the first distance according to the distance matrix and the shortest distance, comprising:

[0025] Determining an optimal path that forms the shortest distance and the number of nodes on the optimal path based on the distance matrix;

[0026] Determining the length of each diagonal line in the optimal path;

[0027] Obtaining a first penalty coefficient according to the length of each oblique line and the number of nodes;

[0028] A first distance is obtained according to the first penalty coefficient and the shortest distance.

[0029] Furthermore, the step of obtaining a second distance according to the healthy side signal sequence, the affected side signal sequence and the shortest distance includes:

[0030] Calculating the standard deviation of the healthy side signal sequence to obtain the healthy side standard deviation;

[0031] Calculating the standard deviation of the ipsilateral signal sequence to obtain the ipsilateral standard deviation;

[0032] The larger value of the healthy side standard deviation and the affected side standard deviation is used as the target standard deviation;

[0033] When the difference between the digital signal of the first target element in the healthy side signal sequence and the digital signal of the second target element in the affected side signal sequence is less than or equal to the target standard deviation, determining that the first target element and the second target element are the same element;

[0034] Calculating the substring length of the longest common substring of the healthy side signal sequence and the affected side signal sequence;

[0035] determining a second penalty coefficient according to the substring length, the length of the healthy-side signal sequence, and the length of the affected-side signal sequence;

[0036] A second distance is determined according to the second penalty coefficient and the shortest distance.

[0037] Furthermore, the step of obtaining the detection result according to the shortest distance at each muscle position and the weight value of the muscle position includes:

[0038] According to the shortest distance at each muscle position, the sequence similarity at each muscle position is obtained;

[0039] Obtaining a result value according to the sequence similarity at each muscle position and the weight value of the muscle position;

[0040] The detection result is determined based on the preset range in which the result value falls.

[0041] Furthermore, the first penalty coefficient is obtained by:

[0042]

[0043] Among them, lineLeni represents the length of the i-th oblique line, and pointCnt represents the number of nodes.

[0044] In a second aspect, an embodiment of the present invention provides a muscle movement state detection device, which is applied to an electronic device, wherein the electronic device pre-stores a weight value for each predetermined muscle position, and the device includes:

[0045] an acquisition module configured to determine a target muscle position from the plurality of muscle positions; acquire electromyographic signals of the target muscle position on the healthy side of the human body within a preset time period to obtain a healthy side signal sequence; and acquire electromyographic signals of the target muscle position on the affected side of the human body to obtain an affected side signal sequence; and repeat the above steps until the shortest distance at each muscle position is obtained;

[0046] The determination module is used to obtain a detection result according to the shortest distance under each muscle position and the weight value of the muscle position.

[0047] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the method described in any one of the first aspects.

[0048] In a third aspect, an embodiment of the present invention provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method as described in any one of the first aspects are executed.

[0049] The beneficial effects of the embodiments of the present invention include, for example: for each muscle position, by obtaining the electromyographic signals of predetermined muscle positions on the healthy side and the affected side of the human body, a healthy side signal sequence and an affected side signal sequence are obtained, thereby obtaining the shortest distance. Based on the shortest distance at each muscle position and the weight value of the muscle position, a detection result is obtained. In this way, based on the detection results of the muscle movement state, it helps doctors to be more accurate in assessing the degree of recovery. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 A schematic structural diagram of an electronic device is provided in an embodiment of the present invention.

[0052] Figure 2This is a flow chart of a muscle movement state detection method provided by an embodiment of the present invention.

[0053] Figure 3 A sequence diagram provided for an embodiment of the present invention.

[0054] Figure 4 A schematic diagram of human muscle positions provided by an embodiment of the present invention.

[0055] Figure 5 The second flowchart of a muscle movement state detection method provided by an embodiment of the present invention.

[0056] Figure 6 A schematic diagram of a distance matrix provided by an embodiment of the present invention.

[0057] Figure 7 The third flowchart of a muscle movement state detection method provided by an embodiment of the present invention.

[0058] Figure 8 A schematic diagram of an optimal path provided by an embodiment of the present invention.

[0059] Figure 9 A schematic diagram of functional modules of a muscle movement state detection device is provided in an embodiment of the present invention.

[0060] Icon: 100 - electronic device; 110 - communication unit; 120 - memory; 130 - processor;

[0061] 200 - muscle movement state detection device; 210 - acquisition module; 220 - determination module. DETAILED DESCRIPTION

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0063] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0064] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0065] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.

[0066] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0067] Based on the fact that existing doctors assess the degree of recovery based on their experience, the inventors found that different muscles will produce different potential changes when exercising or moving. Therefore, different electromyographic signals can be used to analyze and judge the movement and state of the human body.

[0068] The defects in the above solutions are the results obtained by the inventor after experiments and careful research. Therefore, the process of discovering the above problems and the solutions proposed in the embodiments of this application below should be the contributions made by the inventor to this application during the process of the invention.

[0069] Please refer to Figure 1 , which is a schematic structural diagram of an electronic device 100 according to an embodiment of the present invention. The electronic device 100 includes a memory 120 , a processor 130 , and a communication unit 110 .

[0070] The memory 120, the processor 130, and the communication unit 110 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The muscle movement detection method can be stored in the memory 120 in the form of software or firmware or in a software function module solidified in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable module stored in the memory 120.

[0071] The memory 120 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving execution instructions. The communication unit 110 is used to communicate with external systems.

[0072] The processor 130 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0073] Exemplarily, the electronic device may further include a signal acquisition unit or the electronic device may be communicatively connected to the signal acquisition unit. The signal acquisition unit may include an angle acquisition unit and an electromyographic signal acquisition unit. The angle acquisition unit is used to acquire the angle of the human body during movement to better assist the electromyographic signal acquisition unit in acquiring the electromyographic signal. The electromyographic signal acquisition unit may adopt the integrated electromyography (EMG) sensor launched by Advancer Technologies, the MyoWare muscle sensor, which consists of 8 electromyographic sensors and is used to capture changes in electromyographic signals during muscle movement at the arm wearing position of the subject. The signal acquisition unit may be mounted on a host computer system, which may use 8GB of RAM as a core control node.

[0074] Exemplarily, the above-mentioned electronic device may further include a signal transmission unit or the above-mentioned electronic device may be communicatively connected to the signal acquisition unit via the signal transmission unit. The signal transmission unit includes a Raspberry Pi and an Arduino development board. There is a script running on the Raspberry Pi that can send a serial port transmission instruction to the Arduino development board, and the Arduino development board sends a machine instruction to the signal acquisition unit. So that the signal acquisition unit transmits the collected electromyographic signal to the Arduino development board through the soft serial port (i.e., USB-square interface), and the Arduino development board transmits these data to the Raspberry Pi through the hard serial port. The Raspberry Pi transmits the signal to the communication unit 110 of the above-mentioned electronic device based on the script it runs via the WIFI of the TD-LTE protocol. Exemplarily, the Raspberry Pi can be connected to a display screen to facilitate the display of relevant content such as test results.

[0075] Exemplarily, when the signal acquisition unit and the signal transmission unit are communicatively connected with the electronic device, the electronic device may be a cloud server to reduce the space occupied by the electronic device during detection.

[0076] Based on the problems existing in the existing technology, Figure 2 One of the flow charts of a muscle motion state detection method provided by an embodiment of the present invention can be applied to the above electronic device, which pre-stores multiple muscle positions and the weight value of each muscle position. Figure 2 This can be achieved by the following steps:

[0077] Step S101: Determine a target muscle position from multiple muscle positions.

[0078] Step S102: Within a preset time period, collect the electromyographic signals of the target muscle position on the healthy side of the human body to obtain a healthy side signal sequence, and collect the electromyographic signals of the target muscle position on the affected side of the human body to obtain an affected side signal sequence.

[0079] Step S103: Calculate and obtain the shortest distance between the healthy side signal sequence and the affected side signal sequence.

[0080] Step S104: Determine whether the shortest distance at each muscle position is obtained. If so, proceed to step S105. If not, return to step S101 to step S104 until the shortest distance at each muscle position is obtained.

[0081] Step S105: Obtain a detection result based on the shortest distance at each muscle position and the weight value of the muscle position.

[0082] For each muscle location, the system acquires the electromyographic signals of predetermined muscle locations on the healthy and affected sides of the body, generating a healthy and affected-side signal sequence to determine the shortest distance. Based on the shortest distance at each muscle location and the weight value for that muscle location, the system generates a test result. This, based on the test results of the muscle movement state, helps doctors more accurately determine the degree of recovery.

[0083] Exemplarily, the electronic device can be connected to a doctor's system used by a doctor, and the test results can be regularly sent to the doctor's system so that the doctor can adjust the rehabilitation training prescription for the patient based on the test results. The electronic device can display the rehabilitation exercises that the patient needs to do according to the rehabilitation training prescription, so that when the patient wears the sensor of the signal acquisition unit, he can follow the displayed rehabilitation exercises and perform corresponding exercises, and execute the above steps S101 to S105 during the exercise to obtain the test results in real time. The displayed rehabilitation exercises may include the direction of movement and the angle of movement.

[0084] For ease of understanding, Figure 3 A sequence diagram provided by an embodiment of the present invention, such as Figure 3 As shown in the figure, the two solid lines can be considered as two sequences. The dashed line connections between the points in the two sequences are determined from left to right. The length of each dashed segment in the two solid lines is the distance between the points in the two sequences. The shortest distance is the sum of the lengths of all dashed line segments in the figure.

[0085] For example, the muscles from which EMG signals need to be collected may include the biceps brachii, triceps brachii, pectoralis major (near the clavicle), anterior deltoid, middle deltoid, posterior deltoid, teres minor, trapezius, and brachioradialis. The brachioradialis has little impact on the results, and whether or not to collect EMG signals from the brachioradialis can be determined based on actual application needs.

[0086] To understand the location of the above muscles in the human body, you can refer to Figure 4 A schematic diagram of the position of human muscles provided by an embodiment of the present invention, such as Figure 4 As shown, position 1 is the biceps, position 2 is the triceps, position 3 is the pectoralis major (near the clavicle), position 4 is the anterior deltoid, position 5 is the middle deltoid, position 6 is the posterior deltoid, position 7 is the teres minor, and position 8 is the trapezius.

[0087] For example, muscle movements include flexion and extension, internal and external rotation, pronation and supination, and adduction and abduction. To improve the final detection accuracy, the myoelectric signals for these four movements can be collected separately. For the same muscle position, after obtaining four healthy side signal sequences and four affected side signal sequences, the similarity between the healthy side signal sequence and the affected side signal sequence obtained for each movement is calculated, and then the average similarity of the four movements is calculated.

[0088] For example, the frequency of collecting muscle signals can be set according to actual application requirements, for example, 20 Hz.

[0089] Furthermore, the shortest distance can be obtained in the following manner. Figure 5 The second flow chart of a muscle motion state detection method provided by an embodiment of the present invention is as follows: Figure 5 The specific implementation steps of step S103 are as follows:

[0090] Step S103 - 1 : Based on the dynamic time warping algorithm, the distance between each element in the healthy side signal sequence and each element in the affected side signal sequence is calculated.

[0091] The element contains the time and digital signal when the electromyographic signal was collected. The distance is related to the difference between the current element in the contralateral signal sequence and the current element in the ipsilateral signal sequence, as well as the distance between the element before the current element in the contralateral signal sequence and the element before the current element in the ipsilateral signal sequence.

[0092] Step S103 - 2 : The distance between the last element in the healthy side signal sequence and the last element in the affected side signal sequence is taken as the shortest distance.

[0093] In this way, the distance of the current element is accumulated on the distance of the previous element, so that the final calculated distance of the element is directly used as the shortest distance, which improves calculation efficiency. And by taking the minimum value for accumulation each time, it can be ensured that the shortest distance finally obtained is the actual shortest distance.

[0094] For example, the elements in the healthy side sequence and the elements in the affected side sequence can be obtained by the following recursive formula:

[0095] d(i,j)=dist(i,j)+min{d(i-1,j),d(i,j-1),d(i-1,j-1)}

[0096] Where dist(i,j) represents the difference between the i-th element in the contralateral sequence and the j-th element in the affected sequence, and d(i,j) represents the distance between the i-th element in the contralateral sequence and the j-th element in the affected sequence. The above recursive formula shows that d(i,j) is related to the previously calculated d(i-1,j), d(i,j-1), and d(i-1,j-1).

[0097] Exemplarily, the difference distance can be the absolute value of the difference between the digital signals of two elements. For example, if a(i) represents the value of the i-th element in the healthy-side sequence, and b(j) represents the value of the j-th element in the affected-side sequence, then the difference distance dist(i,j) = |a(i) - b(j)|. The value of the element is the acquired digital signal.

[0098] To facilitate the embodiments of the present invention and subsequent steps, Figure 6 For reference, a schematic diagram of a distance matrix provided by an embodiment of the present invention is provided. A() can be regarded as the healthy side signal sequence, and A(1) can be regarded as the value of the first element in the healthy side signal sequence, which has a value of 1. Similarly, B() can be regarded as the affected side signal sequence, and B(1) can be regarded as the value of the first element in the affected side sequence, which has a value of 1. Figure 6 Except for the elements in the first row and the first column of the matrix, the values of other elements are obtained based on the values of the element above the element, the value of the element to the left of the element, the value of the element above and to the left of the element, and the difference distance. For example, the process of obtaining the value of the element in the last row of the last row in the figure is: first, based on A(6)=4 and B(6)=4, the difference distance is determined to be 0, and then the minimum value is determined to be 0 from the value of the left element (2), the value of the element above (0), and the value of the element above and to the left (2), thereby determining the value of the element to be 0, that is, the difference distance between A(6) and B(6) is 0.

[0099] Exemplarily, when the distance matrix is obtained based on the above recursive formula, the first row element and the first column element can be obtained according to the actual application requirements. It can be similar to the above distance matrix, and the difference distance is directly obtained as the value of the element. It can also be obtained in a manner similar to the recursive formula. For example, the value of the first row element (excluding the first element) can be the sum of the distance of the left element and the difference distance currently obtained. The method for obtaining the first column element is similar and will not be repeated here.

[0100] Continue to refer to the above Figure 6 The distance between the last element in the healthy side signal sequence and the last element in the affected side signal sequence obtained by this method embodiment is the shortest distance between the two sequences.

[0101] After the shortest distance is obtained, the shortest distance can be corrected to make the final detection result more accurate. Figure 7 The third flow chart of a muscle motion state detection method provided by an embodiment of the present invention is as follows: Figure 7 As shown, the shortest distance can be corrected by the following steps:

[0102] Step S201 : Obtain a distance matrix based on the calculated distances between each element in the healthy side signal sequence and each element in the affected side signal sequence.

[0103] Step S202: Obtain a first distance according to the distance matrix and the shortest distance.

[0104] Step S203: Obtain a second distance according to the healthy side signal sequence, the affected side signal sequence, and the shortest distance.

[0105] Step S204: Obtain an average distance according to the first distance and the second distance.

[0106] Repeat steps S101 to S103 and steps S201 to S204 until the average distance at each muscle position is obtained.

[0107] Accordingly, step S105 can be implemented by the following steps: obtaining a detection result according to the average distance at each muscle position and the weight value of the muscle position.

[0108] Among them, the distance matrix can refer to the above Figure 6 For example, to facilitate practical application requirements, the distance matrix can be transposed to obtain a transposed matrix. Based on the transposed matrix, the first distance is obtained.

[0109] Exemplarily, two correction methods are used to increase the shortest distance of similar sequences, so that the subsequent detection results determined based on the shortest distance and weight value at each muscle position are more accurate.

[0110] Exemplarily, the first distance can be obtained by the following steps:

[0111] Based on the distance matrix, the optimal path that forms the shortest distance and the number of nodes on the optimal path are determined.

[0112] Determine the slash length of each slash in the optimal path.

[0113] A first penalty coefficient is obtained according to the length of each oblique line and the number of nodes.

[0114] A first distance is obtained according to the first penalty coefficient and the shortest distance.

[0115] For example, when calculating the shortest distance, it is not convenient to calculate the optimal path because the path that forms the shortest distance is constantly changing. In order to conveniently determine the optimal path that forms the shortest distance, the optimal path can be determined based on the reverse method. That is, the optimal path composed of each node and each node can be determined by the following formula: d'(i,j)->min{d'(i-1,j-1),d'(i,j-1),d'(i-1,j)}, where the search starts from the maximum value of i and j. For example, it can be combined with Figure 6 For reference, for the element in the 6th row and 6th column, compare the value of the element to its left, the value of the element above it, and the value of the element above it, and take the element with the minimum value as the node on the optimal path. Subsequently, based on the determined node, the above method is used to find the previous node of the determined node. In this way, by repeatedly executing the above method, the previous node of each node is determined in turn, thereby determining all the nodes and the number of nodes in the optimal path. For example, the optimal path can refer to the above Figure 6 The path indicated by the solid arrow.

[0116] Based on the above determination method, it can be ensured that i and j are monotonically increasing, that is, w k =(i,j),w k+1 =(i′,j′),i≤i′≤i+1,j≤j′≤j+1. Among them, w k Represents the function formed by the distance of each node in the optimal path. To ensure the above Figure 3 The dotted lines in will not intersect, further ensuring that the obtained shortest path is reasonable.

[0117] To facilitate understanding of this method embodiment, you can combine Figure 8 For reference, this is a schematic diagram of an optimal path provided by an embodiment of the present invention. It can be understood as Figure 6 The diagram with squares can be understood as Figure 6 The distance matrix is determined from the lower left to the upper right. To facilitate understanding of the optimal path, the value of each element in the distance matrix is not labeled. The figure below the grid plot is the x-sequence time diagram (which can be regarded as the healthy side signal sequence diagram), and the figure to the left of the grid plot is the y-sequence time diagram (which can be regarded as the affected side signal sequence diagram).

[0118] See also Figure 8 , diagonal lines are those that are neither vertical nor horizontal in the grid diagram, i.e., the second, fourth, sixth, and eighth lines viewed from left to right in the diagram. It should be noted that the more tortuous the optimal path, the less similar the healthy and affected-side signal sequences are, and the greater the need for adjustment. The corresponding first penalty coefficient will also be larger to amplify the difference.

[0119] For example, the basic unit of each minimum square (ie, the basic unit of length and width) may be set to 1 or other default lengths to calculate the length of each oblique line.

[0120] For example, you can combine Figure 8 For reference, in the reverse process, starting from the first element in the upper right corner (the first node), when it is found that the previous node (i.e., the second node) is its lower left element, it can be determined to be a new oblique line, and the length of the oblique line is set to √2. Subsequently, based on the second node, its previous node (the third node) is determined, and it is judged whether the third node is its lower left element. If so, the length of the oblique line is increased by √2, and the previous node of the third node is continued to be determined, and the step of executing the above judgment is returned until the previous node of the node is not its lower left element. If not, it is judged that the oblique line ends here. Subsequently, multiple oblique lines and the length of each oblique line can be determined in sequence according to the above steps.

[0121] Continue reading Figure 7 For example, after determining the number of nodes and the length of each oblique line, the first penalty coefficient can be calculated according to the following formula: Among them, lineLeni represents the length of the i-th diagonal line, and pointCnt represents the number of nodes in the optimal path.

[0122] Illustratively, after obtaining the first penalty coefficient, the first penalty coefficient may be multiplied by the shortest distance to adjust the shortest distance and enhance the effect of the tortuous path on the shortest distance, that is, to increase the shortest distance of dissimilar sequences to indicate that their similarity is less.

[0123] Exemplarily, the second distance can be obtained as follows:

[0124] Calculate the standard deviation of the healthy side signal sequence to obtain the healthy side standard deviation.

[0125] The standard deviation of the ipsilateral signal sequence was calculated to obtain the ipsilateral standard deviation.

[0126] The larger value between the standard deviation of the healthy side and the standard deviation of the affected side is taken as the target standard deviation.

[0127] When the difference between the digital signal of the first target element in the healthy side signal sequence and the digital signal of the second target element in the affected side signal sequence is less than or equal to the target standard deviation, the first target element and the second target element are determined to be the same element.

[0128] Calculate the substring length of the longest common substring between the healthy side signal sequence and the affected side signal sequence.

[0129] The second penalty coefficient is determined according to the substring length, the length of the healthy side signal sequence, and the length of the affected side signal sequence.

[0130] A second distance is determined according to the second penalty coefficient and the shortest distance.

[0131] For example, when calculating the shortest distance, floating point operations may occur, and floating point operations may have errors. The following standard deviation can be used to set certain elements to be the same to reduce the errors.

[0132] For example, the standard deviation of the healthy side can be calculated by the following formula: is the average value in sequence a, and |a| is the number of elements in sequence a. Sequence a represents the healthy side signal sequence.

[0133] Similarly, the standard deviation of the affected side can be calculated using the following formula: is the average value in sequence b, and |b| is the number of elements in sequence b. Sequence b represents the signal sequence of the affected side.

[0134] For example, after obtaining the standard deviation of the healthy side and the standard deviation of the affected side, the target standard deviation can be obtained by the following formula: std = max (std a , std b ). In this way, when the difference between the digital signals of the first target element and the second target element is less than the target standard deviation, the first target element and the second target element can be regarded as the same element.

[0135] Exemplarily, after determining the same elements of the healthy side signal sequence and the affected side signal sequence, the substring length of the longest common substring between the two can be calculated. For example, the healthy side signal sequence is represented as 1AB2345CD, and the affected side signal sequence is represented as 12345EF. Among them, the same numbers or letters represent the same elements. Through calculation, it can be known that the longest common substring is 2345, and its common substring length is 4. It should be noted that the above examples are only examples cited for the convenience of understanding the longest common substring, and do not represent the actual healthy side signal sequence and the affected side signal sequence. The actual healthy side signal sequence and the affected side signal sequence can be referred to Figure 8 The x time series or y time series graph.

[0136] For example, the length of the longest common substring can be calculated using the following formula:

[0137]

[0138] Here, a(i) represents the contralateral signal sequence, and b(j) represents the affected side signal sequence. When |a(i) - b(j)| is less than or equal to std, the elements of a(i) and b(j) are identical. f(i)(j) can be considered the length of the common substring between a(i) and b(j) that can be formed up to the point of comparing a(i) and b(j).

[0139] For example, after all f(i)(j) are obtained, the maximum value can be selected using the following formula: subLen=max{f(i)(j)}. In this way, the substring length of the longest common substring is obtained.

[0140] For example, the second penalty coefficient can be calculated using the following formula: Wherein, len(a) represents the length of the healthy side signal sequence, and len(b) represents the length of the affected side signal sequence.

[0141] Similar to obtaining the first distance, the second distance can be obtained by multiplying the second penalty coefficient by the shortest distance, thereby adjusting the deviation of the shortest distance, thereby making subsequent detection results more accurate.

[0142] After obtaining the shortest distance at each muscle position, the shortest distance can be further adjusted to make the detection result more accurate. Step S105 can be implemented as follows:

[0143] According to the shortest distance at each muscle position, the sequence similarity at each muscle position is obtained.

[0144] The result value is obtained according to the sequence similarity at each muscle position and the weight value of the muscle position.

[0145] The test result is determined based on the preset range in which the result value falls.

[0146] For example, after obtaining the above shortest distance or the adjusted and corrected shortest distance, the sequence similarity at each muscle position can be calculated using the following formula: Among them, disti represents the shortest distance obtained at the i-th muscle position.

[0147] For example, the weight values of each muscle position can be set according to actual application requirements. For example, the weight values of the positions where the biceps brachii, middle deltoid, trapezius, triceps brachii, pectoralis major (near the clavicle), anterior deltoid, posterior deltoid, and teres minor are located can be set to 0.3, 0.3, 0.3, 0.02, 0.02, 0.02, 0.02, and 0.02, respectively.

[0148] For example, after obtaining the sequence similarity at each muscle position and the weight value of the muscle position, the result value can be obtained by the following formula: Res = D*V, that is Among them, dk represents the sequence similarity at the k-th muscle position, and vk represents the weight value at the k-th muscle position.

[0149] Exemplarily, after obtaining the result value, the test result can be determined based on the preset range in which the result value is located, for example, a good degree of recovery, a general degree of recovery, and an insufficient degree of recovery, etc. Among them, when the result value is in a specific preset range, what kind of corresponding test result is obtained can be set according to the actual application. For example, when the result value is greater than 0.8 and less than or equal to 1, a test result of a good degree of recovery can be given. When the result value is greater than 0.6 and less than or equal to 0.8, a test result of a general degree of recovery can be given. When the result value is greater than or equal to 0 and less than or equal to 0.6, a test result of an insufficient degree of recovery can be given, so as to help doctors be more accurate in assessing the degree of recovery.

[0150] Figure 9 The present invention provides a functional module diagram of a muscle movement state detection device 200. The basic principle and technical effects of the device are the same as those of the corresponding method embodiment described above. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the method embodiment. Figure 9 As shown, the device includes a collection module 210 and a determination module 220 .

[0151] Acquisition module 210 is configured to determine a target muscle location from a plurality of muscle locations. Within a preset time period, EMG signals are acquired from the target muscle location on the healthy side of the human body to obtain a healthy-side signal sequence; and EMG signals are acquired from the target muscle location on the affected side of the human body to obtain an affected-side signal sequence. These steps are repeated until the shortest distance at each muscle location is determined.

[0152] For example, the acquisition module may include an angle acquisition module and an electromyographic signal acquisition module, wherein the angle acquisition module may acquire the human body's motion angle to better assist the electromyographic signal acquisition module in acquiring electromyographic signals.

[0153] The determination module 220 is used to obtain a detection result according to the shortest distance at each muscle position and the weight value of the muscle position.

[0154] The apparatus further includes a correction module configured to generate a distance matrix based on the calculated distances between each element in the contralateral signal sequence and each element in the ipsilateral signal sequence. A first distance is generated based on the distance matrix and the shortest distance. A second distance is generated based on the contralateral signal sequence, the ipsilateral signal sequence, and the shortest distance. An average distance is generated based on the first and second distances.

[0155] The above-mentioned determination module is also used to obtain a detection result based on the average distance at each muscle position and the weight value of the muscle position.

[0156] An embodiment of the present invention further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above method embodiment are executed.

[0157] In summary, the embodiments of the present invention provide a method, device, electronic device and storage medium for detecting muscle movement status. For each muscle position, by obtaining the electromyographic signals of predetermined muscle positions on the healthy side of the human body and the affected side of the human body, a healthy side signal sequence and an affected side signal sequence are obtained, thereby obtaining the shortest distance. According to the shortest distance at each muscle position and the weight value of the muscle position, the detection result is obtained. In this way, based on the detection results of the muscle movement status, it helps doctors to be more accurate in assessing the degree of rehabilitation.

[0158] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or actions, or can be implemented using a combination of dedicated hardware and computer instructions.

[0159] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0160] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0161] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for detecting muscle movement state, characterized in that: Applied to an electronic device, the electronic device pre-stores a plurality of muscle positions and a weight value of each muscle position, the method comprising: determining a target muscle position from the plurality of muscle positions; Within a preset time period, collecting electromyographic signals at the target muscle position on the healthy side of the human body to obtain a healthy side signal sequence; and collecting electromyographic signals at the target muscle position on the affected side of the human body to obtain an affected side signal sequence; Based on a dynamic time warping algorithm, the distance between each element in the contralateral signal sequence and each element in the ipsilateral signal sequence is calculated; wherein the element includes the time when the electromyographic signal is collected and the digital signal; the distance is related to the difference between the current element in the contralateral signal sequence and the current element in the ipsilateral signal sequence, and the distance between the element before the current element in the contralateral signal sequence and the element before the current element in the ipsilateral signal sequence; The distance between the last element in the healthy side signal sequence and the last element in the affected side signal sequence is taken as the shortest distance; Obtaining a distance matrix based on the calculated distances between each element in the healthy side signal sequence and each element in the affected side signal sequence; Determining an optimal path that forms the shortest distance and the number of nodes on the optimal path based on the distance matrix; Determining the length of each diagonal line in the optimal path; Obtaining a first penalty coefficient according to the length of each oblique line and the number of nodes; Obtaining a first distance according to the first penalty coefficient and the shortest distance; Calculating the standard deviation of the healthy side signal sequence to obtain the healthy side standard deviation; Calculating the standard deviation of the ipsilateral signal sequence to obtain the ipsilateral standard deviation; The larger value of the healthy side standard deviation and the affected side standard deviation is used as the target standard deviation; When the difference between the digital signal of the first target element in the healthy side signal sequence and the digital signal of the second target element in the affected side signal sequence is less than or equal to the target standard deviation, determining that the first target element and the second target element are the same element; Calculating the substring length of the longest common substring of the healthy side signal sequence and the affected side signal sequence; determining a second penalty coefficient according to the substring length, the length of the healthy-side signal sequence, and the length of the affected-side signal sequence; determining a second distance according to the second penalty coefficient and the shortest distance; Obtaining an average distance based on the first distance and the second distance; Repeating the steps of determining a target muscle position from the multiple muscle positions and obtaining an average distance based on the first distance and the second distance until an average distance is obtained for each muscle position; A detection result is obtained according to the average distance at each muscle position and the weight value of the muscle position.

2. The method according to claim 1, characterized in that The step of obtaining a detection result according to the shortest distance at each muscle position and the weight value of the muscle position includes: According to the shortest distance at each muscle position, the sequence similarity at each muscle position is obtained; Obtaining a result value according to the sequence similarity at each muscle position and the weight value of the muscle position; The detection result is determined based on the preset range in which the result value falls.

3. The method according to claim 1, characterized in that The first penalty coefficient is obtained by: Among them, lineLeni represents the length of the i-th oblique line, and pointCnt represents the number of nodes.

4. A muscle movement state detection device, characterized in that: Applied to an electronic device, the electronic device pre-stores a weight value for each predetermined muscle position, the device comprising: An acquisition module is used to determine a target muscle position from multiple muscle positions; within a preset time period, collect the electromyographic signals of the target muscle position on the healthy side of the human body to obtain a healthy side signal sequence; and collect the electromyographic signals of the target muscle position on the affected side of the human body to obtain an affected side signal sequence; the distance between the last element in the healthy side signal sequence and the last element in the affected side signal sequence is used as the shortest distance; a distance matrix is obtained based on the calculated distances between each element in the healthy side signal sequence and each element in the affected side signal sequence; based on the distance matrix, an optimal path forming the shortest distance and the number of nodes of the optimal path are determined; the length of each oblique line in the optimal path is determined; a first penalty coefficient is obtained based on the oblique line length of each oblique line and the number of nodes; a first distance is obtained based on the first penalty coefficient and the shortest distance; a standard deviation of the healthy side signal sequence is calculated to obtain a healthy side standard deviation; and the calculated the standard deviation of the affected-side signal sequence to obtain the affected-side standard deviation; the larger value of the healthy-side standard deviation and the affected-side standard deviation is used as the target standard deviation; when the difference between the digital signal of the first target element in the healthy-side signal sequence and the digital signal of the second target element in the affected-side signal sequence is less than or equal to the target standard deviation, the first target element and the second target element are determined to be the same element; the substring length of the longest common substring of the healthy-side signal sequence and the affected-side signal sequence is calculated; a second penalty coefficient is determined according to the substring length, the length of the healthy-side signal sequence and the length of the affected-side signal sequence; a second distance is determined according to the second penalty coefficient and the shortest distance; an average distance is obtained according to the first distance and the second distance; and the steps of determining the target muscle position from the multiple muscle positions to obtaining the average distance according to the first distance and the second distance are repeated until the average distance is obtained for each muscle position. The determination module is used to obtain a detection result according to the average distance under each muscle position and the weight value of the muscle position.

5. An electronic device, characterized in that: include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein the program implements the method according to any one of claims 1 to 3 when executed by the processor.

6. A storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Finger back stretching training system capable of adaptively changing pressure threshold value through myoelectricity

    CN114587934A

  • Sleep report generation method and apparatus, terminal, and storage medium

    WO2021208902A1