Prosthesis control method, device, electronic apparatus, and storage medium

文档序号:1133447 发布日期:2020-10-09 浏览:25次 中文

阅读说明:本技术 假肢控制方法、装置、电子设备和存储介质 (Prosthesis control method, device, electronic apparatus, and storage medium ) 是由 李红红 姚秀军 于 2020-06-30 设计创作,主要内容包括:本申请涉及一种假肢控制方法、装置、电子设备和存储介质,应用于假肢技术领域,其中,方法包括:获取安装假肢的肢体的动作数据,根据动作数据,获得肢体的动作所属的动作类别的预分类概率,若判定预分类概率大于动作类别的预设分类阈值,向假肢发送执行动作类别的动作指令。解决了现有技术中,用于肌电控制的传感器数量较少时,分类不准确,假肢执行错误率高的问题。(The application relates to a method, a device, electronic equipment and a storage medium for controlling a prosthesis, which are applied to the technical field of the prosthesis, wherein the method comprises the following steps: the method comprises the steps of obtaining action data of a limb provided with the artificial limb, obtaining pre-classification probability of an action class to which the action of the limb belongs according to the action data, and sending an action instruction for executing the action class to the artificial limb if the pre-classification probability is judged to be larger than a preset classification threshold value of the action class. The problems that in the prior art, when the number of sensors for myoelectric control is small, classification is inaccurate, and the execution error rate of the artificial limb is high are solved.)

1. A prosthesis control method, comprising:

acquiring action data of a limb provided with the artificial limb;

obtaining a pre-classification probability of an action category to which the action of the limb belongs according to the action data;

and if the pre-classification probability is judged to be larger than a preset classification threshold value of the action type, sending an action instruction for executing the action type to the artificial limb.

2. A prosthetic control method according to claim 1, wherein the obtaining a pre-classification probability of an action category to which the action of the limb belongs from the action data comprises:

preprocessing the motion data, and inputting the preprocessed motion data into a pre-trained classifier;

and obtaining the classification probability of the limb action belonging to each action category, which is calculated by the classifier according to the preprocessed action data, and taking the maximum value in the classification probability as the pre-classification probability.

3. A prosthetic control method according to claim 2, wherein the training process of the classifier includes:

acquiring first verification sample data, wherein the first verification sample data comprises H first simulation action characteristic parameters and first action label information of each first simulation action characteristic parameter, and H is an integer greater than 1;

adjusting parameters of the original regular discriminant analysis classifier based on a preset value range according to a linear search algorithm;

inputting the adjusted original canonical discriminant analysis classifier of the H-th first verification sample data to classify the first verification sample data to obtain a classification result of the H-th first verification sample data, wherein H is 1,2 or 3 … … H;

repeatedly executing the step of adjusting the parameters of the original regular discriminant analysis classifier according to the linear search algorithm until the linear search algorithm finishes dereferencing the parameters in a preset dereferencing range;

calculating cross entropy loss according to the classification result of the first verification sample data and the first action label information;

taking the parameters of the original canonical discriminant analysis classifier with the minimum cross entropy loss as optimal parameters;

acquiring training sample data, wherein the training sample data comprises N second simulation action characteristic parameters and second action label information of each second simulation action characteristic parameter, and N is an integer greater than 1;

inputting the training sample data and the first verification sample data into the original canonical discriminant analysis classifier adopting the optimal parameters, calculating the accuracy of the classification result of the original canonical discriminant analysis classifier based on a ten-fold cross verification method, and taking the original canonical discriminant analysis classifier as the classifier if the accuracy is greater than a preset accuracy.

4. A prosthetic control method according to claim 2, wherein prior to determining that the pre-classification probability is greater than a preset classification threshold for the action class, further comprising:

acquiring second verification sample data, wherein the verification sample data comprises M third simulation action characteristic parameters and third action label information of each third simulation action characteristic parameter, and M is an integer greater than 1;

respectively inputting the M third simulation action characteristic parameters into the classifier to obtain the classification probability of each of the M third simulation action characteristic parameters belonging to each action category;

and obtaining the preset classification threshold value of each action category according to the third action label information and the classification probability of each of the M third simulation action characteristic parameters.

5. A prosthetic control method according to claim 4, wherein the deriving the preset classification threshold for each of the motion classes according to the third motion label information and the classification probabilities for each of the M third simulated motion feature parameters includes:

calculating the true positive rate and the false positive rate of the M third simulated motion characteristic parameters under each classification probability according to the third motion label information and the classification probability of the M third simulated motion characteristic parameters;

constructing an ROC curve according to the true positive rate and the false positive rate;

and acquiring a coordinate point in the ROC curve, wherein the false positive rate is less than or equal to a preset cut-off threshold value, and the true positive rate is the maximum, and taking the classification probability corresponding to the coordinate point as the preset classification threshold value.

6. A prosthetic control method according to claim 2, wherein the pre-processing the motion data and inputting the pre-processed motion data into a pre-trained classifier comprises:

filtering the motion data to remove interference in the motion data;

performing feature extraction on the filtered motion data to obtain feature parameters of the motion of the limb;

inputting the feature parameters into the classifier.

7. A prosthetic control method according to claim 6, wherein the performing feature extraction on the filtered motion data to obtain feature parameters of the limb motion comprises:

performing feature extraction on the filtered motion data based on a sliding window method to obtain feature parameters of the limb motion, wherein the feature parameters include: myoelectric characteristic parameters and inertial measurement characteristic parameters.

8. A prosthetic control device, comprising:

the acquisition module is used for acquiring action data of a limb provided with the artificial limb;

the calculation module is used for obtaining the pre-classification probability of the action category to which the action of the limb belongs according to the action data;

and the sending module is used for sending an action instruction for executing the action category to the artificial limb when the pre-classification probability is judged to be greater than the preset classification threshold value of the action category.

9. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;

the memory for storing a computer program;

the processor, for executing the program stored in the memory, implementing the prosthesis control method of any one of claims 1-7.

10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the prosthesis control method according to any one of claims 1 to 7.

Technical Field

The present application relates to the field of prosthetic limb technologies, and in particular, to a prosthetic limb control method, device, electronic device, and storage medium.

Background

The myoelectric prosthesis of the upper limb is an electromechanical device, the purpose of which is to partially restore the function and appearance of the missing limb. They typically include a surface Electromyography (EMG) based muscle activity recording unit, an active end effector, such as a prosthetic hand with an electric finger and wrist rotation unit, and a processing unit that converts the recorded muscle activity information into end effector movement commands.

However, in the related art, a plurality of sensors for electromyographic control are generally required to be arranged on a human body to acquire more electromyographic signals, so that the classification is more accurate. However, more sensors increase the burden on the user; if the number of sensors is greatly reduced, the classification performance is reduced, and accurate classification cannot be performed, for example, when a user does not need to use a prosthesis, a situation that the prosthesis still performs movement according to data of the sensors may occur due to unintentional triggering of the sensors, so that the execution error rate of the prosthesis is high, and the user may feel frustrated due to the unintentional movement of the prosthesis, thereby increasing the risk of rejection of the prosthesis.

Disclosure of Invention

The application provides a prosthetic limb control method, a prosthetic limb control device, electronic equipment and a storage medium, which are used for solving the problems that in the prior art, when the number of sensors for myoelectric control is small, classification is inaccurate and the prosthetic limb execution error rate is high.

In a first aspect, an embodiment of the present application provides a prosthesis control method, including:

acquiring action data of a limb provided with the artificial limb;

obtaining a pre-classification probability of an action category to which the action of the limb belongs according to the action data;

and if the pre-classification probability is judged to be larger than a preset classification threshold value of the action type, sending an action instruction for executing the action type to the artificial limb.

Optionally, obtaining a pre-classification probability of an action category to which the action of the limb belongs according to the action data includes:

preprocessing the motion data, and inputting the preprocessed motion data into a pre-trained classifier;

and obtaining the classification probability of the limb action belonging to each action category, which is calculated by the classifier according to the preprocessed action data, and taking the maximum value in the classification probability as the pre-classification probability.

Optionally, the training process of the classifier includes:

acquiring first verification sample data, wherein the first verification sample data comprises H first simulation action characteristic parameters and first action label information of each first simulation action characteristic parameter, and H is an integer greater than 1;

adjusting parameters of the original regular discriminant analysis classifier according to a linear search algorithm;

inputting the adjusted original canonical discriminant analysis classifier of the H-th first verification sample data to classify the first verification sample data to obtain a classification result of the H-th first verification sample data, wherein H is 1,2 or 3 … … H;

repeatedly executing the step of adjusting the parameters of the original regular discriminant analysis classifier according to the linear search algorithm until the linear search algorithm finishes dereferencing the parameters in a preset dereferencing range;

calculating cross entropy loss according to the classification result of the first verification sample data and the first action label information;

taking the parameters of the original canonical discriminant analysis classifier with the minimum cross entropy loss as optimal parameters;

acquiring training sample data, wherein the training sample data comprises N second simulation action characteristic parameters and second action label information of each second simulation action characteristic parameter, and N is an integer greater than 1;

inputting the training sample data and the first verification sample data into the original canonical discriminant analysis classifier adopting the optimal parameters to train the original canonical discriminant analysis classifier;

and calculating the accuracy of the classification result of the original regular discriminant analysis classifier based on a ten-fold cross verification method, and taking the original regular discriminant analysis classifier as the classifier if the accuracy is greater than a preset accuracy.

Optionally, before determining that the pre-classification probability is greater than the preset classification threshold of the action category, the method further includes:

acquiring second verification sample data, wherein the verification sample data comprises M third simulation action characteristic parameters and third action label information of each third simulation action characteristic parameter, and M is an integer greater than 1;

respectively inputting the M third simulation action characteristic parameters into the classifier to obtain the classification probability of each of the M third simulation action characteristic parameters belonging to each action category;

and obtaining the preset classification threshold value of each action category according to the third action label information and the classification probability of each of the M third simulation action characteristic parameters.

Optionally, the obtaining the preset classification threshold of each action category according to the third action tag information and the classification probability of each of the M third simulated action characteristic parameters includes:

calculating the true positive rate and the false positive rate of the M third simulated motion characteristic parameters under each classification probability according to the third motion label information and the classification probability of the M third simulated motion characteristic parameters;

constructing an ROC curve according to the true positive rate and the false positive rate;

and acquiring a coordinate point in the ROC curve, wherein the false positive rate is less than or equal to a preset cut-off threshold value, and the true positive rate is the maximum, and taking the classification probability corresponding to the coordinate point as the preset classification threshold value.

Optionally, the preprocessing the motion data, and inputting the preprocessed motion data into a pre-trained classifier includes:

filtering the motion data to remove interference in the motion data;

performing feature extraction on the filtered motion data to obtain feature parameters of the motion of the limb;

inputting the feature parameters into the classifier.

Optionally, the performing feature extraction on the filtered motion data to obtain feature parameters of the limb motion includes:

performing feature extraction on the filtered motion data based on a sliding window method to obtain feature parameters of the limb motion, wherein the feature parameters include: myoelectric characteristic parameters and inertial measurement characteristic parameters.

In a second aspect, embodiments of the present application provide a prosthetic control device, comprising:

the acquisition module is used for acquiring action data of a limb provided with the artificial limb;

the calculation module is used for obtaining the pre-classification probability of the action category to which the action of the limb belongs according to the action data;

and the sending module is used for sending an action instruction for executing the action category to the artificial limb when the pre-classification probability is judged to be greater than the preset classification threshold value of the action category.

In a third aspect, an embodiment of the present application provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;

the memory for storing a computer program;

the processor is configured to execute the program stored in the memory to implement the prosthesis control method according to the first aspect.

In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the prosthesis control method according to the first aspect.

Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the application, the action data of the limb provided with the artificial limb is obtained, the pre-classification probability of the action class to which the action of the limb belongs is calculated according to the action data, and the action command for executing the action class is sent to the artificial limb when the pre-classification probability is judged to be greater than the preset classification threshold value of the action class, so that the artificial limb executes the action according to the action command.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.

FIG. 1 is a flow chart of a prosthesis control method according to an embodiment of the present application;

FIG. 2 is a flow chart of a prosthesis control method according to another embodiment of the present application;

FIG. 3 is a flow chart illustrating the pre-processing of motion data in a prosthesis control method according to an embodiment of the present application;

FIG. 4 is a flowchart of training classifiers in a prosthesis control method according to an embodiment of the present application;

fig. 5 is a flowchart illustrating obtaining a preset classification threshold in a prosthesis control method according to an embodiment of the present application;

FIG. 6 is a flowchart illustrating the determination of a predetermined classification threshold in a prosthesis control method according to an embodiment of the present application;

FIG. 7 is a block diagram of a prosthetic control device according to one embodiment of the present application;

fig. 8 is a block diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

The application provides a prosthesis control method in an embodiment, and the method can be applied to any form of electronic equipment, such as a prosthesis or a server of the prosthesis. As shown in fig. 1, the prosthesis control method includes:

step 101, acquiring motion data of a limb provided with a prosthesis.

In some embodiments, the motion data may be obtained by sensors on the limb to which the prosthesis is fitted. After the artificial limb is arranged on the limb of the user, the sensor is placed on the limb, and the sensor can transmit the collected motion data to the artificial limb.

Wherein, the quantity of sensor can be set for according to actual conditions, in this embodiment, for avoiding too much sensor to bring inconvenience for the user, sets up the quantity of sensor to 2. The sensor may be, but is not limited to, an Electromyography (EMG) -Inertial Measurement Unit (IMU) sensor.

And 102, obtaining the pre-classification probability of the action category to which the action of the limb belongs according to the action data.

In some embodiments, the motion data may be input into a pre-trained classifier, and the classifier maps the motion data to each classification category in the classifier to obtain a classification probability that the motion data belongs to each classification category, so as to obtain a pre-classification probability, where the pre-classification probability is a maximum value of probabilities of each classification category in the classifier to which the limb motion belongs; the motion data may also be compared with the motion data of the user at the time of testing to determine a pre-classification probability of the motion class to which the motion of the limb belongs.

And 103, if the pre-classification probability is judged to be larger than the preset classification threshold value of the action type, sending an action instruction for executing the action type to the artificial limb.

In some embodiments, when the pre-classification probability of the motion class to which the motion data belongs is greater than the preset classification threshold of the motion class, a motion instruction for executing the motion class is sent to the prosthesis, and since the pre-classification probability corresponding to the unintentional operation is usually less than the preset classification threshold, the unintentional operation can be basically shielded by the preset classification threshold, and the purpose of preventing the unintentional operation of the prosthesis is achieved.

The preset classification threshold is selected by ROC analysis according to verification sample data, the true positive rate is the largest, and the classification probability when the false positive rate is lower than a cut-off threshold is ensured to be used as the preset classification threshold, so that the false positive rate is minimized, and the classification accuracy is improved. Wherein the verification sample data comprises simulated motion data.

It is understood that the preset classification threshold may also be artificially defined, and the definition criteria are: the preset classification threshold is higher than the pre-classification probability corresponding to the unconscious operation and is lower than the pre-classification probability corresponding to the normal operation.

In the embodiment, the action data of the limb provided with the artificial limb is acquired, the pre-classification probability of the action category to which the action of the limb belongs is calculated according to the action data, and the action instruction for executing the action category is sent to the artificial limb when the pre-classification probability is judged to be greater than the preset classification threshold value of the action category, so that the artificial limb executes the action according to the action instruction.

In another embodiment, the present application provides a prosthesis control method, as shown in fig. 2, including:

step 201, acquiring action data of the limb provided with the artificial limb.

In some embodiments, the motion data may be obtained by sensors on the limb to which the prosthesis is fitted. For example, when the limb is grasped, the sensor can collect the motion data during the grasping process of the limb, so that the prosthesis can acquire the motion data sent by the sensor.

The motion data comprises electromyography data and inertia data, the sensor can be but not limited to an EMG-IMU sensor, and the EMG-IMU sensor can acquire the electromyography of the limb and simultaneously measure the inertia data of the limb.

Specifically, the EMG-IMU sensor includes: EMG sensors and IMU sensors. The EMG sensor can acquire electromyographic data of the limb of the user, namely electromyographic signals when the limb of the user acts; the IMU sensors may measure inertial data of the limb, including acceleration, angular velocity, and direction of motion of the limb.

The IMU sensor comprises a three-axis accelerometer, a gyroscope and a magnetometer, and the three are used for measuring the acceleration, the angular velocity and the direction of the limb respectively.

Furthermore, the connection mode of the sensor and the artificial limb can be wired connection or wireless connection. In order to facilitate the operation of the user and avoid the interference of the cable in the operation process, a wireless connection mode is preferably adopted between the sensor and the artificial limb.

Step 202, preprocessing the motion data, and inputting the preprocessed motion data into a pre-trained classifier.

Since the acquired motion data includes interference data and not all the data in the motion data is useful for classification, the useful data for classification needs to be extracted by preprocessing.

Specifically, the preprocessing of the motion data includes the following steps:

step 301, filtering the motion data to remove interference in the motion data.

In some embodiments, the motion data includes electromagnetic interference and motion interference. In this embodiment, a Hampel filter may be used to suppress electromagnetic interference in the motion data. And a 4-order Butterworth band-pass filter is adopted to filter the motion data with the frequency range of 10 HZ-500 HZ so as to remove the motion interference data in the motion data. It can be understood that after the motion interference data is filtered and removed, the sampling point at the position of the motion interference is vacant, and further, the filtered sampling point is up-sampled by adopting a linear interpolation mode to ensure that the sampling point is not distorted.

And 302, performing feature extraction on the filtered motion data to obtain feature parameters of the motion of the limb.

In some embodiments, a sliding window method may be adopted to perform feature extraction on the filtered motion data to obtain feature parameters of the limb motion. Based on the above-described related embodiment, the motion data includes electromyogram data (also referred to as an electromyogram signal) and inertial data, and the corresponding extracted feature parameters include an electromyogram feature parameter and an inertial measurement feature parameter.

The electromyographic characteristic parameters comprise waveform length, a fourth-order autoregressive coefficient, logarithmic variance and Wilson amplitude.

Specifically, the waveform length WL may be extracted in, but is not limited to, the following manner:

wherein K represents the number of samples in the time window, SnRepresents the electromyographic signal of the nth sample point.

The waveform length is the simple accumulation of the signal length, reflects the complexity of the waveform of the electromyographic signal, and also reflects the combined effect of the amplitude, the frequency, the duration and the like of the electromyographic signal.

The fourth-order Autoregressive (AR) coefficients can be extracted, but are not limited to, in the following manner:

wherein S isnElectromyographic data representing the nth sample point, aiThe i-th order AR coefficient is represented, p represents the order of the autoregressive model, and w (n) represents random white noise.

An Autoregressive model (AR) is a common time series model, and in the above formula, a fourth-order Autoregressive coefficient can be obtained by taking 1,2,3 and 4 in sequence for p and substituting the values into the above formula.

The log variance can be extracted, but is not limited to, in the following way:

Figure BDA0002561912770000093

wherein E represents an intermediate variable, K represents the number of samples in a time window, xnRepresents the nth electromyogram data within a time window, and STD _ LN represents a logarithmic variance.

The Wilison Amplitude (WAMP) can be extracted in, but is not limited to, the following way:

Figure BDA0002561912770000096

wherein K represents the number of samples in the time window, represents a predefined threshold, xiThe amplitude of the EMG signal at the ith sample point in the time window is shown, WAMP shows the calculated Williason amplitude, and f (z) shows a custom formula.

WAMP is a measure of frequency information of the electromyographic signals for counting the number of times the difference between the EMG signal amplitude between two adjacent segments exceeds a predefined threshold and is related to the motor unit point of action (MUAP) and the force of muscle contraction.

Furthermore, when the inertia measurement characteristic parameters are extracted according to the sliding window method, the average value in the processing window can be used as the inertia measurement characteristic parameters, specifically including 9 characteristic parameters of the acceleration, the angular velocity and the magnetic field of the three axes.

Based on the related embodiment, after the filtered motion data is subjected to feature extraction, nine inertial measurement feature parameters including waveform length, Wilson amplitude, logarithmic variance and fourth-order autoregressive coefficient, seven electromyographic feature parameters, three-axis acceleration, angular velocity and magnetic field are obtained.

After the motion data is filtered and the feature is extracted through the related embodiments, the extracted feature parameters can be input into the classifier, so that the motion data is classified according to the feature parameters through the classifier.

Further, the training process of the classifier comprises the following steps:

step 401, obtaining first verification sample data, where the first verification sample data includes H first simulation motion characteristic parameters and first motion tag information of each first simulation motion characteristic parameter, and H is an integer greater than 1.

In some embodiments, the first verification sample data may be collected when the user performs a corresponding action according to the prompted action requirement. Specifically, taking the artificial limb as an example of the prosthetic hand, the actions required to be performed by the user can be displayed on a corresponding computer, such as: the device comprises a gripping part, a transverse gripping part, a three-finger gripping part, a hand opening part and finger actions, and corresponding action data can be acquired by a sensor after a user executes corresponding actions according to prompts.

It is understood that during the execution of the user, the user may rest for a period of time after the execution of an action is completed, so as to better distinguish the last action data from the current action data. In addition, the user can operate at a medium speed during the execution process, so that the inaccuracy of the motion data during the too fast or too slow operation is avoided.

Each action may be, but is not limited to, executed 10 times, the action execution time may be 5 seconds, and the rest time may be 3 seconds.

Further, after the motion collection is completed, the collected motion data is preprocessed through steps 301 to 302 to obtain a first simulation motion characteristic parameter.

And 402, adjusting parameters of the original canonical discriminant analysis classifier based on a preset value range according to a linear search algorithm.

In some embodiments, the raw canonical discriminant analysis (RDA) classifier shares two parameters (gamma and lambda), both of which have values between 0 and 1. To adjust the regularization hyper-parameters, in this embodiment, the values of the two parameters are adjusted step by step using a linear search with a step size of 0.025 in the [0, 1] range. The step value may be set according to actual conditions, and is not limited herein. It will be appreciated that the step value may be set to a smaller value in order to obtain a more accurate result.

Step 403, inputting the H-th first verification sample data into the parameter-adjusted original canonical discriminant analysis classifier to classify the first verification sample data, so as to obtain a classification result of the H-th first verification sample data, where H is 1,2, and 3 … … H.

And step 404, judging whether the linear search algorithm finishes the value taking of the parameters in the preset value taking range, if so, executing step 405, otherwise, executing step 402.

Step 405, calculating cross entropy loss according to the classification result of the first verification sample data and the first action label information, and taking the parameters of the original regular discriminant analysis classifier with the minimum cross entropy loss as optimal parameters.

In some embodiments, after the parameters of the original RDA classifier are adjusted, each first simulated motion feature parameter in the first verification sample data may be input to the original RDA classifier under the parameter to obtain each classification result, and cross entropy loss under the parameter is calculated. And then comparing the cross entropy losses under all the parameters to obtain a cross entropy loss minimum value, and taking the parameter corresponding to the cross entropy loss minimum value as an optimal parameter. By adjusting the hyper-parameters to minimize cross entropy loss, the quality of the parameter configuration of the selected RDA classifier relative to the posterior probability estimation can be guaranteed to be optimal, and the optimal parameter configuration plays an important role in controlling the action of the prosthesis based on the pre-classification probability and the preset classification threshold value in the follow-up process.

Wherein coding performance is evaluated using multiple classes of cross-entropy loss. The cross-entropy loss is closely related to the Kullback-leibler (KL) divergence between the empirical and estimated distributions of the discrete random variables, which can be used to select the optimal parameters.

Specifically, the cross entropy loss can be obtained by defining Y ∈ {1,2,3 … C } to represent a discrete target variable, and binary coding a Y matrix with a dimension of N × C, specifically as follows:

Figure BDA0002561912770000121

wherein, C is the classification category of the classifier, and further, the cross entropy loss function of the multi-category is defined as:

in the formula (I), the compound is shown in the specification,representing the posterior probability that sample j belongs to class C. It can be appreciated that in an ideal case, when all samples in the training sample data are correctly classified and the posterior probability is exactly 1, the cross entropy loss is equal to 0.

Step 406, obtaining training sample data, where the training sample data includes N second simulated motion characteristic parameters and second motion label information of each second simulated motion characteristic parameter, and N is an integer greater than 1;

in some embodiments, the method for acquiring training sample data may refer to the acquiring manner of the first verification sample data in step 401, which is not described herein again.

Step 407, inputting training sample data and first verification sample data into an original canonical discriminant analysis classifier adopting optimal parameters, calculating the accuracy of the classification result of the original canonical discriminant analysis classifier based on a ten-fold cross verification method, and taking the original canonical discriminant analysis classifier as the classifier if the accuracy is greater than a preset accuracy.

In some embodiments, a ten-fold cross-validation method may be used to evaluate the classification performance of the trained classifier. Specifically, training sample data and first verification sample data can be merged to be used as merged sample data, the merged sample data is divided into 10 parts, 9 parts of the merged sample data are used as training data in turn, 1 part of the merged sample data is used as test data, a test is carried out, corresponding accuracy (or error rate) can be obtained in each test, the average value of the accuracy (or error rate) of 10 times of results is used as estimation of algorithm precision, and when the average accuracy is greater than a preset accuracy, an original regular discriminant analysis classifier is used as a classifier. It will be appreciated that a plurality of ten-fold cross verifications (e.g., 10) may be performed and averaged as an estimate of the accuracy of the algorithm.

And 203, acquiring the classification probability of the limb movement belonging to each movement category calculated by the classifier according to the preprocessed movement data, and taking the maximum value in the classification probability as the pre-classification probability.

In some embodiments, after the feature parameters obtained by preprocessing the motion data are input into the classifier, the classifier maps the feature parameters into each classification category of the classifier to obtain the classification probability of each classification category in the classifier to which the motion data belongs, and takes the maximum value in the classification probability as the pre-classification probability. Although the pre-classification probability is the maximum value of the classification probabilities, the classification class corresponding to the pre-classification probability is not represented as the action class of the action data, when the difference between the classification probabilities is small, the result of the classification of the classifier is not accurate and may be the unconscious action of the user, and at the moment, if the artificial limb executes the classification class corresponding to the pre-classification probability, the action of the artificial limb is caused, so that the user is frustrated.

And step 204, acquiring a preset classification threshold value.

Based on the related embodiment, in order to avoid meaningless actions of the artificial limb, the execution accuracy of the artificial limb is improved by setting the pre-classification threshold and sending an action execution instruction to the artificial limb when the pre-classification threshold is greater than the pre-classification probability.

Specifically, the process of obtaining the preset classification threshold includes:

step 501, obtaining second verification sample data, where the second verification sample data includes M third simulation action characteristic parameters and third action tag information of each third simulation action characteristic parameter, and M is an integer greater than 1;

in some embodiments, the same manner as the obtaining manner of the first verification sample data, and the obtaining manner of the second verification sample data may specifically refer to the related embodiments described above, and details are not repeated here.

Step 502, inputting the M third simulation motion characteristic parameters into a classifier respectively to obtain classification probabilities of motion classes to which the M third simulation motion characteristic parameters belong;

step 503, obtaining a preset classification threshold value of each action category according to the third action label information and the classification probability of each of the M third simulation action characteristic parameters.

It can be understood that, the process of inputting the second verification sample data into the classifier to obtain the classification probability may refer to the above related embodiments, and details are not described herein again.

Specifically, step 503 includes:

step 601, calculating the true positive rate and the false positive rate of the M third simulated motion characteristic parameters under each classification probability according to the third motion label information and the classification probability of each of the M third simulated motion characteristic parameters.

Based on the above related embodiment, the number of the third simulated motion characteristic parameters in the second verification sample data is M, the classification category of the classifier is L, and after the classification probability of each third simulated motion characteristic parameter in each classification category is calculated by the classifier, a probability matrix P of M × L can be obtained, where each row represents the classification probability of each third simulated motion characteristic parameter in each classification category. Accordingly, each third simulated motion characteristic parameter is converted into a binary-like form, and each position is used for marking whether the third simulated motion characteristic parameter belongs to the corresponding category (determined according to the third label information corresponding to the simulated motion characteristic parameter), so that a label matrix Q of M × L can also be obtained.

Based on this, for each category, the classification probability (column in the matrix P) of the M third simulated motion characteristic parameters as the category can be obtained. Therefore, the False Positive Rate (FPR) and the True Positive Rate (TPR) for each classification probability can be calculated according to each corresponding column in the probability matrix P and the label matrix Q.

It is to be understood that the second verification sample data may be the first verification sample data described above, and may also be the newly acquired verification sample data.

And step 602, constructing an ROC curve according to the true positive rate and the false positive rate.

In some embodiments, an ROC curve is plotted based on the true positive rate and the false positive rate. This gives a total of L ROC curves. And finally, averaging the L ROC curves to obtain the finally constructed ROC curve.

And 603, acquiring a coordinate point in the ROC curve, wherein the false positive rate is less than or equal to a preset cut-off threshold value and the true positive rate is the maximum, and taking the classification probability corresponding to the coordinate point as a preset classification threshold value.

In some embodiments, in the ROC curve, the TPR determines the performance of a classifier on positive cases that can be correctly distinguished in all positive samples, while the FPR determines how many false positives are determined in all negative samples. Therefore, when FPR is 0 and TPR is 1, it means that the classifier can correctly classify all samples. In this embodiment, when the FPR is high, the prosthesis may perform the action B due to inaccurate classification when the prosthesis needs to perform the action a, resulting in an execution error of the prosthesis.

Therefore, in this embodiment, the coordinate point where the false positive rate is less than or equal to the preset cutoff threshold and the true positive rate is the maximum is selected, and the classification probability corresponding to the coordinate point is used as the preset classification threshold. And when the TPR is maximized, the FPR is minimized to be lower than a cut-off threshold value, so that the classification accuracy is ensured.

The cutoff threshold may be set according to actual conditions in a pilot test.

Step 205, judging whether the pre-classification probability is greater than a preset classification threshold value of the action type, if so, executing step 206; if not, go to step 207.

And step 206, sending an action instruction for executing the action type to the artificial limb.

In some embodiments, the pre-classification probability is compared with a preset classification threshold, and when the pre-classification probability is greater than the preset classification threshold, the motion instruction for executing the motion class is sent to the artificial limb, so that the artificial limb can be prevented from meaningless operation,

and step 207, sending an instruction for keeping the original state to the artificial limb.

In some embodiments, when the pre-classification probability is smaller than the preset classification threshold, it indicates that the false positive rate corresponding to the pre-classification probability exceeds the cutoff threshold, and at this time, a situation of misclassification may occur, and an instruction for keeping the original state is sent to the artificial limb, so that the artificial limb maintains the current state, and misoperation of the artificial limb can be avoided.

According to the method and the device, the action data of the limb for installing the artificial limb are obtained, filtering and feature extraction are carried out on the action data, the extracted feature parameters are input into the classifier, the pre-classification probability of the action category to which the action of the limb belongs is determined through the classifier, ROC analysis is carried out on the second verification sample data, the selected preset classification threshold value enables the true positive rate to be maximized, meanwhile, the false positive rate is limited to be lower than the cut-off threshold value, the false positive rate is enabled to be lower in activation, and the probability that the artificial limb is accidentally activated is reduced. In addition, when the pre-classification probability is judged to be larger than the preset classification threshold value of the action class, the action command for executing the action class is sent to the artificial limb, so that the artificial limb executes the action according to the action command.

Based on the same concept, embodiments of the present application provide a prosthesis control device, and specific implementation of the device may refer to the description of the method embodiment section, and repeated descriptions are omitted, as shown in fig. 7, the device mainly includes:

an obtaining module 701, configured to obtain motion data of a limb on which a prosthesis is installed;

a calculating module 702, configured to calculate a pre-classification probability of an action category to which an action of a limb belongs according to the action data;

a sending module 703, configured to send an action instruction for executing the action category to the artificial limb when it is determined that the pre-classification probability is greater than the preset classification threshold of the action category.

Based on the same concept, an embodiment of the present application provides an electronic device, as shown in fig. 8, the electronic device mainly includes: a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802 and the memory 803 communicate with each other via the communication bus 804. Wherein, the memory 803 stores the program which can be executed by the processor 801, the processor 801 executes the program stored in the memory 803, and the following steps are realized:

acquiring action data of a limb provided with an artificial limb;

calculating the pre-classification probability of the action category to which the action of the limb belongs according to the action data;

and if the pre-classification probability is judged to be larger than the preset classification threshold value of the action type, sending an action instruction for executing the action type to the artificial limb.

The communication bus 804 mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 804 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.

The communication interface 802 is used for communication between the above-described electronic apparatus and other apparatuses.

The Memory 803 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor 801.

The Processor 801 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the prosthesis control method described in the above embodiment.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.

It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种抗凝血方便取出的心脏支架

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类