Low training burden electromyography pattern recognition method and system based on pulse neural network

By employing a low-training-burden electromyography (EMG) pattern recognition method based on spiking neural networks, and utilizing a high-density EMG electrode array and adaptive time-contrast coding, combined with joint decision-making based on voltage, current, and pulse, the problem of heavy training burden and sample dependence in EMG pattern recognition is solved, achieving high-precision gesture recognition.

CN116138794BActive Publication Date: 2026-05-29UNIV OF SCI & TECH OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF SCI & TECH OF CHINA
Filing Date
2023-01-19
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies for electromyography pattern recognition suffer from heavy training burden and sample dependence, making it difficult to achieve high-precision gesture recognition, especially with a small number of samples.

Method used

A low-training-burden electromyographic pattern recognition method based on spiking neural networks is adopted. Signals are collected through a high-density electromyographic electrode array, and an electromyographic pulse sample set is constructed by combining adaptive time-contrast coding and spatial activation information coding. The spiking neural network is trained using a joint decision based on voltage, current and pulse, and an alternative gradient algorithm is used for training.

Benefits of technology

With a small number of samples, the accuracy of gesture recognition was improved, the training burden was alleviated, the overfitting problem was reduced, and high-precision electromyography pattern recognition was achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116138794B_ABST
    Figure CN116138794B_ABST
Patent Text Reader

Abstract

The application relates to a low-training-burden electromyogram pattern recognition method and system based on a pulse neural network, which comprises the following steps: S1, collecting surface electromyogram signals by using a high-density electromyogram electrode array; S2, extracting features after pre-processing the electromyogram signals to obtain electromyogram real-value samples, adding pulses obtained by using adaptive time comparison coding in the time dimension to pulses obtained by using coding based on spatial activation information in the space dimension, and constructing an electromyogram pulse sample set; and S3, inputting the electromyogram pulse sample set into a pulse neural network, jointly deciding based on voltage, current and pulses, training the pulse neural network by using a training algorithm based on alternative gradients, and outputting a predicted gesture category. The method provided by the application can recognize gestures under the constraint of fewer gesture samples, and can effectively relieve the dependence of a classifier on samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biological signal processing, specifically to a method and system for low-training-burden electromyographic pattern recognition based on spiking neural networks. Background Technology

[0002] Surface electromyography (SEMG) signals are bioelectrical signals generated during neuromuscular activity. Closely related to muscle activity, they are a common medium for detecting motor intentions. Due to their non-invasive nature, they have been widely applied in electromyographic control fields such as gesture recognition. The decisive factor in the performance of electromyographic control is the performance of the electromyographic pattern recognition algorithm. This algorithm trains a classifier to identify various muscle movement patterns and achieves control over multiple degrees of freedom, thus affecting the action classification rate. Because SEMG signals are non-stationary physiological signals, they often lead to significant differences between individuals. Therefore, currently, it is usually necessary to train a specific classifier for each individual user.

[0003] In recent years, research on electromyography (EMG) pattern recognition algorithms has received widespread attention. Specifically, it falls into two main categories: research based on traditional machine learning algorithms and research based on deep learning algorithms. EMG pattern recognition based on traditional machine learning algorithms often requires multiple data collections from users and feature selection and extraction for classifier calibration, which imposes a certain training burden on users. Leveraging the generalization capabilities of deep learning algorithms, EMG pattern recognition based on deep learning algorithms uses convolutional neural networks (CNNs) and long short-term memory networks (LSTMs) as gesture recognition networks. It can significantly outperform traditional machine learning methods in terms of recognition rate, but usually requires a large number of gesture samples for training. Collecting a large number of training samples leads to a severe training burden, and when the number of samples is insufficient, the model often suffers from overfitting, making it difficult to decode changes in gesture movements from EMG signals.

[0004] With the rapid development of artificial intelligence, spiking neural networks (SNNs) based on neuromorphic computing have attracted widespread attention from researchers both domestically and internationally. Unlike traditional neural networks, SNNs possess biologically interpretable neuronal models and information representation and processing based on temporal pulse events, giving them advantages in processing temporal physiological signals. Existing research has verified the feasibility of electromyography (EMG) pattern recognition based on SNNs, and also demonstrated the advantages of SNNs in image recognition training with limited samples. However, few studies have focused on solving the problem of EMG pattern recognition based on SNNs under limited sample constraints. Therefore, there is an urgent need for an EMG pattern recognition method that can reduce the training burden under limited sample constraints. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and system for low-training-burden electromyography pattern recognition based on spiking neural networks.

[0006] The technical solution of this invention is: a low-training-burden electromyography pattern recognition method based on spiking neural networks, comprising:

[0007] Step S1: Acquire surface electromyography (EMG) signals of different hand gestures from a specified hand gesture set using a high-density EMG electrode array;

[0008] Step S2: After preprocessing the electromyographic signal, feature extraction is performed to obtain electromyographic real value samples. The pulses obtained by using adaptive time contrast coding on the time dimension of the electromyographic real value samples are added to the pulses obtained by using spatial activation information-based coding on the spatial dimension to construct an electromyographic pulse sample set.

[0009] Step S3: Input the electromyographic pulse sample set into the spiking neural network, and make joint decisions based on voltage, current and pulse. Train the spiking neural network using a training algorithm based on alternative gradients, and output the predicted gesture category; wherein, the spiking neural network includes: an L-layer fully connected block and a current-voltage leakage integrated firing spiking neuron module.

[0010] Compared with the prior art, the present invention has the following advantages:

[0011] 1. This invention discloses a low-training-burden electromyography (EMG) pattern recognition method based on a spiking neural network. It uses EMG pulse coding to extract the spatiotemporal features of high-density EMG signals, and adds the temporal pulse sequence obtained by adaptive time-contrast coding to track the temporal changes of the signal to the spatial pulse sequence obtained by spatial activation information coding. This amplifies the spatiotemporal information changes between different gestures, weakens the redundant features of high-density EMG, and can effectively prevent the overfitting problem caused by training high-density EMG real-value signals under traditional deep neural networks.

[0012] 2. This invention uses a current-voltage leakage integrated firing spiking neuron model with higher biological interpretability, which increases the spiking information processing capability of the spiking neurons. In the decision-making process, joint decision-making based on voltage, current and pulse can be used to make full use of the characteristics of spiking neural networks to improve accuracy.

[0013] 3. This invention uses a training algorithm based on alternative gradients to enable the spiking neural network to quickly capture the spatiotemporal dynamic features of training gestures during backpropagation. Therefore, under the constraint of a small number of gesture samples, it can quickly capture and learn the spatiotemporal dynamic change features of gestures, effectively alleviate sample dependence and improve the accuracy of gesture recognition, and achieve high-precision gesture recognition under the constraint of small samples. Attached Figure Description

[0014] Figure 1 This is a flowchart of a low-training-burden electromyography pattern recognition method based on a spiking neural network according to an embodiment of the present invention.

[0015] Figure 2 This is a schematic diagram of a high-density electromyography electrode array in an embodiment of the present invention;

[0016] Figure 3 This is a schematic diagram illustrating the electromyography pulse encoding principle in an embodiment of the present invention;

[0017] Figure 4 This is a schematic diagram of the spiking neural network structure in an embodiment of the present invention;

[0018] Figure 5 This is a comparison chart of the recognition accuracy and standard deviation of the spiking neural network, CNN, and LSTM in an embodiment of the present invention;

[0019] Figure 6 This is a structural block diagram of a low-training-burden electromyography pattern recognition system based on a spiking neural network, according to an embodiment of the present invention. Detailed Implementation

[0020] This invention provides a low-training-burden electromyography pattern recognition method based on spiking neural networks, which can recognize gestures under the constraint of a small number of gesture samples, and can effectively alleviate the classifier's dependence on samples.

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below through specific implementations and in conjunction with the accompanying drawings.

[0022] Example 1

[0023] like Figure 1 As shown in the figure, an embodiment of the present invention provides a low-training-burden electromyography pattern recognition method based on a spiking neural network, comprising the following steps:

[0024] Step S1: Acquire surface electromyography (EMG) signals of different hand gestures from a specified hand gesture set using a high-density EMG electrode array;

[0025] Step S2: After preprocessing the electromyographic signal, feature extraction is performed to obtain electromyographic real value samples. The pulses obtained by using adaptive time contrast coding on the time dimension of the electromyographic real value samples are added to the pulses obtained by using spatial activation information-based coding on the spatial dimension to construct an electromyographic pulse sample set.

[0026] Step S3: Input the electromyographic pulse sample set into the spiking neural network, and make joint decisions based on voltage, current and pulse. Train the spiking neural network using a training algorithm based on alternative gradients, and output the predicted gesture category. The spiking neural network includes: an L-layer fully connected block and a current-voltage leakage integrated firing spiking neuron module.

[0027] In one embodiment, the high-density electromyographic electrode array in step S1 above specifically includes:

[0028] The high-density electromyography electrode array consists of two sets of flexible electrode arrays, each set of flexible electrode arrays is composed of two identical flexible electrode sub-arrays; the number of row channels p of the two sets of flexible electrode sub-arrays are p1 and p2, the number of column channels q are q1 and q2, and the electrode density, that is, the distance between adjacent row and column channels of each set of flexible electrode arrays, is d1 and d2, respectively.

[0029] like Figure 2 As shown, the high-density electromyography (EMG) electrode array consists of two sets of flexible electrode arrays, each set of which comprises two identical flexible electrode sub-arrays. The number of row channels p in each set of flexible electrode sub-arrays are p1 and p2, the number of column channels q are q1 and q2, and the electrode density is d1 and d2 (the spacing between adjacent row and column channels in each set of electrode arrays). The parameters used in this embodiment are set as follows: p1 = 8, p2 = 4, q1 = 6, q2 = 4, d1 = 14 mm, d2 = 18 mm. During data acquisition, the electrode arrays are placed on the surface of muscles that may be activated by hand gestures. Forearm extensor muscles, forearm flexor muscles, biceps brachii, and triceps brachii can be selected as test muscles. Array one (e.g., a p1*q1 electrode array) is placed on the inner and back sides of the forearm to capture activation information of the forearm muscles; array two (e.g., a p2*q2 electrode array) is placed on the inner and back sides of the posterior arm to capture activation information of the biceps brachii and triceps brachii.

[0030] To prevent randomness, data was collected from a number of subjects. In this embodiment, 8 subjects (6 males, 2 females, aged 24-35) were included, and G types of hand gestures covering common wrist and finger joints were collected. In this embodiment, G=30. The subjects performed the hand gestures in three phases: the first phase (T1) involved raising the elbow of the arm from the table in preparation for the gesture; the second phase (T2) involved completing the gesture and maintaining its shape and intensity; and the final phase (T3) involved the muscles relaxing and the elbow returning to the table at a free speed. Each hand gesture was recorded N times. In this embodiment, N=8. A certain time interval was maintained between different hand gestures to prevent muscle fatigue.

[0031] In one embodiment, step S2 above: after preprocessing the electromyographic signal, feature extraction is performed to obtain electromyographic real-value samples, and the pulses obtained by adaptive time-contrast encoding in the time dimension of the electromyographic real-value samples are added to the pulses obtained by encoding based on spatial activation information in the spatial dimension to construct an electromyographic pulse sample set, specifically including:

[0032] Step S21: After segmenting, filtering, and normalizing the electromyographic signal, the active segment is further segmented into samples. The specific steps for segmenting the active segment are as follows:

[0033] First, a sliding window with a length W1 and an increment L1 is used to divide the active segment of the electromyographic signal, resulting in M1 windows; then, features are extracted from the time dimension of each window to obtain a new active segment of length M1.

[0034] Secondly, a sliding window with a window length of W2 and an increment of L2 is used for the new activity segment to obtain M2 real electromyography samples with a size of window length W2 * number of channels C = 2 * p1 * q1 + 2 * p2 * q2.

[0035] In this step, the raw electromyographic (EMG) signals acquired in step S1 are segmented into activity segments to obtain EMG activity segments containing corresponding gesture activation information. This embodiment uses threshold-based activity segmentation; when the signal amplitude rises or falls to approximately 10% of its peak value, the corresponding time point is considered the start or end of the activation activity data segment, respectively. The segmented activity segments roughly correspond to the aforementioned T2 steady-state phase, during which the subject maintains a steady-state gesture while sampling. This embodiment uniformly truncates the activity segments to 2 seconds, with a sampling rate of 1000 Hz, thus each activity segment has 2000 data points. A bandpass filter is used to eliminate low-frequency baseline drift in each activity segment. This embodiment uses a 20-500 Hz, 50th-order finite impulse response bandpass filter for filtering. Then, a 0-1 normalization method is used to normalize each channel to eliminate distribution differences between data points.

[0036] This invention uses a sliding window to segment the aforementioned activity segments and extract features to obtain real-valued electromyography (EMG) samples. In this embodiment, a sliding window with a window length of W1 and an increment of L1 is used to divide the activity segments of the EMG signal into M1 windows. Features are extracted from the time dimension of each window to obtain more stable data information; the embodiment uses the mean feature. Each activity segment, after feature extraction, yields a new activity segment of M1 * number of channels C (C = 2 * p1 * q1 + 2 * p2 * q2). Then, a sliding window with a window length of W2 and an increment of L2 is used on the new activity segment to obtain M2 real-valued EMG samples X(t, i) (t ∈ 1....W2, i ∈ 1....C) of size W2 * number of channels C.

[0037] Step S22: Apply adaptive temporal contrast encoding to the real-valued EMG samples in the time dimension: For each channel of the real-valued EMG samples, record the signal changes at adjacent time points, and compare the absolute value of the signal changes with a threshold V. thr1 Compared to determining whether to issue a pulse, the absolute value of the signal change must be greater than the threshold V. thr1 A pulse is represented by 1 if it is emitted, and 0 otherwise; threshold V thr1 It adapts to changes in the signal and its value is the mean of the signal change plus the preset coding parameter factor a multiplied by the standard deviation of the signal change;

[0038] like Figure 3 As shown, in this embodiment of the invention, when using adaptive time-contrast encoding to encode a time-series signal X(t, _), firstly, diff1(t) is used to record the signal changes of each channel at adjacent time points in the time dimension, and then the absolute value of the signal change is compared with a threshold V. thr1 Compared to determining whether a pulse is emitted, S1(t, _) is obtained, and the absolute value of the signal change is greater than the threshold V. thr1 A pulse is represented by 1 if it is emitted, and 0 otherwise; where the threshold V thr1 It adapts to the signal and is equal to the mean of the signal change plus the coding parameter factor a multiplied by the standard deviation of the signal change. The coding parameter factor a is an adjustable parameter that affects the pulse delivery.

[0039] Step S23: Encode the real-valued EMG samples spatially using spatial activation information: For each moment of the high-density EMG electrode array, record the difference between each electrode channel and its adjacent electrode channels. The difference is calculated by the difference between the activation value of the channel and the mean activation value of all adjacent channels. The adjacent channels are the remaining channels covered by a k*k rectangle centered on the channel, where k is an odd number. Then, the absolute value of the difference is compared with a threshold V. thr2 Compared to determining whether to fire a pulse, the absolute value of the difference in change is greater than the threshold V. thr2 A pulse is represented by 1 if it is emitted, and 0 otherwise; where the threshold V thr2 It adapts to changes in differences, and its value is the mean of the differences plus a preset parameter factor b multiplied by the standard deviation of the differences.

[0040] like Figure 3 As shown, in this embodiment of the invention, when using pulse code encoding based on spatial activation information to encode the spatial signal X(_, i), firstly, diff2(i) is used on the electrode sheet (row channels p * column channels q) to record the difference between electrode channel i and adjacent electrode channels at each moment. The difference is calculated from the difference between the activation value of the channel and the average activation value of all adjacent channels. Figure 3In this context, M represents the number of adjacent electrode channels of electrode channel i, typically the number of channels excluding i within a k*k (k is an odd number, k = 3 in this embodiment) rectangle centered on electrode channel i. Edge channels only consider the effective portion covered by the k*k rectangle. Then, the absolute value of the difference change is compared with the threshold V. thr2 Compared to determining whether a pulse is fired, the absolute value of the difference in S2(_, i) is greater than the threshold V. thr2 A pulse is represented by 1 if it is emitted, and 0 otherwise; where the threshold V thr2 It adapts to changes in difference, equal to the mean of the difference plus the parameter factor b multiplied by the standard deviation of the difference. The encoding parameter factor b is an adjustable parameter that affects the pulse delivery.

[0041] Step S24: Add the pulses obtained after encoding in steps S22 and S23 to obtain the electromyographic pulse sample set.

[0042] After encoding in steps S22 and S23, the two pulse samples of the same size obtained from the electromyography real value samples of W2*C are added together to obtain the final electromyography pulse sample S(t, i) (t∈1....T, i∈1....C). The time step T of the pulse sample is equal to W2. Each electromyography pulse sample is labeled according to its corresponding action category to obtain the electromyography pulse sample set.

[0043] In one embodiment, step S3 above involves inputting an electromyographic pulse sample set into a spiking neural network, making joint decisions based on voltage, current, and pulse, training the spiking neural network using a training algorithm based on alternative gradients, and outputting the predicted gesture category. The spiking neural network includes: an L-layer fully connected block and a current-voltage leakage-integrated firing spiking neuron module, specifically including:

[0044] Step S31: The spiking neural network (SNN) consists of sequentially connected L-layer modules, each of which includes a fully connected block and a current-voltage leakage-integration firing spiking neuron module. The samples in the electromyographic pulse sample set are input into the spiking neural network in sequence according to time steps. The spiking neural network extracts the pulse event features of the electromyographic channel at each time step and iteratively updates the membrane voltage and current of the spiking neuron until all time steps are completed. The fully connected block consists of a fully connected layer and a batch normalization layer. The current-voltage leakage-integration firing spiking neuron module LIF-IU outputs a discrete binary pulse sequence by introducing the accumulation, decay, firing and reset of membrane voltage in the time dimension, as shown in formulas (1) to (2).

[0045] I l (t)=μI l (t-1)+WS l-1 (t) (1)

[0046] U l (t)=τU l (t-1)+RI l (t) (2)

[0047] Among them, I k (t) represents the current at time step t in layer l. l (t) represents the membrane voltage of layer l at time step t, S l-1 (t) represents the output pulse of the previous layer l-1 at time step t, μ and τ refer to the synaptic current decay factor and the membrane voltage time constant decay factor, respectively; W is the weighted connection matrix, and R is the resistance;

[0048] The fully connected block in this embodiment of the invention consists of a fully connected layer and a batch normalized layer for accelerating network convergence. Unlike the real-valued output of traditional neurons, the spiking neuron in this embodiment outputs a discrete binary pulse sequence by introducing the accumulation, decay, firing, and reset of membrane voltage in the time dimension. Furthermore, based on the traditional voltage-based leak-integration-fire (LIF) spiking neuron, membrane current and its decay are introduced to obtain a current-voltage-based leak-integration-fire spiking neuron (LIF-IU). The working process of the LIF-IU neuron is as follows: at time step t, the output pulse S of the previous layer (l-1) is first... l-1 The input current is obtained by multiplying (t) with the weight connection matrix W between the two layers. The input current is then added to the current at time step t-1 of the current layer (l) after decay to obtain the current I at time step t of the current layer. l (t). This current is then integrated into the membrane voltage, which also decays over time, to obtain the membrane voltage U at the current time step. l (t);

[0049] As shown in formulas (3) and (4), when the membrane voltage U l (t) is greater than the given threshold V thr3 At that time, LIF-IU will emit pulse S through the step function h(x). l (t), and then the refractory period of LIF-IU is simulated by subtracting the reset voltage, as shown in formula (5), where p is the reset voltage constant:

[0050] S l (t)=h(U l (t)-V thr3 (3)

[0051]

[0052] U l (t)=U l (t)(1-p) (5)

[0053] After completing the membrane voltage and current update at time step t, the spiking neural network is used to extract the electromyographic pulse event features at time step t+1, and the membrane voltage and current are iteratively updated until all time steps are completed.

[0054] The film voltage U of LIF-IU used in the embodiments of the present invention l (t) is greater than the given threshold V thr3 At that time, LIF-IU will emit pulse S l (t), and then the refractory period of LIF-IU is simulated by subtracting the reset voltage. After completing the voltage and current update at time step t, the electromyographic pulse event features at time step t+1 are extracted using a spiking neural network, and the voltage and current are iteratively updated until all time steps are completed;

[0055] Step S32: Using a joint decision based on voltage, current, and pulse, determine the output current of the last fully connected block and the LIF-IU. L (t), output membrane voltage U L (t) and output pulse S L (t) The mean is taken over time, and the mean is normalized using the softamx function to obtain the weighted sum of the gesture probabilities. The gesture category with the largest sum of weighted probabilities is taken as the predicted category; as shown in formula (6), where T is the total time step of the spiking neural network:

[0056]

[0057] like Figure 4 As shown, this invention example uses a spiking neural network containing two fully connected blocks, i.e., L=2. Therefore, the number of layers l can only be 0, 1, or 2, where S 0 (t) is equal to the encoded electromyographic pulse sample. For example... Figure 4 Input the pulse event S at time step t of the electromyographic pulse sample in batch format. 0 (t), with a size of batch*C (corresponding to the number of channels in a fixed order of several high-density electrode arrays, e.g., 128). The input neuron of the first fully connected block receives pulse events, and the number of output neurons is H (e.g., can be set to 100). The output current I of this layer is obtained using LIF-IU spiking neurons. 1 (t), membrane voltage U 1 (t) and output pulse S 1 (t) equal impulse response. The second fully connected block receives the impulse output S from the previous layer. 1 (t), the number of output neurons is G (G represents the number of categories), and the output current I of this layer is obtained using LIF-IU spiking neurons.2 (t), membrane voltage U 2 (t) and output pulse S 2 (t) and other impulse responses.

[0058] The decision-making process uses a joint decision based on voltage, current, and pulse, considering the output current I of the last fully connected block and the LIF-IU. 2 (t), output membrane voltage U 2 (t) and output pulse S 2 (t) Take the mean over time, and then normalize the mean using the softamx function to obtain the weighted probability sum of the gestures. Find the gesture category with the largest probability sum as the predicted category.

[0059] The cross-entropy loss function between the true label of the gesture category and the predicted gesture category output by the spiking neural network is shown in Equation (7):

[0060]

[0061] in, O represents the true label for the gesture category, and O represents the predicted gesture category.

[0062] Furthermore, this invention employs a backpropagation algorithm based on alternative gradients to train a spiking neural network.

[0063] During backpropagation, the derivative of the cross-entropy loss with respect to the weight W needs to be calculated. Taking U(t) as an example, the derivative can be obtained using the chain rule:

[0064]

[0065] Therefore, it is necessary to calculate the derivative of U(t) with respect to W at each time step. Taking the t-th time step as an example:

[0066]

[0067] because Since it is not differentiable, when calculating the gradient, the derivative of an approximate step function (e.g., equation (10)) can be used instead.

[0068]

[0069] It can be seen that the gradient propagates back through different layers at each time step, enabling the spiking neural network to quickly capture the spatiotemporal dynamic features of the training gestures.

[0070] In the training process of the spiking neural network, the electromyographic pulse sample set of this invention is designed as follows: for each subject, N repetitions of each gesture are randomly selected, and n (1≤n≤7, n∈integer) repetitions are combined to form the training dataset. The remaining Nn repetitions are combined to form the test dataset. Correspondingly, the labels of the electromyographic pulse sample set are processed according to the above data division ratio to obtain the labels of the training dataset and the test dataset.

[0071] For the encoding parameters a and b in step S2 and μ, τ, R, V in step S3 thr3 Both p and are adjustable parameters in the embodiments of the present invention. The embodiments of the present invention use a parameter set with proven superior performance, as shown in Table 1:

[0072] Table 1 Parameter Set

[0073] a b μ τ R <![CDATA[V thr3 ]]> p 0.2 0.2 <![CDATA[e -0.2 ]]> <![CDATA[e -0.1 ]]> 1 2 1.5

[0074] Based on this, this embodiment of the invention trains a spiking neural network using a training dataset and corresponding gesture labels. The specific training steps are as follows: The training data and corresponding labels are fed into the spiking neural network; the number of samples per iteration (batch) and the total number of iterations (epochs) are set; the learning rate and other relevant parameters are adjusted; and a training method based on alternative gradients is used to ensure the training error rate meets a set standard (the specific standard can be set according to requirements). After the network is trained, the test set is input into the network to calculate the test set recognition accuracy.

[0075] To verify the performance of the method provided by this invention, a comparative experiment was conducted using a conventional method and the above-described scheme of this invention. The conventional method uses LSTM and CNN, with the main network consisting of two layers of LSTM / CNN and a fully connected layer added to obtain gesture classification. For LSTM, the input is a batch * window length W2 * channel C of real-valued samples. The input and output neurons of LSTM are consistent with those of a spiking neural network. For CNN, the high-density electromyography (EMG) array is reshaped into an image e*f (e.g., 128-16*8), with W2 considered as W2 features of the image. Therefore, the input is batch * W2 * e*f. The CNN convolution kernel size is 3*3, and the number of filters in the two CNN layers are 32 and 16, respectively. The EMG real-valued samples obtained in step S2 are subjected to the same experimental design as in the above embodiment to obtain the training and test sets. Figure 5The figure shows the average recognition accuracy and standard deviation of the three networks on the test set, with the horizontal axis representing the number of gesture repetitions (n) in the training set. Experimental results show that, compared to the other two networks, the spiking neural network of this invention exhibits a more significant advantage in recognition accuracy with a smaller training sample size. This indicates that the spiking neural network can perform high-precision gesture recognition even with a limited number of gesture samples, effectively alleviating the classifier's dependence on samples and providing a beneficial solution to the problem of heavy user training burden in electromyography-based gesture recognition technology.

[0076] This invention discloses a low-training-burden electromyography (EMG) pattern recognition method based on a spiking neural network. It uses EMG pulse coding to extract the spatiotemporal features of high-density EMG signals. The method adds a temporal pulse sequence obtained by adaptive time-contrast coding to track signal temporal changes to a spatial pulse sequence obtained by spatial activation information coding. This amplifies the spatiotemporal information changes between different gestures and weakens the redundant features of high-density EMG, effectively preventing overfitting problems caused by training high-density EMG real-valued signals under traditional deep neural networks. This invention uses a more biologically interpretable current-voltage leakage-integrated firing spiking neuron model, increasing the pulse information processing capability of the spiking neurons. In the decision-making process, it uses joint decision-making based on voltage, current, and pulse, fully utilizing the characteristics of the spiking neural network to improve accuracy. This invention uses a training algorithm based on alternative gradients to enable the spiking neural network to quickly capture the spatiotemporal dynamic features of training gestures during backpropagation. Therefore, under the constraint of a small number of gesture samples, it can quickly capture and learn the spatiotemporal dynamic change features of gestures, effectively alleviating sample dependence and improving gesture recognition accuracy, achieving high-precision gesture recognition under small sample constraints.

[0077] Example 2

[0078] like Figure 6 As shown, this embodiment of the invention provides a low-training-burden electromyography pattern recognition system based on a spiking neural network, comprising the following modules:

[0079] The surface electromyography signal acquisition module 41 is used to acquire surface electromyography signals of different hand gestures in a specified hand gesture set using a high-density electromyography electrode array.

[0080] The module 42 for constructing an electromyography pulse sample set is used to preprocess the electromyography signal and extract features to obtain electromyography real value samples. The pulses obtained by using adaptive time contrast encoding on the time dimension of the electromyography real value samples are added to the pulses obtained by using spatial activation information-based encoding on the spatial dimension to construct an electromyography pulse sample set.

[0081] The training spiking neural network module 43 is used to input the electromyographic pulse sample set into the spiking neural network and make joint decisions based on voltage, current and pulse. The spiking neural network is trained using a training algorithm based on alternative gradients and outputs the predicted gesture category. The spiking neural network includes: an L-layer fully connected block and a current-voltage leakage integrated firing spiking neuron module.

[0082] The above embodiments are provided merely for the purpose of describing the present invention and are not intended to limit the scope of the invention. The scope of the invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the invention should be covered within the scope of the invention.

Claims

1. A low-training-burden electromyographic pattern recognition method based on spiking neural networks, characterized in that, include: Step S1: Acquire surface electromyography (EMG) signals of different hand gestures from a specified hand gesture set using a high-density EMG electrode array; Step S2: After preprocessing the electromyographic signal, feature extraction is performed to obtain electromyographic real value samples. The pulses obtained by using adaptive time contrast coding on the time dimension of the electromyographic real value samples are added to the pulses obtained by using spatial activation information-based coding on the spatial dimension to construct an electromyographic pulse sample set. Step S3: Input the electromyographic pulse sample set into the spiking neural network, and make joint decisions based on voltage, current, and pulse. Train the spiking neural network using a training algorithm based on alternative gradients, and output the predicted gesture category; wherein, the spiking neural network includes: an L-layer fully connected block and a current-voltage leakage integrated firing spiking neuron module, specifically including: Step S31: The spiking neural network consists of sequentially connected L-layer modules, wherein each module includes: a fully connected block and a current-voltage-based leak-integration firing spiking neuron module; the samples in the electromyographic pulse sample set are sequentially input into the spiking neural network according to time steps, and the spiking neural network sequentially extracts the pulse event features of the electromyographic channel at each time step, and iteratively updates the membrane voltage and current of the spiking neuron until all time steps are completed; wherein, the fully connected block consists of a fully connected layer and a batch normalization layer, and the current-voltage-based leak-integration firing spiking neuron module LIF-IU outputs a discrete binary pulse sequence by introducing the accumulation, decay, firing and reset of membrane voltage in the time dimension, as shown in formulas (1)~(2); (1) (2) in, For the present Layer Current at time step For the present Layer Membrane voltage at time step For the previous layer No. The output pulse of the time step, and These refer to the synaptic current decay factor and the membrane voltage time constant decay factor, respectively. For the weighted connection matrix, For resistance; As shown in formulas (3) and (4), when the membrane voltage Greater than a given threshold At that time, LIF-IU will pass through a step function Pulse delivery Then, the refractory period of LIF-IU is simulated by subtracting the reset voltage, as shown in formula (5), where p is the reset voltage constant: = (3) (4) (5) After completing the membrane voltage and current update at time step t, the spiking neural network is used to extract the electromyographic pulse event features at time step t+1, and the membrane voltage and current are iteratively updated until all time steps are completed. Step S32: Using a joint decision based on voltage, current, and pulse, determine the output current of the last fully connected block and the LIF-IU. Output membrane voltage and output pulse The average value over time is taken, and the average value is normalized using the softamx function to obtain the weighted probability sum of the gestures. The gesture category with the largest weighted probability sum is taken as the predicted category; as shown in formula (6), where T is the total time step of the spiking neural network: (6) The cross-entropy loss function between the true label of the gesture category and the predicted gesture category output by the spiking neural network is shown in Equation (7): (7) in, For the true label of the gesture category, The predicted gesture category.

2. The low-training-burden electromyographic pattern recognition method based on spiking neural networks according to claim 1, characterized in that, The high-density electromyographic electrode array mentioned in step S1 specifically includes: The high-density electromyography electrode array consists of two sets of flexible electrode arrays, each set of which consists of two identical flexible electrode sub-arrays. The number of row channels p in the two sets of flexible electrode sub-arrays are p1 and p2, the number of column channels q are q1 and q2, and the electrode density, i.e., the spacing between adjacent row and column channels in each set of flexible electrode arrays, is d1 and d2, respectively.

3. The low-training-burden electromyographic pattern recognition method based on spiking neural networks according to claim 2, characterized in that, Step S2: After preprocessing the electromyographic signal, feature extraction is performed to obtain electromyographic real-value samples. The pulses obtained by adaptive time-contrast encoding in the time dimension of the electromyographic real-value samples are then added to the pulses obtained by encoding based on spatial activation information in the spatial dimension to construct an electromyographic pulse sample set. Specifically, this includes: Step S21: After segmenting, filtering, and normalizing the electromyographic signal, the active segment is then sampled. The specific steps for sample segmentation of the active segment are as follows: First, adopt the window length Increment The sliding window divides the active segment of the electromyographic signal to obtain... 1 window; extract features from the time dimension of each window to obtain a feature of length . New activity segment; Secondly, a window length is adopted for the new active segment. Increment The sliding window, get The size is the window length Total number of channels C = 2 p1 q1+2 p2 Real-valued electromyography samples of q2; Step S22: Apply adaptive temporal contrast encoding to the electromyography (EMG) real-value samples in the time dimension: For each channel of the EMG real-value samples, record the signal changes at adjacent time points, and compare the absolute value of the signal changes with a threshold. Compared to determining whether to issue a pulse, the absolute value of the signal change must be greater than the threshold. A pulse is represented by 1 if it is emitted, and 0 otherwise; the threshold value... It adapts to changes in the signal and its value is the mean of the signal change plus the preset coding parameter factor a multiplied by the standard deviation of the signal change; Step S23: Encode the electromyography (EMG) real-value samples spatially using spatial activation information: For each moment of the high-density EMG electrode array, record the difference between each electrode channel and its adjacent electrode channels. The difference is calculated by the difference between the activation value of the channel and the mean of the activation values ​​of all adjacent channels. The adjacent channels are k centered on the channel. A k-rectangle, where k is an odd number, covers the remaining channels. Then, the absolute value of the difference variation is compared with a threshold. Compared to determining whether to fire a pulse, the absolute value of the difference in change is greater than the threshold. A pulse is represented by 1 if it is emitted, and 0 otherwise; wherein the threshold value is... It adapts to changes in differences, and its value is the mean of the differences plus a preset parameter factor b multiplied by the standard deviation of the differences. Step S24: Add the pulses obtained after encoding in steps S22 and S23 to obtain the electromyographic pulse sample set.

4. A low-training-burden electromyographic pattern recognition system based on a spiking neural network, characterized in that, Includes the following modules: A surface electromyography (EMG) signal acquisition module is used to acquire surface EMG signals of different hand gestures from a specified set of hand gestures using a high-density EMG electrode array. An electromyography (EMG) pulse sample set construction module is used to preprocess the EMG signal and extract features to obtain EMG real-value samples. The pulses obtained by using adaptive time-contrast encoding on the time dimension of the EMG real-value samples are added to the pulses obtained by using spatial activation information-based encoding on the spatial dimension to construct an EMG pulse sample set. A spiking neural network training module is used to input the electromyographic pulse sample set into the spiking neural network, and to make joint decisions based on voltage, current, and pulse. The spiking neural network is trained using a training algorithm based on alternative gradients, and outputs the predicted gesture category. The spiking neural network includes: an L-layer fully connected block and a current-voltage leakage-integrated firing spiking neuron module, specifically including: Step S31: The spiking neural network consists of sequentially connected L-layer modules, wherein each module includes: a fully connected block and a current-voltage-based leak-integration firing spiking neuron module; the samples in the electromyographic pulse sample set are sequentially input into the spiking neural network according to time steps, and the spiking neural network sequentially extracts the pulse event features of the electromyographic channel at each time step, and iteratively updates the membrane voltage and current of the spiking neuron until all time steps are completed; wherein, the fully connected block consists of a fully connected layer and a batch normalization layer, and the current-voltage-based leak-integration firing spiking neuron module LIF-IU outputs a discrete binary pulse sequence by introducing the accumulation, decay, firing and reset of membrane voltage in the time dimension, as shown in formulas (1)~(2); (1) (2) in, For the present Layer Current at time step For the present Layer Membrane voltage at time step For the previous layer No. The output pulse of the time step, and These refer to the synaptic current decay factor and the membrane voltage time constant decay factor, respectively. For the weighted connection matrix, For resistance; As shown in formulas (3) and (4), when the membrane voltage Greater than a given threshold At that time, LIF-IU will pass through a step function Pulse delivery Then, the refractory period of LIF-IU is simulated by subtracting the reset voltage, as shown in formula (5), where p is the reset voltage constant: = (3) (4) (5) After completing the membrane voltage and current update at time step t, the spiking neural network is used to extract the electromyographic pulse event features at time step t+1, and the membrane voltage and current are iteratively updated until all time steps are completed. Step S32: Using a joint decision based on voltage, current, and pulse, determine the output current of the last fully connected block and the LIF-IU. Output membrane voltage and output pulse The average value over time is taken, and the average value is normalized using the softamx function to obtain the weighted probability sum of the gestures. The gesture category with the largest weighted probability sum is taken as the predicted category; as shown in formula (6), where T is the total time step of the spiking neural network: (6) The cross-entropy loss function between the true label of the gesture category and the predicted gesture category output by the spiking neural network is shown in Equation (7): (7) in, For the true label of the gesture category, The predicted gesture category.