Disclosure of Invention
The embodiment of the invention aims to provide an electromyographic signal processing method, an electromyographic signal processing device, intelligent wearable equipment and a storage medium, so as to realize the control of multiple degrees of freedom and adapt to the beneficial effects of flexible movement functions of the current electromyographic prostheses with multiple degrees of freedom. The specific technical scheme is as follows:
in a first aspect of the embodiment of the present invention, there is provided an electromyographic signal processing method, including:
acquiring a first electromyographic signal and a second electromyographic signal, wherein the first electromyographic signal and the second electromyographic signal are included in a preset gesture action set, and the first electromyographic signal and the second electromyographic signal corresponding to a first position of an arm part and a second position of the arm part are acquired at any time according to any gesture action;
determining a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal;
extracting a plurality of first features from the first action potential segment and a plurality of second features from the second action potential segment;
splicing the first features and the second features based on a preset splicing rule to generate a plurality of feature vectors;
And projecting each feature vector by using a feature projection calculation algorithm, and classifying and identifying gesture actions on each projection result by using a preset classifier.
In an optional embodiment, the first electromyographic signal corresponding to the first position and the second electromyographic signal corresponding to the second position of the arm part acquired at any one time include:
and the first myoelectric signal corresponding to extensor at the forearm part of the arm and the second myoelectric signal corresponding to flexor are acquired at any time.
In an alternative embodiment, the determining the first action potential segment in the first electromyographic signal and the second action potential segment in the second electromyographic signal includes:
preprocessing the first electromyographic signal and the second electromyographic signal respectively to generate a corresponding first preprocessed electromyographic signal and a corresponding second preprocessed electromyographic signal, wherein the preprocessing comprises power interference removal and band-pass filtering;
determining a first action potential segment in the first pre-processed electromyographic signal and a second action potential segment in the second pre-processed electromyographic signal.
In an alternative embodiment, the determining the first action potential segment in the first pre-processed electromyographic signal and the second action potential segment in the second pre-processed electromyographic signal includes:
Correcting the first preprocessed electromyographic signal and the second preprocessed electromyographic signal respectively to obtain a first corrected electromyographic signal and a second corrected electromyographic signal;
respectively carrying out integral operation on the first correcting electromyographic signal and the second correcting electromyographic signal, and extracting a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals;
a first action potential segment in the first corrected electromyographic signal is determined based on the plurality of first envelope signals, and a second action potential segment in the second corrected electromyographic signal is determined based on the plurality of second envelope signals.
In an alternative embodiment, the determining a first action potential segment in the first corrected electromyographic signal based on a plurality of the first envelope signals, and determining a second action potential segment in the second corrected electromyographic signal based on a plurality of the second envelope signals, includes:
determining a first starting position and a first ending position of a first action potential segment in the first corrected electromyographic signal based on a plurality of the first envelope signals;
determining a first action potential segment in the first corrected electromyographic signal based on the first starting position and the first ending position;
Determining a second starting position and a second ending position of a second action potential segment in the second corrected electromyographic signal based on a plurality of the second envelope signals;
a second action potential segment in the second corrected electromyographic signal is determined based on the second starting position and the second ending position.
In an alternative embodiment, the extracting a plurality of first features from the first action potential segment and a plurality of second features from the second action potential segment includes:
splitting the first action potential segment to obtain a plurality of first action potential subsections;
extracting corresponding first features for each first action potential subsection;
splitting the second action potential segment to obtain a plurality of second action potential subsections;
extracting corresponding second features for each second action potential subsection;
the characteristics comprise wavelength, zero crossing point number, slope sign change number, AR model coefficient and skewness.
In an alternative embodiment, said projecting each of said feature vectors using a feature projection calculation algorithm comprises:
inputting each of the feature vectors into a feature projection calculation algorithm, the feature projection calculation algorithm comprising:
y=W T x;
Wherein, W is a projection matrix, x is the feature vector, and y is the projection result.
In an optional embodiment, the performing gesture classification recognition on each projection result by using a preset classifier includes:
and carrying out gesture action classification and identification on each projection result by using a preset nearest neighbor classifier.
In an alternative embodiment, the method further comprises:
based on a preset posterior probability calculation formula, calculating posterior probability of any gesture classification to which each feature vector belongs;
and determining gesture action classification corresponding to the highest posterior probability, and classifying the gesture action corresponding to each feature vector.
In an alternative embodiment, the preset posterior probability calculation formula includes:
wherein said p (C i |w 1 ,w 2 ,w 3 ,…w N ) For the posterior probability, the p (C i |w n ) A conditional probability of classifying any gesture to which each feature vector belongs, wherein delta is a normalization constant, and k is j Obtained from the following function:
where j=1, 2,3, … …, m+1.
In a second aspect of the embodiment of the present invention, there is also provided an electromyographic signal processing apparatus, the apparatus including:
The signal acquisition module is used for acquiring a first electromyographic signal and a second electromyographic signal, wherein the first electromyographic signal and the second electromyographic signal are included in a preset gesture action set, and the first electromyographic signal and the second electromyographic signal corresponding to the first position of the arm part and the second electromyographic signal corresponding to the second position are acquired at any time aiming at any gesture action;
the potential segment determining module is used for determining a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal;
a feature extraction module for extracting a plurality of first features from the first action potential segment and a plurality of second features from the second action potential segment;
the feature splicing module is used for splicing the plurality of first features and the plurality of second features based on a preset splicing rule to generate a plurality of feature vectors;
the vector projection module is used for projecting each characteristic vector by utilizing a characteristic projection calculation algorithm;
and the classification recognition module is used for carrying out gesture action classification recognition on each projection result by utilizing a preset classifier.
In a third aspect of the embodiments of the present invention, there is also provided an intelligent wearable device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
and the processor is used for realizing the electromyographic signal processing method in any one of the first aspects when executing the program stored in the memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the electromyographic signal processing method of any one of the first aspects described above.
In a fifth aspect of embodiments of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the above-described first aspects of myoelectric signal processing.
According to the technical scheme provided by the embodiment of the invention, for any gesture action, a first electromyographic signal corresponding to a first position and a second electromyographic signal corresponding to a second position of an arm part are acquired at any time, a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal are determined by acquiring the first electromyographic signal and the second electromyographic signal, a plurality of first features are extracted from the first action potential segment, a plurality of second features are extracted from the second action potential segment, a plurality of first features and a plurality of second features are spliced to generate a plurality of feature vectors based on preset splicing rules, each feature vector is projected by using a feature projection calculation algorithm, and gesture action classification identification is performed on each projection result by using a preset classifier. The first electromyographic signals corresponding to the first position and the second electromyographic signals corresponding to the second position of the arm part in different gesture actions are acquired for a plurality of times, the first electromyographic signals corresponding to the first position and the second electromyographic signals corresponding to the second position of the arm part in each acquisition are processed in a characteristic extraction and projection mode, so that different gesture actions are separated to the greatest extent, the control of multiple degrees of freedom can be realized, and the flexible motion function of the current multiple degrees of freedom electromyographic artificial limb is adapted.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
As shown in fig. 1, a schematic implementation flow chart of an electromyographic signal processing method provided by an embodiment of the present invention may specifically include the following steps:
s101, acquiring a first electromyographic signal and a second electromyographic signal, wherein the first electromyographic signal and the second electromyographic signal are included in a preset gesture action set, and the first electromyographic signal and the second electromyographic signal corresponding to a first position of an arm part and a second electromyographic signal corresponding to a second position are acquired at any time according to any gesture action;
in the embodiment of the present invention, a gesture action set may be preset, where the gesture action set may include the following gesture actions: fist making, wrist bending, wrist stretching, palm stretching, thumb bending, index finger bending, middle finger bending, ring finger bending, little finger bending, thumb and index finger combined bending and the like.
The user wears the myoelectricity acquisition module (an arm ring or a myoelectricity acquisition electrode and the like) at the relevant position according to the requirement, and acquires a first myoelectricity signal corresponding to the first position of the arm part and a second myoelectricity signal corresponding to the second position for any gesture in the gesture action set for multiple times.
Specifically, the relevant positions may be flexor and extensor positions, and then the first electromyographic signal corresponding to the extensor at the forearm portion of the arm and the second electromyographic signal corresponding to the flexor may be acquired multiple times.
For example, for a plurality of gesture actions such as fist making, wrist bending, wrist stretching, palm stretching, thumb bending, index finger bending, middle finger bending, ring finger bending, thumb and index finger bending, etc., first, the fist making gesture action is collected 6 times, each time including a first electromyographic signal corresponding to extensor at the forearm portion of the arm and a second electromyographic signal corresponding to flexor, wherein each time is separated by 5 seconds, for avoiding fatigue, after 30 seconds, the wrist bending gesture action is collected 6 times, each time including a first electromyographic signal corresponding to extensor at the forearm portion of the arm and a second electromyographic signal corresponding to flexor, wherein the time is separated by 5 seconds, and so on.
According to the embodiment of the invention, the first myoelectric signal corresponding to the extensor at the forearm portion of the arm and the second myoelectric signal corresponding to the flexor can be acquired for any gesture, and subsequent processing is facilitated.
The transmission modes of the first electromyographic signal and the second electromyographic signal may be wireless or wired, which is not limited in the embodiment of the present invention.
S102, determining a first action potential section in the first electromyographic signal and a second action potential section in the second electromyographic signal;
since the electromyographic signals comprise a resting potential segment and an action potential segment, the action potential segment is generated when the muscle contracts, it is necessary to determine a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal.
As shown in fig. 2, the first action potential segment in the first electromyographic signal and the second action potential segment in the second electromyographic signal are specifically determined through the following steps:
s201, respectively preprocessing the first electromyographic signal and the second electromyographic signal to generate a corresponding first preprocessed electromyographic signal and a corresponding second preprocessed electromyographic signal, wherein the preprocessing comprises power interference removal and band-pass filtering;
for example, for a fist-making gesture, a first electromyographic signal corresponding to extensor and a second electromyographic signal corresponding to flexor are collected for the first time, firstly, 50Hz power interference is removed by using a wave trap, and then 20-450 Hz band-pass filtering is performed respectively, so as to generate a first preprocessing electromyographic signal and a second preprocessing electromyographic signal corresponding to the first time.
S202, correcting the first preprocessed electromyographic signal and the second preprocessed electromyographic signal respectively to obtain a first corrected electromyographic signal and a second corrected electromyographic signal;
s203, respectively performing integral operation on the first correction electromyographic signal and the second correction electromyographic signal, and extracting a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals;
for any gesture, a first myoelectric signal corresponding to extensor at the forearm portion of the arm and a second myoelectric signal corresponding to flexor are acquired at any time, after preprocessing, a corresponding first preprocessed myoelectric signal and a corresponding second preprocessed myoelectric signal are generated, the first preprocessed myoelectric signal and the second preprocessed myoelectric signal are respectively corrected to obtain a first corrected myoelectric signal and a second corrected myoelectric signal, and for any gesture, the first myoelectric signal corresponding to extensor at the forearm portion of the arm and the second myoelectric signal corresponding to flexor are acquired at any time, and the first corrected myoelectric signal and the second corrected myoelectric signal can be obtained through correction;
and respectively carrying out integral operation on the first correction electromyographic signal and the second correction electromyographic signal to extract a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals, so that for any gesture action, the first electromyographic signal corresponding to extensor muscle of the forearm part of the arm and the second electromyographic signal corresponding to flexor muscle of the arm, which are acquired at any time, can be used for extracting a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals.
For example, taking a first myoelectric signal corresponding to extensor and a second myoelectric signal corresponding to flexor at the forearm portion of the arm, which are acquired for the first time, as an example, for a fist-making gesture, preprocessing the first myoelectric signal and the second myoelectric signal to obtain a first preprocessed myoelectric signal and a second preprocessed myoelectric signal, respectively, correcting the first preprocessed myoelectric signal and the second preprocessed myoelectric signal to obtain a first corrected myoelectric signal and a second corrected myoelectric signal, wherein the first corrected myoelectric signal and the second corrected myoelectric signal are substantially calibration baselines, and reducing the influence of individual differences on the whole;
then, respectively carrying out integral operation on the first correction electromyographic signal and the second correction electromyographic signal, and extracting a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals, wherein the integral operation is as follows:
for the signal range of the first correction electromyographic signal of 1-1000, performing integral operation on the interval 1-100, extracting a first envelope signal, performing integral operation on the interval 2-101, extracting a second first envelope signal, performing integral operation on the interval 3-102, extracting a third first envelope signal, and so on;
for the signal range of the second correction electromyographic signal of 1-1000, the first second envelope signal is extracted by integrating the interval 1-100, the second envelope signal is extracted by integrating the interval 2-101, the third second envelope signal is extracted by integrating the interval 3-102, and so on.
S204, determining a first action potential section in the first corrected electromyographic signal based on the first envelope signals, and determining a second action potential section in the second corrected electromyographic signal based on the second envelope signals.
For any gesture, the first electromyographic signals corresponding to extensor and the second electromyographic signals corresponding to flexor at the forearm portion of the arm are acquired at any time, a plurality of first envelope signals and a plurality of second envelope signals are extracted through the step 1 and the step 2, the first action potential section in the first correction electromyographic signals can be determined based on the plurality of first envelope signals, and the second action potential section in the second correction electromyographic signals can be determined based on the plurality of second envelope signals.
Specifically, determining a first starting position and a first ending position of a first action potential segment in the first corrected electromyographic signal based on a plurality of the first envelope signals; determining a first action potential segment in the first corrected electromyographic signal based on the first starting position and the first ending position; determining a second starting position and a second ending position of a second action potential segment in the second corrected electromyographic signal based on a plurality of the second envelope signals; a second action potential segment in the second corrected electromyographic signal is determined based on the second starting position and the second ending position.
For example, for a fist-making gesture, the first myoelectric signal and the second myoelectric signal corresponding to extensor muscle at the forearm portion of the arm, which are acquired for the 1 st time, are preprocessed to obtain a first preprocessed myoelectric signal and a second preprocessed myoelectric signal, respectively, the first preprocessed myoelectric signal and the second preprocessed myoelectric signal are corrected to obtain a first corrected myoelectric signal a and a second corrected myoelectric signal B, and the first corrected myoelectric signal a and the second corrected myoelectric signal B are subjected to integral operation to extract a plurality of corresponding first envelope signals and a plurality of corresponding second envelope signals, which means that a plurality of first envelope signals are extracted from the first corrected myoelectric signal a and a plurality of second envelope signals are extracted from the second corrected myoelectric signal B, as shown in table 1 below.
TABLE 1
Determining a first action potential segment in the first corrected electromyographic signal a based on the plurality of first envelope signals extracted from the first corrected electromyographic signal a:
1. firstly judging whether the amplitude of a first envelope signal is larger than a first threshold value, if the amplitude of the first envelope signal is not larger than the first threshold value, continuously judging whether the amplitude of a second first envelope signal is larger than the first threshold value, and if the amplitude of the second first envelope signal is larger than the first threshold value (namely, the first occurrence of the condition that the amplitude of the first envelope signal is larger than the first threshold value) determining a first starting position of an action potential section, namely, the 101 th myoelectricity data corresponding position in 2 to 101 participating in the integral operation of the second first envelope signal;
2. After determining the first starting position of the action potential segment, it may be instead determined whether the amplitude of the third first envelope signal is smaller than the first threshold value (i.e. whether the amplitude of the third first envelope signal is not determined to be larger than the first threshold value any more), if the amplitude of the third first envelope signal is not smaller than the first threshold value, it may be further determined whether the amplitude of the fourth first envelope signal is smaller than the first threshold value, if the amplitude of the fourth first envelope signal is not smaller than the first threshold value, it may be further determined whether the amplitude of the fifth first envelope signal is smaller than the first threshold value, and so on until the amplitude of the nth first envelope signal is smaller than the first threshold value (i.e. when the amplitude of the first envelope signal is smaller than the first threshold value for the first time after the second first envelope signal), it may be determined the first ending position of the action potential segment, i.e. the corresponding position of the nth myoelectric data in the N-99 to N involved in the integral operation of the nth first envelope signal;
3. based on the first starting position and the first ending position, a first action potential section in the first corrected electromyographic signal is determined, and the section is located between 101 and N as shown in fig. 3.
For the specific flow of determining the second action potential segment in the second corrected electromyographic signal B based on the plurality of second envelope signals extracted from the second corrected electromyographic signal B, similar to the specific flow of determining the first action potential segment in the first corrected electromyographic signal a based on the plurality of first envelope signals extracted from the first corrected electromyographic signal a described above, the embodiments of the present invention will not be described in detail here.
S103, extracting a plurality of first features from the first action potential segment and a plurality of second features from the second action potential segment;
through the steps, for any gesture action, a first myoelectric signal corresponding to extensor and a second myoelectric signal corresponding to flexor at the forearm portion of the arm are acquired at any time, a first corrected myoelectric signal and a second corrected myoelectric signal are respectively obtained through correction, and then a second action potential section in the second corrected myoelectric signal and a first action potential section in the first corrected myoelectric signal are determined.
For a second action potential segment in the second corrected electromyographic signal and a first action potential segment in the first corrected electromyographic signal, embodiments of the present invention extract a plurality of first features from the first action potential segment and extract a plurality of second features from the second action potential segment.
Specifically, the first action potential segment is split to obtain a plurality of first action potential subsections, corresponding first features are extracted for each first action potential subsection, the second action potential segment is split to obtain a plurality of second action potential subsections, and corresponding second features are extracted for each second action potential subsection. The characteristics include wavelength, zero crossing point number, slope sign change number, AR model coefficient and skewness.
For example, the first action potential segment in the first corrected electromyographic signal a is taken as an example for illustration, and the signal interval includes 1-1000, and can be split into 10 first action potential subsections: 1-100, 101-200, 201-300, … …, extracting, for each first action potential subsection, a corresponding first feature, specifically comprising the following features:
A. wavelength of
The waveform length WL is simply accumulated by the length of K-point signals, reflects the complexity of the electromyographic signal waveform and reflects the combined effect of the electromyographic signal amplitude, frequency, duration and the like, and the value range of K can be the interval of each first action potential subsection such as 1-100, 101-200, 201-300 and … ….
B. Zero crossing point number
x i x i+1 ≤0,|x i -x i+1 |≥ε;
Simple special frequency statistics, calculating signal waveform in a period of timeThe number of times of passing the time axis (i.e. zero) gives two adjacent samples x i x i+1 The above condition is satisfied, the zero crossing point is added by 1, and the corresponding statistical interval of the zero crossing point can be the interval of each first action potential subsection such as 1-100, 101-200, 201-300 and … ….
C. Slope sign change number
(x i+1 -x i )*(x i -x i-1 )≤0,|x i -x i+1 |≥ε,|x i -x i-1 |≥ε;
The statistical feature is another feature describing the signal frequency information, given three consecutive sample values, x i+1 ,x i ,x i-1 The above condition is satisfied, the value of the change number is increased by 1, and the statistical interval of the corresponding slope sign change number can be the interval of each first action potential sub-segment of 1-100, 101-200, 201-300 … … and the like.
D. AR model coefficients
The AR model is a commonly used time series model as follows:
wherein s (n) represents an electromyographic signal, a i (i=1, 2,3 … p) denotes an AP model coefficient, p denotes a model order, and w (n) denotes random white noise.
E. Degree of deviation
The skewness is a characteristic for measuring the direction and the skewness of data, wherein Sk is the skewness and x is i For the sample observation value, n is the sample tax, x mean For the average value of the observation values of the sample n times, sd is the standard deviation of the sample, and the corresponding statistical interval of the skewness can be the interval of each first action potential subsection of 1-100, 101-200, 201-300 … … and the like.
Thus, for each first actuation potential sub-segment, the corresponding A, B, C, D, E features are extracted, as are for each second actuation potential sub-segment, the corresponding A, B, C, D, E features are extracted.
S104, splicing the plurality of first features and the plurality of second features based on a preset splicing rule to generate a plurality of feature vectors;
Through the steps, for each first action potential subsection, the corresponding A, B, C, D, E features are extracted, and for each second action potential subsection, the corresponding A, B, C, D, E features are extracted, so that the corresponding A, B, C, D, E features are included for each first feature, the corresponding A, B, C, D, E features are included for each second feature, and a plurality of first features and a plurality of second features are spliced to generate a plurality of feature vectors based on a preset splicing rule.
Specifically, the first features and the second features are spliced in a one-to-one correspondence manner based on a preset splicing rule to generate a plurality of feature vectors.
For example, for a plurality of first features extracted from a first action potential segment in the first corrected electromyographic signal a and a plurality of second features extracted from a second action potential segment in the first corrected electromyographic signal B, as shown in fig. 4, for a 1 st first feature and a 1 st second feature, direct stitching may generate a 1 st feature vector, for a 2 nd first feature and a 2 nd second feature, direct stitching may generate a 2 nd feature vector, for a 3 rd first feature and a 3 rd second feature, direct stitching may generate a 3 rd feature vector, and so on, a plurality of feature vectors may be obtained, x may be used 1 ,x 2 ,x 3 ,…x N And (3) representing.
S105, projecting each feature vector by using a feature projection calculation algorithm, and classifying and identifying gesture actions on each projection result by using a preset classifier.
For multiple feature vectors, x may be used
1 ,x
2 ,x
3 ,…x
N The number of gesture categories is NC, each gesture categoryLet w
i Contains nc
i The feature vectors are:
the feature vector average for each gesture action category:
overall eigenvector average:
discrete matrices within each gesture motion category:
a dispersion matrix between different gesture motion categories:
it can be demonstrated that the matrix S is guaranteed W Under the singular condition, the maximized J (W) problem solution can be converted into a eigenvalue decomposition problem, and the column vector of the optimal LDA projection matrix W can be used for solving the S W S and S B Substituting the following formula to obtain:
the projection matrix W can be obtained through the above steps, and each feature vector is input into a feature projection calculation algorithm, where the feature projection calculation algorithm includes:
y=W T x;
wherein, W is a projection matrix, x is the feature vector, and y is the projection result.
The feature projection calculation algorithm can realize dimension reduction of each feature vector, and can extract important information (such as distinguishing degree information, variance information and the like) in redundant features so as to improve the generalization performance of the subsequent classifier.
For each feature vector, a corresponding projection result can be obtained through the feature projection calculation algorithm, and gesture action classification and identification are carried out on each projection result by using a preset nearest neighbor classifier. After the feature vector is subjected to dimension reduction in this way, the KNN can be used for carrying out gesture action classification recognition on each projection result.
In the embodiment of the invention, in order to further improve the performance of the classifier, the false misclassification can be eliminated through Bayesian fusion.
For each feature vector input classifier, we get the conditional probability p (C i |w n ) (i=1, 2,3, … …, M), M representing the number of gesture motion types, w n For each feature vector, the representation belongs to a certain class C i Is a probability of (2).
When the first feature vector reaches the classifier, the feature vector belongs to a class C i P (C) i |w 1 ) Indicating that when the second feature vector arrives at the classifier, the feature vector belongs to a class C i P (C) i |w 2 ) Representation, and so on. The posterior probability for the second eigenvector belongs to class C i Is represented by p (C) i |w 1 ,w 2 ) Given, by bayesian rules:
considering the randomness of the electromyographic signals and the disjoint positions of the feature vectors on the time axis, the correlation of the feature vectors is very weak, which proves the statistical independence of the hypothesis of the invention, and the above formula can be simplified as follows:
From the above results, it can be seen that the gesture type posterior probability p (c_i-w_2) (i.e., p (C) i |w 1 ,w 2 ) Is practically equal to p (C) i |w 1 ) And p (C) i |w 2 ) Multiplied by a constant value, which can be extended to the nth eigenvector as follows:
where Δ is a normalization constant, the gesture motion category with higher probability is considered as the best classification for each feature vector.
In addition, when switching from one gesture motion category to another, there is an accurate switching delay, so one weight is added to the above equation as follows:
and calculating the posterior probability of any gesture classification to which each feature vector belongs through the preset posterior probability calculation formula, determining the gesture classification corresponding to the highest posterior probability, and classifying the gesture corresponding to each feature vector.
For example, the feature vector w is calculated by the above-mentioned predetermined posterior probability calculation formula N The posterior probability of any gesture classification is as follows: p (C) 1 |w 1 ,w 2 ,w 3 ,…w N )、p(C 2 |w 1 ,w 2 ,w 3 ,…w N )、p(C 3 |w 1 ,w 2 ,w 3 ,…w N )、……p(C i |w 1 ,w 2 ,w 3 ,…w N ) Determining the gesture action classification corresponding to the highest posterior probability as a feature vector w N And classifying corresponding gesture actions.
Wherein said p (C i |w 1 ,w 2 ,w 3 ,…w N ) For the posterior probability, the p (C i |w n ) A conditional probability of classifying any gesture to which each feature vector belongs, wherein delta is a normalization constant, and k is j Obtained from the following function:
where j=1, 2,3, … …, m+1.
Through the description of the technical scheme provided by the embodiment of the invention, for any gesture, a first electromyographic signal corresponding to a first position of an arm part and a second electromyographic signal corresponding to a second position are acquired at any time, a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal are determined by acquiring the first electromyographic signal and the second electromyographic signal, a plurality of first features are extracted from the first action potential segment, a plurality of second features are extracted from the second action potential segment, a plurality of first features and a plurality of second features are spliced to generate a plurality of feature vectors based on preset splicing rules, each feature vector is projected by using a feature projection calculation algorithm, and gesture action classification identification is performed on each projection result by using a preset classifier.
The first electromyographic signals corresponding to the first position and the second electromyographic signals corresponding to the second position of the arm part in different gesture actions are acquired for a plurality of times, the first electromyographic signals corresponding to the first position and the second electromyographic signals corresponding to the second position of the arm part in each acquisition are processed in a characteristic extraction and projection mode, so that different gesture actions are separated to the greatest extent, the control of multiple degrees of freedom can be realized, and the flexible motion function of the current multiple degrees of freedom electromyographic artificial limb is adapted. In addition, through Bayesian fusion post-processing, the performance of the classifier is improved by eliminating false misclassification, accurate conversion delay from one class to another class is avoided through a weight scheme, electromyographic signals belonging to different motions are correctly classified to the maximum extent, the control of multiple degrees of freedom is realized, and higher accuracy is obtained.
Corresponding to the above method embodiment, the embodiment of the present invention further provides an electromyographic signal processing device, as shown in fig. 5, where the device may include: the device comprises a signal acquisition module 510, a potential segment determination module 520, a feature extraction module 530, a feature stitching module 540, a vector projection module 550 and a classification recognition module 560.
The signal obtaining module 510 is configured to obtain a first electromyographic signal and a second electromyographic signal, where the first electromyographic signal and the second electromyographic signal are included in a preset gesture action set, and for any gesture action, the first electromyographic signal and the second electromyographic signal corresponding to a first position of an arm part are collected at any time;
a potential segment determining module 520, configured to determine a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal;
a feature extraction module 530, configured to extract a plurality of first features from the first action potential segment and extract a plurality of second features from the second action potential segment;
the feature stitching module 540 is configured to stitch the plurality of first features and the plurality of second features to generate a plurality of feature vectors based on a preset stitching rule;
A vector projection module 550, configured to project each of the feature vectors using a feature projection calculation algorithm;
the classification recognition module 560 is configured to perform gesture classification recognition on each projection result by using a preset classifier.
The embodiment of the invention also provides an intelligent wearable device, as shown in fig. 6, which comprises a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62 and the memory 63 complete the communication with each other through the communication bus 64,
a memory 63 for storing a computer program;
the processor 61 is configured to execute the program stored in the memory 63, and implement the following steps:
acquiring a first electromyographic signal and a second electromyographic signal, wherein the first electromyographic signal and the second electromyographic signal are included in a preset gesture action set, and the first electromyographic signal and the second electromyographic signal corresponding to a first position of an arm part and a second position of the arm part are acquired at any time according to any gesture action; determining a first action potential segment in the first electromyographic signal and a second action potential segment in the second electromyographic signal; extracting a plurality of first features from the first action potential segment and a plurality of second features from the second action potential segment; splicing the first features and the second features based on a preset splicing rule to generate a plurality of feature vectors; and projecting each feature vector by using a feature projection calculation algorithm, and classifying and identifying gesture actions on each projection result by using a preset classifier.
The communication bus mentioned by the smart wearable device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the intelligent wearable device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the electromyographic signal processing method of any of the above embodiments.
In a further embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, cause the computer to perform the electromyographic signal processing method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a storage medium or transmitted from one storage medium to another, for example, from one website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage media may be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.