Gesture recognition method, apparatus, device, and medium

By performing two segments and blurring processes on the surface electromyography signal to form a temporal fusion sequence, the accuracy problem of gesture recognition models in the prior art is solved, and higher recognition accuracy is achieved.

CN123179168APending Publication Date: 2026-11-27SHENZHEN XINGWEI INTELLIGENT DRIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611504614.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-24
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, the non-stationarity, noise sensitivity, and individual variability of surface electromyography (EMG) signals lead to a decline in the performance of gesture recognition models. Traditional methods struggle to balance local information and global movement trends in multi-channel EMG signals, resulting in limited recognition accuracy.

Method used

By segmenting the electromyography signal to be tested twice, a first signal segment sequence and a shorter second signal segment sequence are obtained. Short-term features are extracted and blurred to form a temporal fusion sequence, which is then input into a gesture recognition model for recognition.

Benefits of technology

It improves the accuracy of gesture recognition, enabling it to more accurately reflect the evolution of gestures while taking into account both local information and global movement trends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179168A_ABST
    Figure CN123179168A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a gesture recognition method, device, equipment and medium, which can be used to solve the problem of improving gesture recognition accuracy. The gesture recognition method comprises: acquiring a to-be-tested electromyographic signal corresponding to a to-be-recognized gesture of a user; performing first segmentation on the to-be-tested electromyographic signal to acquire K first signal segment sequences; performing second segmentation on each first signal segment sequence to acquire J second signal segment sequences corresponding to each first signal segment sequence, and extracting short-time features of each second signal segment sequence; performing fuzzy processing on each short-time feature to acquire a membership vector; fusing each first signal segment sequence and all corresponding membership vectors in a sampling time sequence to form a time sequence fusion sequence; splicing all time sequence fusion sequences and the to-be-tested electromyographic signal in a sampling time sequence to form a time sequence input sequence; and inputting the time sequence input sequence into a gesture recognition model to acquire a corresponding category recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gesture recognition technology, and more specifically to gesture recognition methods, devices, equipment, and media. Background Technology

[0002] Surface electromyography (sEMG) signals are bioelectrical signals generated during muscle contraction in the human body. They can reflect the intentional movements of the hand and forearm in a non-invasive manner. By collecting sEMG signal samples and learning from them using a deep learning model, hand movement recognition models can be obtained, and these models have been widely used in prosthetic control, rehabilitation training, assistive interaction, and wearable recognition systems. However, sEMG signals exhibit significant non-stationarity, noise sensitivity, and individual variability. In practical use, they are easily affected by factors such as electrode displacement, muscle fatigue, electromagnetic interference, and changes in user force application habits, leading to a decline in the performance of the recognition model.

[0003] In existing technologies for gesture recognition, traditional machine learning methods typically rely on manually constructing time-domain or frequency-domain features of surface electromyography (SEMG) signals. Their ability to model complex temporal dependencies is limited, resulting in limited accuracy of the acquired gesture recognition models. For example, while using only convolutional networks or a single long short-term memory (LSTM) network to process SEMG signals to recognize corresponding gestures can improve recognition performance to some extent, it is difficult to simultaneously consider both local information and global movement trends in multi-channel SEMG signals (SEMG signals acquired through multi-channel sensors), thus affecting the accuracy of gesture recognition.

[0004] Therefore, how to more accurately perform gesture recognition using surface electromyography signals is a problem that needs to be solved. Summary of the Invention

[0005] One objective of this application is to solve at least one of the problems mentioned in the background above and to provide corresponding beneficial effects.

[0006] Another objective of this application is to provide a gesture recognition method, apparatus, device, and medium to address the problem of how to improve the accuracy of gesture recognition.

[0007] The embodiments of this application mainly achieve the above objectives through the following technical solutions.

[0008] In a first aspect, embodiments of this application provide a gesture recognition method, including:

[0009] Acquire the electromyographic signal to be measured corresponding to the user's gesture to be recognized;

[0010] The electromyographic signal to be tested is first segmented to obtain K corresponding first signal segment sequences;

[0011] Perform a second segmentation on each of the first signal segment sequences to obtain J second signal segment sequences corresponding to each of the first signal segment sequences, and extract the short-time features of each of the second signal segment sequences;

[0012] Each short-time feature is fuzzed to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each first signal segment sequence.

[0013] According to the sampling time order, each first signal segment sequence is fused with all corresponding membership vectors to form a corresponding time-series fusion sequence;

[0014] According to the sampling time sequence, all the time-series fusion sequences are spliced ​​with the electromyography signal to be tested to form a time-series input sequence;

[0015] The time-series input sequence is input into the gesture recognition model to obtain the gesture recognition result corresponding to the gesture to be recognized.

[0016] In a second aspect, embodiments of this application provide a gesture recognition device, comprising:

[0017] The electromyography (EMG) signal acquisition module is used to acquire the EMG signal to be tested corresponding to the user's gesture to be recognized;

[0018] The first signal segment sequence acquisition module is used to perform a first segmentation on the electromyography signal to be tested and acquire K corresponding first signal segment sequences.

[0019] The short-time feature acquisition module is used to perform a second segmentation on each of the first signal segment sequences, acquire J second signal segment sequences corresponding to each of the first signal segment sequences, and extract short-time features from each of the second signal segment sequences;

[0020] The membership vector acquisition module is used to perform fuzzing processing on each of the short-time features to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each of the first signal segment sequences.

[0021] The time-series fusion sequence acquisition module is used to fuse each of the first signal segment sequences with all corresponding membership vectors according to the sampling time order to form a corresponding time-series fusion sequence.

[0022] The timing input sequence acquisition module is used to splice all the timing fusion sequences with the electromyography signal to be tested in the order of sampling time to form a timing input sequence;

[0023] The recognition module is used to input the time-series input sequence into the gesture recognition model to obtain the corresponding gesture recognition result.

[0024] In a third aspect, embodiments of this application provide an electronic device, including a processor, a memory, and a computer program stored in the memory, wherein the computer program, when executed by the processor, implements the gesture recognition method described in the first aspect.

[0025] In a fourth aspect, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program implementing the gesture recognition method described in the first aspect when executed by a processor.

[0026] The beneficial effects of the embodiments of the present invention include:

[0027] 1. In some embodiments, the first aspect of this application provides a gesture recognition method, which involves segmenting the electromyography (EMG) signal corresponding to the gesture to be recognized twice to obtain a relatively long first signal segment sequence and a shorter second signal segment sequence. Short-time features (including at least one feature) are extracted based on the second signal segment sequence. Each short-time feature is then fuzzed to obtain a corresponding membership vector. Each first signal segment sequence is fused with all corresponding membership vectors to form a corresponding temporal fusion sequence. Then, all temporal fusion sequences are concatenated with the EMG signal to be measured according to the sampling time order to form a temporal input sequence. This method can take into account both the local information of the gesture (reflected by the first signal segment sequence and short-time features) and the global movement trend, and can more accurately reflect the evolution process of the gesture, thereby improving the accuracy of gesture recognition.

[0028] 2. In some embodiments, this application provides a gesture recognition device for implementing the gesture recognition method of the first aspect embodiment, which can more accurately reflect the evolution process of gestures, thereby improving the accuracy of gesture recognition.

[0029] 3. In some embodiments, this application provides an electronic device including a processor, a memory, and a computer program stored in the memory. When executed by the processor, the computer program implements the gesture recognition method described in the first aspect. Therefore, the technical effects corresponding to the gesture recognition method can be achieved.

[0030] 4. In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the gesture recognition method described in the first aspect. Therefore, the technical effects corresponding to the gesture recognition method can be achieved. Attached Figure Description

[0031] Figure 1 This is a flowchart illustrating a gesture recognition method according to an embodiment of this application;

[0032] Figure 2This is a structural block diagram of a gesture recognition device according to an embodiment of this application. Detailed Implementation

[0033] The present application will now be described in further detail with reference to the accompanying drawings, so that those skilled in the art can implement it based on the description.

[0034] The terms "first," "second," etc., used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," etc., may explicitly or implicitly include at least one of that feature.

[0035] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0036] It should also be noted that, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium.

[0037] In addition to the above, it should be emphasized that the reference to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0038] <Gesture Recognition Methods>

[0039] The present application provides a gesture recognition method in a first aspect, including the following steps S200~S800.

[0040] S200: Acquire the electromyographic signal to be tested corresponding to the user's gesture to be recognized.

[0041] S300: Perform the first segmentation on the electromyographic signal to be tested to obtain the corresponding K first signal segment sequences.

[0042] K is a positive integer greater than 1;

[0043] The first signal segment sequence is suitable for describing the short-range evolution of an action.

[0044] S400. Perform a second segmentation on each first signal segment sequence to obtain J second signal segment sequences corresponding to each first signal segment sequence, and extract short-time features of each second signal segment sequence.

[0045] J is a positive integer greater than 1.

[0046] Gestures often occur in a shorter timeframe during initiation, upward exertion, and release. Therefore, the second signal segment sequence formed by segmenting the first signal segment sequence can preserve these local changes.

[0047] S500. Each short-time feature is blurred to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each first signal segment sequence.

[0048] S600. According to the sampling time order, each first signal segment sequence is fused with all corresponding membership vectors to form the corresponding time-series fusion sequence.

[0049] This yields K time-series fusion sequences.

[0050] S700: According to the sampling time sequence, all time-series fusion sequences are spliced ​​with the electromyography signal to be tested to form a time-series input sequence.

[0051] S800: Input the time sequence into the gesture recognition model to obtain the gesture recognition result corresponding to the gesture to be recognized.

[0052] In some embodiments, the gesture recognition result includes the probability that the gesture to be recognized belongs to each gesture category in the gesture set.

[0053] The gesture set includes at least one of the first gesture set and the second gesture set.

[0054] The gesture categories in the first gesture set include at least one of grasping gestures and releasing gestures; in some embodiments, the first gesture set is a base gesture set.

[0055] The second gesture set is a set of numeric gestures, and the gesture categories in the numeric gesture set include at least one of the numeric gestures corresponding to the numbers 0 to 9; for example, the first gesture is a first numeric gesture corresponding to the number 0, and the second gesture is a second numeric gesture corresponding to the number 1. Regarding numeric gestures, it should be noted that they can be used to express corresponding numbers; for example, when a user extends one finger, it is the second numeric gesture.

[0056] In some embodiments, the gesture recognition result is either the gesture category to which the gesture to be recognized belongs or is uncertain.

[0057] The first aspect of this application provides a gesture recognition method that segments the electromyography (EMG) signal corresponding to the gesture to be recognized twice to obtain a relatively long first signal segment sequence and a shorter second signal segment sequence. Short-time features (including at least one feature) are extracted from the second signal segment sequence. Each short-time feature is then fuzzed to obtain a corresponding membership vector. Each first signal segment sequence is fused with all corresponding membership vectors to form a corresponding temporal fusion sequence. Finally, all temporal fusion sequences are concatenated with the EMG signal to be measured in the order of sampling time to form a temporal input sequence. This method can take into account both the local information of the gesture (reflected by the first signal segment sequence and short-time features) and the global movement trend, and can more accurately reflect the evolution process of the gesture, thereby improving the accuracy of gesture recognition.

[0058] Regarding step S200, it is understood that the electromyographic signal to be measured includes at least one surface electromyographic signal.

[0059] Regarding the acquisition of surface electromyography (EMG) signals from the EMG signals to be measured, in some embodiments, a multi-channel EMG sensor can be used to acquire the surface EMG signals when the user performs a preset gesture. Specifically, the multi-channel EMG sensor is installed on the user's forearm, and when the user performs the preset gesture, the raw surface EMG signals from multiple channels are acquired to obtain the surface EMG signal. The multi-channel EMG sensor can acquire signals from different positions on the user's forearm, obtaining multiple surface EMG signals, which can more accurately reflect the user's gestures.

[0060] Optionally, the multi-channel electromyography (EMG) sensor is an 8-channel EMG sensor that can acquire 8 surface EMG signals.

[0061] It is understandable that the acquired electromyographic (EMG) signal is presented in the form of signal waves in its original state. When the EMG signal to be measured contains multiple surface EMG signals, the EMG signal to be measured has multiple signal waves, each signal wave corresponding to one surface EMG signal.

[0062] Optionally, the multi-channel electromyography sensor samples the electromyography signal to be measured at a frequency of 50~200Hz, optionally 100Hz.

[0063] In some embodiments, surface electromyography (EMG) signals can be acquired using a wearable acquisition device, wherein the wearable acquisition device includes a multi-channel EMG sensor. Optionally, the wearable acquisition device is the Myo EMG armband, whose multi-channel EMG sensor comprises eight sensors, each with one channel.

[0064] In at least one embodiment, when acquiring surface electromyography (EMG) signals, a multi-channel EMG sensor is fixed to the user's forearm, and the multi-channel EMG sensor covers at least the palmar flexor muscles and dorsal extensor muscles of the user (i.e., the subject). When the user performs the gesture to be recognized, the acquisition device continuously records the raw potential values ​​of each channel of the multi-channel EMG sensor according to a set sampling frequency, forming an EMG signal to be measured containing an F-channel synchronous time series. It can be understood that the F-channel synchronous time series is a signal time sequence with dimensions (M×T×F).

[0065] Regarding the signal timing sequence, it should be noted that M is the number of sampling times of the electromyographic signal to be measured, which is also equal to the number of sampling times. This means that sampling was performed sequentially at M times within the time interval T, which also means that M sampling times were performed.

[0066] T represents the duration of the electromyographic signal to be measured, i.e., the sampling duration of the electromyographic signal to be measured;

[0067] F represents the number of channels in the multichannel electromyography sensor.

[0068] For example, if an 8-channel multi-channel surface electromyography (EMG) sensor is used, sampling at a frequency of 100Hz (sampling once every 10ms) for a sampling duration of 20 seconds, then the 20-second action recording can form a data matrix of 2000 sampling moments, each with 8 channels of EMG sampling values ​​(each channel corresponding to the EMG sampling value at each sampling moment is a surface EMG signal), which is the EMG signal to be measured. Here, the time sequence length T equals the sampling duration of 20 seconds, M equals the number of sampling moments of 2000, and the number of channels F equals 8.

[0069] In some embodiments, step S300 includes steps S310 to S320.

[0070] S310. Preprocess the electromyographic signal to be tested to obtain the processed signal.

[0071] Preprocessing includes at least one of resting baseline subtraction, power frequency notch filtering, abnormal spike clipping, and normalization.

[0072] In some embodiments, resting baseline subtraction is used to eliminate bias caused by natural muscle tension after the subject wears the wearable acquisition device.

[0073] In some embodiments, power frequency notch filtering is used to suppress power supply interference at frequencies of 50 Hz or 60 Hz;

[0074] In some embodiments, abnormal spikes and outliers may be generated due to changes in the contact state between the electrodes of the acquisition device and the subject's skin, displacement, or disturbance of the acquisition device's cable. Abnormal spike clipping is used to process these outliers.

[0075] In some embodiments, normalization is used to reduce the differences in force exertion between different users, so that subsequent gesture recognition models focus more on waveform change trends rather than absolute amplitude.

[0076] S320. Perform the first segmentation on the processed signal to obtain the corresponding K first signal segment sequences.

[0077] In some embodiments, the processed signal is first segmented using a first sliding window with a window length of S1 to obtain a sequence of K first signal segments with a dimension of (N×F);

[0078] Where N is the number of sampling times contained in the first signal segment sequence, and F is the number of channels of the multi-channel electromyography (EMG) sensor. Accordingly, each channel of the first signal segment sequence has N EMG sample values.

[0079] It is understandable that the electromyography signal to be tested is a long-term continuous data stream. After the first sliding window is used to perform the first segmentation of the electromyography signal to be tested, a relatively short first data segment, namely the first signal segment sequence, can be extracted.

[0080] Two adjacent first sliding windows may or may not overlap. Optionally, if they overlap, the overlap rate (the time length of the overlapping portion divided by the time length of the first sliding window) is less than or equal to 50%. Optionally, in real-time recognition scenarios, a smaller overlap can be selected based on latency requirements.

[0081] In some embodiments, the window length S1 is 300ms, that is, the first segmentation window segmentation signal is 300ms, thereby the electromyography signal to be measured can be segmented into a first data segment with a time length of 300ms.

[0082] In some embodiments, N = 30 and F = 8. For example, taking the electromyography signal to be measured acquired at a sampling frequency of 100 Hz and a first sliding window of 300 ms as an example, a first data segment contains 30 sampling times; if there are a total of 8 channels, the first data segment can be represented as a 30×8 matrix.

[0083] In step S400, within each first data segment, a second sliding window is used to further divide the data into short time segments to obtain J second signal segment sequences. Each short time segment is a second signal segment sequence.

[0084] Optionally, a second sliding window is used to perform a second segmentation on the first signal segment sequence. This second sliding window is a short window with a window length S2 of 50ms and a step size S3 of 20ms. For example, with a 50ms window length and a 20ms step size, 13 short segments can be obtained within the 300ms first data segment. This is because a 300ms segment is suitable for describing the short-range evolution of an action, but the initiation of a gesture, the exertion of force, and the release often occur within a shorter timeframe; a short window can preserve these local changes.

[0085] It is understandable that each second signal segment sequence includes R sampling times, and the second signal segment sequence...

[0086] Each channel at each sampling time has a corresponding electromyographic sampling value, so each channel of the second signal segment sequence has R electromyographic sampling values.

[0087] In step S400, after obtaining J second signal segment sequences, short-time features of all channels of each second signal segment sequence are extracted.

[0088] It is understandable that when the electromyographic signal to be measured is a multi-channel signal, the second signal segment sequence corresponds to multiple channels, and it is necessary to extract the short-time features of each channel separately, and obtain all the short-time features of the second signal segment sequence based on the short-time features of all channels of the second signal segment sequence.

[0089] Optionally, the short-time characteristics of each channel include at least one of RMS amplitude, mean absolute rate of change, frequency domain energy, coefficient of variation, and autocorrelation mode.

[0090] RMS amplitude is used to represent the intensity of muscle contraction reflected in the second signal segment sequence. Users typically exhibit higher RMS amplitudes when performing grasping movements, while RMS amplitudes are lower when users are at rest. Therefore, RMS amplitude is helpful in recognizing gestures.

[0091] In some embodiments, the method for calculating the RMS amplitude of each channel in the short-time feature includes: within a second signal segment sequence, i.e., a second sliding window, calculating R electromyographic sampling values ​​(e.g., for each channel) for each channel. , ... First, square each electromyography (EMG) sample value to obtain the corresponding first square value. Then, add up the first square values ​​of all EMG sample values ​​and calculate the average value. Finally, take the square root of the average value to obtain the second square value, which is the RMS amplitude of each channel.

[0092] For multi-channel signals, the RMS amplitude can be calculated for each channel separately to obtain the RMS amplitude of all channels.

[0093] The mean absolute rate of change refers to the average of the absolute values ​​of the differences between adjacent sampling points. The mean absolute rate of change can reflect the speed of muscle force changes corresponding to the second signal segment sequence, such as the speed of force increase or decrease. It can distinguish the initiation, rapid release and smooth maintenance of hand gestures.

[0094] In at least one embodiment, the average absolute rate of change for each channel of the same second sliding window can be calculated according to the following formula:

[0095] ;

[0096] Where i is greater than or equal to 2, i = 2 to R, that is, the range of i is 2 to R;

[0097] MAAR stands for Average Absolute Rate of Change;

[0098] R represents the number of sampling times contained in the second signal segment sequence.

[0099] and These represent two adjacent sample values. Let be the electromyographic sample value at the i-th sampling time out of R sampling times. Let be the electromyographic sample value at the (i-1)th sampling time out of R electromyographic sample values.

[0100] Represents the absolute value of the difference between adjacent sampling points.

[0101] This represents the sum of the absolute values ​​of the differences between all adjacent sampling points;

[0102] This indicates the sampling interval, which is the time interval between two adjacent sampling times.

[0103] Optionally, It can be calculated using the following formula: ,

[0104] in, The sampling frequency.

[0105] The larger the value, the more obvious and faster the signal changes between adjacent sampling points.

[0106] Frequency domain energy refers to the energy distribution obtained after performing frequency domain or approximate frequency domain analysis on the second signal segment sequence. It is used to reflect the proportion of frequency components in the second signal segment sequence and can help determine whether the second signal segment sequence reflects rapid muscle contraction or noise interference.

[0107] The coefficient of variation (COP) is the ratio of the standard deviation to the absolute value of the mean of the R electromyographic (EMG) samples in the second signal segment sequence. It reflects the stability of the fluctuations within the second signal segment sequence. The COP is usually relatively stable. A small COP indicates that the fluctuations in the hand gesture corresponding to the second signal segment sequence are relatively small and the force exertion is relatively stable. A large COP indicates that the force exertion of the hand gesture corresponding to the second signal segment sequence is unstable or that there is abnormal contact between the acquisition device and the user's skin.

[0108] The autocorrelation mode refers to the degree of correlation between the second sliding window and the delay window of the second signal segment sequence. It is used to determine whether the current waveform of the second signal segment sequence is a continuous contraction, a smooth release, or a sudden spike. It helps to distinguish between real action segments and isolated noise spikes; for example, if it is a sudden spike, it is identified as an isolated noise spike.

[0109] The current waveform represents the change in electromyographic signal over time within this second sliding window. High autocorrelation generally indicates a relatively continuous change; isolated spikes are usually relatively low.

[0110] The delay window is a window that is shifted backward by τ sampling points from the second sliding window. The signal within the delay window corresponding to each second signal segment sequence can be used to compare with that second signal segment sequence to determine the change in the current waveform.

[0111] Regarding step S500, in some embodiments, short-term features are fed into a fuzzy inference model. The fuzzy inference model uses a triangular membership function to partition the features into fuzzy sets, and performs fuzzy inference and defuzzification according to the rule base, outputting a membership vector.

[0112] Optionally, the membership vector is a 6-dimensional membership vector of the gesture state.

[0113] Step S500 can convert continuously changing electromyographic features (i.e. short-term features) into membership vectors associated with several gesture states to introduce physiological priors and noise-resistant information.

[0114] In some embodiments, step S500 includes:

[0115] After inputting the short-time features into the fuzzy inference model, the fuzzy inference model uses the triangular membership function to describe the range of each feature in the short-time features, and judges the membership degree of each feature in the short-time features (such as RMS amplitude, mean absolute rate of change, short-time frequency domain energy, coefficient of variation and autocorrelation mode), and obtains the set of feature membership degrees of all features of the short-time features. The membership degree is selected from any one of low, medium and high.

[0116] Then, based on the feature membership degree set and rule base of all short-term features of the second signal segment sequence, the proximity relationship between the second signal segment sequence and each inferred state in the output state set is inferred, and the inferred state that is closest to the actual gesture state corresponding to the second signal segment sequence is determined. Then, the corresponding 6-dimensional membership vector is obtained by defuzzification. The output state set includes at least one inferred state among the resting state, continuous contraction state, rapid movement state, grasping state, release state, and undetermined state.

[0117] The 6-dimensional membership vector does not directly replace the judgment of the subsequent gesture recognition model. Instead, it is used as auxiliary information and is input into the gesture recognition model along with the electromyographic signal to be tested with the original waveform for subsequent recognition.

[0118] In some embodiments, the rule base includes at least one of a first rule, a second rule, a third rule, a fourth rule, a fifth rule, and a sixth rule.

[0119] The first rule R1 states that if the reasoning state of the second signal segment sequence is a rapid motion state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that indicates the gesture state of the second signal segment sequence is closer to the rapid motion state. This 6-dimensional membership vector is often seen at the beginning stage of a gesture, when the amplitude of muscle contraction increases rapidly.

[0120] Furthermore, if the amplitude is high and the rate of change is high (a high rate of change indicates rapid change), then the inference state of the second signal segment sequence is a rapid motion state.

[0121] The second rule R2 is that if the reasoning state of the second signal segment sequence is the grasping state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that the second signal segment sequence is closer to the grasping state; this 6-dimensional membership vector indicates that the flexor muscle group exerts continuous force during grasping, and the local waveform continuity is good.

[0122] Furthermore, if the frequency domain energy is high and the autocorrelation pattern is high (a high autocorrelation pattern indicates that the autocorrelation patterns are relatively consistent), then the inference state of the second signal segment sequence is the grasping state.

[0123] The third rule R3 states that if the inference state of the second signal segment sequence is a continuously contracting state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that the second signal segment sequence is closer to the continuously contracting state. This 6-dimensional membership vector indicates that the user maintains a certain gesture and the waveform does not have obvious abrupt changes.

[0124] Furthermore, if the variability is low and the amplitude is medium, then the inference state of the second signal segment sequence is a continuous contraction state.

[0125] The fourth rule R4 states that if the inference state of the second signal segment sequence is the release state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that the second signal segment sequence is closer to the release state. This 6-dimensional membership vector indicates that the electromyographic amplitude decreases during release and exhibits a short-term change.

[0126] Furthermore, if the average absolute rate of change is negatively fast and the amplitude changes from high to medium, then the inference state of the second signal segment sequence is the release state.

[0127] The fifth rule R5 states that if the inference state of the second signal segment sequence is a resting state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that the second signal segment sequence is closer to the resting state; this 6-dimensional membership vector indicates that the forearm is not exerting significant force and the signal is close to the resting baseline.

[0128] Furthermore, if the amplitude is low and the variability is low, then the inference state of the second signal segment sequence is a resting state.

[0129] The sixth rule R6 states that if the reasoning state of the second signal segment sequence is an undetermined state, then the corresponding 6-dimensional membership vector is output, which represents the 6-dimensional membership vector that the second signal segment sequence is closer to the undetermined state. This 6-dimensional membership vector indicates that the second signal segment sequence is used to avoid noise or to represent a transitional action being forcibly classified as a determined gesture.

[0130] An undetermined state refers to a situation where the inferred state of the second signal segment sequence does not belong to any of the following states: resting, continuous contraction, rapid movement, grasping, or releasing. In other words, the membership degrees of the resting, continuous contraction, rapid movement, grasping, and releasing states are essentially equal, and the difference in membership degrees between any two states is within a preset range. Therefore, it is difficult to determine which of the following states the gesture state of the second signal segment sequence is closer to: resting, continuous contraction, rapid movement, grasping, or releasing.

[0131] Regarding step S600, it is understood that multiple short-time features extracted in the first signal segment sequence according to the time order can be fused with the corresponding membership vector according to the time alignment method. That is, the electromyographic signal segment composed of multiple consecutive short windows is fused with the corresponding membership vector to form a temporal fusion sequence.

[0132] Specifically, according to the start and end times of the second signal segment sequence within the first signal segment sequence, the membership vector corresponding to each second signal segment sequence is mapped to the same time position. The fusion method can be channel splicing, feature splicing, or tensor fusion. For example, if the first signal segment sequence is a 30×8 matrix (30 being the number of sampling times and 8 being the number of channels), and there are 13 corresponding second signal segment sequences, the 6-dimensional membership vectors of the 13 second signal segment sequences can be interpolated or repeatedly mapped to the 30 sampling times they cover, resulting in a temporal fusion sequence of the first signal segment sequence.

[0133] Regarding step S700, specifically, K time-series fusion sequences are spliced ​​onto the electromyography signal to be tested according to the sampling time order to form a time-series input sequence. This not only preserves the continuous waveform information of the original electromyography signal to be tested, but also incorporates the prior representation formed by fuzzy inference, taking into account both short-term features and medium-term dynamics (reflected by the first signal segment sequence), and can more accurately obtain the recognition result of the gesture category.

[0134] Continue as Figure 1 As shown, in some embodiments, the gesture recognition method further includes step S100 before step S200:

[0135] S100, Obtain the gesture recognition model.

[0136] Gesture recognition models are models trained based on deep learning models. Gesture recognition models can be pre-trained model files stored on the device, or they can be models trained locally or on a server and then distributed to the terminal device.

[0137] The fuzzy inference model is responsible for converting short-term features into membership vectors, while the deep learning recognition model is responsible for outputting gesture recognition results based on the fused temporal input sequence.

[0138] Deep learning models are models with temporal modeling capabilities and can be selected from two-stage attention LSTM recognition models (i.e., LSTM-MSA models), GRU (Gated Recurrent Unit) models, Transformer models, or other deep network models.

[0139] In some embodiments, step S100 includes S110~180:

[0140] Step S110: Obtain at least one electromyographic signal sample corresponding to each gesture in the gesture set to obtain a sample set.

[0141] Each electromyographic signal sample has at least one of the following: action start time, action end time, subject number, sensor number, and gesture category label.

[0142] The sample set includes at least one of the following: a first sample set corresponding to the first gesture set and a second sample set corresponding to the second gesture set.

[0143] It should be noted that the method for collecting electromyographic signal samples is basically the same as that for the electromyographic signal to be tested. Please refer to the previous explanation on collecting the electromyographic signal to be tested.

[0144] The sampling frequency of electromyographic signal samples can be set from 50Hz to 2000Hz, depending on the sensor's capabilities and real-time requirements.

[0145] Step S120: Determine the training set based on the sample set, perform a first segmentation on each electromyographic signal sample in the training set, and obtain K first signal segment sequences corresponding to each electromyographic signal sample.

[0146] When the sample set includes a first sample set and a second sample set, W1 electromyographic signal samples can be selected from the first sample set and V1 electromyographic signal samples can be selected from the second sample set to form a sample set.

[0147] For example, for each electromyography signal sample, the resting baseline is first subtracted and a 50Hz notch filter is applied, and then the first signal segment sequence is extracted in a 300ms window. At a sampling frequency of 100Hz, a 30×8 matrix is ​​formed by extracting 30 sampling times (sampling points). The rows (30) of the matrix represent the sampling times arranged in the order of sampling time, and the columns (8) represent the channel numbers.

[0148] The length of the first sliding window can be adjusted according to actual needs.

[0149] Step S130: Perform a second segmentation on each first signal segment sequence, obtain J second signal segment sequences corresponding to each first signal segment sequence, and extract short-time features of each second signal segment sequence.

[0150] In some embodiments, a second sliding window with a window length of 50ms and a step size of 20ms is used to truncate each 300ms first signal segment sequence to obtain 13 second signal segment sequence segments. Short-time features are calculated for each second signal segment sequence segment. The short-time features include the following 5 features: RMS amplitude, mean absolute rate of change, short-time frequency domain energy, coefficient of variation, and autocorrelation mode.

[0151] The length of the second sliding window can be adjusted according to actual needs.

[0152] Step S140: Obtain the membership vector corresponding to each short-time feature, thereby obtaining all membership vectors corresponding to each first signal segment sequence.

[0153] In some embodiments, step S140 includes:

[0154] The short-term features are input into the fuzzy inference model. The fuzzy inference model uses the triangular membership function to determine the degree of membership of each feature in the short-term features, and obtains the set of feature membership degrees of all features of the short-term features. The degree of membership is selected from any one of low, medium and high.

[0155] Then, based on the feature membership degree set and rule base of all short-term features of the second signal segment sequence, the proximity relationship between the second signal segment sequence and each state in the output state set is inferred to determine the state closest to the second signal segment sequence. Then, the corresponding 6-dimensional membership vector is obtained through defuzzification. The output state set includes resting state, continuous contraction state, rapid movement state, grasping state, release state, and undetermined state.

[0156] In some embodiments, the rule base includes at least one of a first rule, a second rule, a third rule, a fourth rule, a fifth rule, and a sixth rule.

[0157] The first, second, third, fourth, fifth, and sixth rules can be found in the preceding text and will not be repeated here.

[0158] Step S150: According to the sampling time order, each first signal segment sequence is fused with all corresponding membership vectors to form the corresponding time-series fusion sequence.

[0159] Step S160: According to the sampling time sequence, all the time-series fusion sequences are spliced ​​with the electromyography signal to be tested to form a time-series input sequence.

[0160] Step S170: Input all time series input sequences into the deep learning model in sequence to train the model and obtain the trained model.

[0161] In some embodiments, the trained model is used as a gesture recognition model.

[0162] The LSTM-MSA model consists of an input attention layer, an LSTM layer, an output attention layer, and a fully connected classification layer.

[0163] For example, the LSTM-MSA model can be deployed using the TensorFlow framework and implemented on NVIDIA Jetson Xavier NX. Reasoning speed.

[0164] It should be noted that:

[0165] The input attention layer is used to perform self-attention calculation on the input time sequence, highlighting local key features (such as signal abrupt change points) through weighting, and outputting the weighted feature matrix to the LSTM layer.

[0166] More specifically, the input attention layer is used for:

[0167] Perform a linear transformation on the input time series sequence X to generate a query matrix. Key matrix Sum matrix ;

[0168] Calculate the attention score matrix The weight matrix is ​​obtained after softmax normalization. ;

[0169] The characteristic matrix is ​​obtained by weighted calculation. And the hidden dimensions are mapped to the LSTM layer through a fully connected classification layer.

[0170] The LSTM layer is used to perform temporal modeling on the input feature matrix, capture the long-term dependencies of the signal, and generate a sequence of hidden states. .

[0171] The output attention layer is used to perform self-attention calculation on the hidden state sequence of the LSTM layer, focusing on global key temporal features and outputting a weighted global feature vector.

[0172] More specifically, the output attention layer is used for:

[0173] For hidden state sequence Perform a linear transformation to generate the query matrix. Key matrix Value matrix ;

[0174] Calculate the attention score matrix The weight matrix is ​​obtained after softmax normalization. ;

[0175] The global feature vector is obtained by weighted calculation. After dimensional compression, we get .

[0176] Fully connected layers are used to process the feature matrix output by the input attention layer. ) and the global feature vector output by the output attention layer ( The sequence is concatenated, and the probability of the gesture category corresponding to the time-series input sequence is output through linear transformation and softmax function.

[0177] After the temporal input sequence is input into the LSTM-MSA model, it is sequentially fed into the input attention layer, the LSTM layer, and the output attention layer. The input attention layer first weights the contribution of each channel in the fused temporal input sequence to highlight high-quality channels and local significant fluctuations. Then, the LSTM layer performs long-term dependency encoding on the temporal input sequence, outputting a hidden state sequence. The output attention layer then generates key moment weights based on the hidden state sequence, obtaining a globally temporally weighted representation. Finally, the local representation and the globally temporally weighted representation are input into the classification head of the fully connected classification layer, outputting the probability distribution of multiple gesture categories. In some embodiments, the output includes the probability distribution of at least 12 gesture categories.

[0178] In some embodiments, the deep learning model is an LSTM-MSA model, and the model training uses a cross-entropy loss function and the Adam optimizer. The training parameters include:

[0179] The learning rate for the Adam optimizer is set to 0.001.

[0180] The dropout rate is set to 0.5, and the batch size is 32.

[0181] Five-fold cross-validation was used during training.

[0182] Each training iteration consists of 20 epochs, and the accuracy, F1 score, and loss variation on the validation set are recorded.

[0183] In some embodiments, the training parameters further include:

[0184] The ratio of training set sample size (number of EMG signal samples) to test set sample size is 9:1.

[0185] During training, the model automatically learns features, and the weights of the input and output attention layers can be dynamically updated during training. In some embodiments, the validation set includes a first gesture validation set, a second gesture validation set, and a NinaPro DB5 validation set.

[0186] The first gesture verification set is the basic gesture verification set, which includes Y2 electromyographic signal samples selected from the first sample set;

[0187] The second gesture verification set is a digital gesture verification set, which includes V2 electromyographic signal samples selected from the second sample set;

[0188] The NinaPro DB5 validation set is a public dataset used to validate the generalization ability of gesture recognition models on public standard data.

[0189] The F1 score is the harmonic mean of precision and recall, used to comprehensively evaluate the performance of a classification model. Its value ranges from 0 to 1, with a better value being closer to 1.

[0190] In some embodiments, the deep learning model is an LSTM-MSA model.

[0191] In each recognition during model training, multiple recognition probabilities for different gesture categories corresponding to each temporal input sequence are obtained;

[0192] Compare each recognition probability with a predetermined threshold; the predetermined threshold is 0.60.

[0193] If the highest recognition probability among multiple recognition probabilities is greater than or equal to a predetermined threshold, then the gesture category with the highest recognition probability is determined as the gesture category corresponding to the time-series input sequence, which is also the gesture category corresponding to the original electromyographic signal sample. For example, if the recognition probability of the grasping gesture is 0.91, the recognition probability of the release gesture is 0.03, the recognition probability of the number 0 gesture is 0.02, and the total recognition probability of other gesture categories is 0.04, then the recognition result of the time-series input sequence is determined as the grasping gesture.

[0194] If the highest recognition probability among multiple recognition probabilities is less than a predetermined threshold, an undetermined and pending time-series fusion sequence can be output.

[0195] In some embodiments, step S100 further includes step S180.

[0196] Step S180: New users undergo small-sample adaptation training to obtain the adapted recognition model.

[0197] The adapted recognition model is used as the gesture recognition model.

[0198] Select new users who did not participate in the pre-training steps S110~170. For these new users, collect 100 labeled electromyographic signal samples, freeze the input attention layer, LSTM layer, and output attention layer, and only fine-tune the classification head of the fully connected classification layer. Continue training for 10 rounds.

[0199] This step does not change the backbone network's general representation of electromyographic timing; it only adjusts the classification boundaries corresponding to the individual exertion habits of new users. Therefore, it is suitable to be completed quickly before terminal deployment.

[0200] In new user scenarios, the input attention layer, LSTM layer, and output attention layer are frozen, and only the personalized multilayer perceptron classifier attached to the classification head is fine-tuned with a few samples, thereby achieving individual adaptation at a lower cost. By freezing the backbone network and fine-tuning the personalized classification head, new user adaptation can be completed with approximately 100 samples, significantly reducing the cost of retraining.

[0201] Gesture recognition device

[0202] like Figure 2 As shown, in a second aspect, embodiments of this application provide a gesture recognition device 1 for implementing the gesture recognition method described in the first aspect embodiment. The gesture recognition device 1 includes:

[0203] The electromyography signal acquisition module 20 is used to acquire the electromyography signal to be tested corresponding to the user's gesture to be recognized.

[0204] The first signal segment sequence acquisition module 30 is used to perform a first segmentation on the electromyography signal to be tested and acquire K corresponding first signal segment sequences.

[0205] The short-time feature acquisition module 40 is used to perform a second segmentation on each first signal segment sequence, acquire J second signal segment sequences corresponding to each first signal segment sequence, and extract short-time features of all channels of each second signal segment sequence;

[0206] The membership vector acquisition module 50 is used to perform fuzzing processing on each of the short-time features to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each of the first signal segment sequences.

[0207] The time-series fusion sequence acquisition module 60 is used to fuse each of the first signal segment sequences with all corresponding membership vectors according to the sampling time order to form a corresponding time-series fusion sequence;

[0208] The timing input sequence acquisition module 70 is used to splice all the timing fusion sequences with the electromyography signal to be tested in the order of sampling time to form a timing input sequence;

[0209] The recognition module 80 is used to input the time-series input sequence into the gesture recognition model to obtain the corresponding gesture recognition result.

[0210] In some embodiments, the gesture recognition device 1 further includes:

[0211] The gesture recognition model acquisition module 10 is used to acquire the gesture recognition model.

[0212] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device including one or more servers, data centers, etc., that can be integrated with the medium. The computer-readable storage medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0213] Therefore, this application embodiment also provides a computer-readable storage medium storing a computer instruction program, which, when executed by a processor, is used to implement the steps of the gesture recognition method described in the first aspect embodiment.

[0214] This application also provides an electronic device, including: a memory, a processor, and a computer instruction program stored in the memory and executable on the processor, wherein the computer instruction program, when executed by the processor, implements the steps of the gesture recognition method described in the first aspect embodiment.

[0215] The above detailed embodiments have described the present invention in detail, but these are not intended to limit the invention. The scope of protection of the present invention is not limited to the above embodiments; any equivalent modifications or variations made by those skilled in the art based on the disclosure of the present invention should be included within the scope of protection set forth in the claims.

Claims

1. A gesture recognition method, characterized in that, include: Acquire the electromyographic signal to be measured corresponding to the user's gesture to be recognized; The electromyographic signal to be tested is first segmented to obtain K corresponding first signal segment sequences; Perform a second segmentation on each of the first signal segment sequences to obtain J second signal segment sequences corresponding to each of the first signal segment sequences, and extract the short-time features of each of the second signal segment sequences; Each short-time feature is fuzzed to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each first signal segment sequence. According to the sampling time order, each first signal segment sequence is fused with all corresponding membership vectors to form a corresponding time-series fusion sequence; According to the sampling time sequence, all the time-series fusion sequences are spliced ​​with the electromyography signal to be tested to form a time-series input sequence; The time-series input sequence is input into the gesture recognition model to obtain the gesture recognition result corresponding to the gesture to be recognized.

2. The gesture recognition method according to claim 1, characterized in that, The first segmentation of the electromyographic signal to be tested to obtain K corresponding first signal segment sequences includes: The electromyographic signal to be measured is preprocessed to obtain the processed signal; The processed signal is first segmented to obtain K corresponding first signal segment sequences.

3. The gesture recognition method according to claim 2, characterized in that, The preprocessing includes at least one of resting baseline subtraction, power frequency notch filtering, abnormal spike clipping, and normalization.

4. The gesture recognition method according to claim 1, characterized in that, The short-time characteristics include at least one of RMS amplitude, mean absolute rate of change, frequency domain energy, coefficient of variation, and autocorrelation mode.

5. The gesture recognition method according to claim 1, characterized in that, The step of fuzzing each of the short-term features to obtain the corresponding membership vector includes: Input short-term features into the fuzzy inference model, determine the degree of membership of each feature in the short-term features, and obtain the set of feature membership degrees of all features of the short-term features. The feature membership degree in the feature membership degree set is selected from any one of low, medium and high. Based on the feature membership degree set and rule base of all short-term features of the second signal segment sequence, the proximity relationship between the second signal segment sequence and each inferred state in the output state set is inferred. The inferred state that is closest to the actual gesture state corresponding to the second signal segment sequence is determined, and then the corresponding 6-dimensional membership vector is obtained by defuzzification. The output state set includes rest state, continuous contraction state, rapid movement state, grasping state, release state and undetermined state.

6. The gesture recognition method according to claim 5, characterized in that, The rule base includes at least one of the following: rule 1, rule 2, rule 3, rule 4, rule 5, and rule 6. The first rule is that if the reasoning state of the second signal segment sequence is a fast motion state, then output a 6-dimensional membership vector representing how close the second signal segment sequence is to a fast motion state. The second rule is that if the reasoning state of the second signal segment sequence is the grasping state, then output a 6-dimensional membership vector representing how close the second signal segment sequence is to the grasping state. The third rule is that if the reasoning state of the second signal segment sequence is a continuously shrinking state, then output a 6-dimensional membership vector that represents the second signal segment sequence being closer to a continuously shrinking state. The fourth rule is that if the reasoning state of the second signal segment sequence is the release state, then output a 6-dimensional membership vector representing how close the second signal segment sequence is to the release state. The fifth rule is that if the reasoning state of the second signal segment sequence is the resting state, then output a 6-dimensional membership vector representing how close the second signal segment sequence is to the resting state; The sixth rule is that if the reasoning state of the second signal segment sequence is an undetermined state, then output a 6-dimensional membership vector representing the second signal segment sequence as being closer to the undetermined state.

7. The gesture recognition method according to claim 1, characterized in that, The gesture recognition model is a model formed after training a deep learning model, which is selected from any one of the two-stage attention LSTM recognition model, GRU model, and Transformer model.

8. A gesture recognition device, characterized in that, include: The electromyography (EMG) signal acquisition module is used to acquire the EMG signal to be tested corresponding to the user's gesture to be recognized; The first signal segment sequence acquisition module is used to perform a first segmentation on the electromyography signal to be tested and acquire K corresponding first signal segment sequences. The short-time feature acquisition module is used to perform a second segmentation on each of the first signal segment sequences, acquire J second signal segment sequences corresponding to each of the first signal segment sequences, and extract short-time features from each of the second signal segment sequences; The membership vector acquisition module is used to perform fuzzing processing on each of the short-time features to obtain the corresponding membership vector, thereby obtaining all membership vectors corresponding to each of the first signal segment sequences. The time-series fusion sequence acquisition module is used to fuse each of the first signal segment sequences with all corresponding membership vectors according to the sampling time order to form a corresponding time-series fusion sequence. The timing input sequence acquisition module is used to splice all the timing fusion sequences with the electromyography signal to be tested in the order of sampling time to form a timing input sequence; The recognition module is used to input the time-series input sequence into the gesture recognition model to obtain the corresponding gesture recognition result.

9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory, wherein the computer program, when executed by the processor, implements the gesture recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the gesture recognition method according to any one of claims 1 to 7.