Lower limb motion state recognition model training method and lower limb motion state recognition method
By combining cascade training and result decision model in the lower limb motion state recognition model, the problem of poor accuracy and robustness of lower limb motion state recognition in the prior art is solved, and higher recognition accuracy and smoothness of motion state switching are achieved.
Patent Information
- Application Number
- CN202411469533.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-10-21
AI Technical Summary
When the existing lower limb movement state recognition methods identify lower limb movement states, the accuracy and robustness are poor, and the motion state recognition switching is not smooth.
A training method for lower limb motion state recognition model is provided, by determining motion characteristics based on inertial measurement signals, constructing sample data sets, and using cascade training methods to train binary classification models, combining the result decision model to improve recognition accuracy and robustness.
Through the combination of cascade training and result decision model, the accuracy and robustness of the lower limb motor state recognition model are improved, and the fluency of motion state recognition is enhanced.
Smart Images

Figure CN119513730A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of motion feature recognition, and in particular to a lower limb motion state recognition model training method and a lower limb motion state recognition method. Background Art
[0002] As exoskeleton robots are increasingly used in military, industrial, medical and other fields, the recognition of human lower limb motion state has become an important research field in order to achieve more coordinated and smooth exoskeleton assistance to human movements. Due to the advantages of the inertial measurement unit itself, such as reliability, easy access, low weight, low power consumption, and low noise, motion state recognition based on inertial measurement unit measurement data is one of the mainstream technologies in the industry.
[0003] At present, the industry has proposed a variety of methods for identifying lower limb motion states based on inertial measurement unit measurement signals, including machine learning model recognition methods such as support vector machines and random forests, and deep learning methods such as convolutional neural networks and recurrent neural networks. However, these methods still have poor accuracy and robustness in dealing with specific types of lower limb motion states (such as going upstairs and going downstairs), and the problem of unsmooth switching of motion state recognition. Summary of the invention
[0004] In order to solve the problem that the existing lower limb movement state recognition has poor recognition accuracy for certain specific lower limb movement states, the embodiments of the present disclosure provide a new lower limb movement state recognition model training method and a lower limb movement state recognition method.
[0005] The embodiment of the present disclosure provides a method for training a lower limb motion state recognition model, wherein the lower limb motion state recognition model includes a binary classification model and a result decision model corresponding to various lower limb motion states; the method includes:
[0006] Determine the corresponding motion features based on the inertial measurement signals collected during various lower limb motion states, use the lower limb motion states as labels of sample data and the corresponding motion features to form sample data, and use the sample data to construct a sample data set;
[0007] Determine the sorting order of the binary classification models corresponding to various lower limb motion states, and train the binary classification models corresponding to each lower limb motion state in sequence according to the sorting order as follows S1-S2, until the model parameters of the binary classification models corresponding to all lower limb motion states are obtained and the sample data are processed respectively to obtain the binary classification results:
[0008] S1: Obtain the first binary classification result obtained by processing the motion features with the binary classification model corresponding to the lower limb motion state in the previous order;
[0009] S2: taking the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample, taking the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results as the input features of the negative sample, training the binary classification model corresponding to the current target lower limb motion state, and obtaining the model parameters of the binary classification model corresponding to the current target lower limb motion state and the current classification results of each sample data;
[0010] The result decision model is trained according to the binary classification results obtained by processing the sample data with the binary classification model corresponding to all lower limb movement states and the lower limb movement state labels of the sample data to determine the model parameters of the result decision model.
[0011] Optionally, determining the sorting order of the binary classification models corresponding to various lower limb movement states includes:
[0012] For sample data of various lower limb motion states, determine the correlation score between each motion feature and the label, and select a preset number of selected related features with a high correlation with the sample data label from the motion features according to the correlation score;
[0013] For the sample data of various lower limb movement states, preliminary regression analysis is performed based on the corresponding selected relevant features and labels to determine the regression analysis accuracy results corresponding to each movement state;
[0014] The order of the regression analysis accuracy results from best to worst is used as the sorting order of the binary classification models corresponding to various lower limb movement states.
[0015] Optionally, the inertial measurement signals collected based on various lower limb motion states respectively determine corresponding motion features, including:
[0016] According to a preset sliding time window and sliding window frequency, sliding window sampling is performed on the inertial measurement signals collected during various lower limb movement states to obtain a kinematic feature sequence sorted within the sliding time window and a sorting identifier of the kinematic feature sequence;
[0017] Determine the motion feature based on the kinematic feature sequence, and use the sorting identifier of the kinematic feature sequence as the sorting identifier of the sample data;
[0018] In the case where the lower limb movement state ranked first is a continuous state, the method further includes: obtaining, according to the ranking identifier of each sample data, a previous historical binary classification result obtained by processing the previous sample data with a binary classification model corresponding to the lower limb movement state ranked first;
[0019] The method of using the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample includes: using the motion features in the sample data corresponding to the current target lower limb motion state, the corresponding previous binary classification results, and the corresponding previous historical binary classification results as the input features of the positive sample;
[0020] The method of using the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous two-classification results as the input features of the negative sample includes: using the motion features in the sample data corresponding to the non-current target lower limb motion state, the corresponding previous two-classification results, and the corresponding previous historical two-classification results as the input features of the negative sample.
[0021] Optionally, before training the binary classification model corresponding to the current target lower limb motion state, the method further includes:
[0022] Using a machine learning model to perform a correlation analysis based on the label of the sample data and a motion feature to determine a first correlation score between various motion features and the current target lower limb motion state;
[0023] Randomly select multiple target samples in the sample data set, and determine N adjacent positive samples in the positive samples that are closest to each of the target samples in a motion feature dimension, and determine N adjacent negative samples in the negative samples that are closest to each of the target samples in the motion feature dimension;
[0024] Calculating a first average distance between the target sample and the nearest N adjacent positive samples in the one motion feature dimension, and calculating a second average distance between the target sample and the nearest N adjacent negative samples in the one motion feature dimension, calculating a distance difference between the first average distance and the second average distance, and determining a second correlation score of the one motion feature according to the distance difference;
[0025] Taking a weighted sum of the first correlation score and the second correlation score corresponding to each motion feature to obtain a comprehensive score corresponding to each motion feature;
[0026] Based on the comprehensive scores corresponding to the various motion features, a target motion feature for characterizing the current target lower limb motion state is determined;
[0027] The method uses the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample, uses the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results as the input features of the negative sample, and trains the binary classification model corresponding to the current target lower limb motion state, including:
[0028] The target motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results are used as the input features of the positive sample, and the target motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results are used as the input features of the negative sample, and the binary classification model corresponding to the current target lower limb motion state is trained.
[0029] Optionally, determining the second correlation score of the one motion feature according to the distance difference includes:
[0030] When the distance difference is a positive value, a reduction process is performed on the basis of the initial weight to obtain a corresponding reduced weight; and
[0031] When the distance difference is a negative value, the initial weight is adjusted up to obtain a corresponding increased weight;
[0032] An average value of all the decreased weights and the increased weight is calculated as a second correlation score of the one motion feature.
[0033] Optionally, the step of determining the target motion feature for characterizing the current target lower limb motion state based on the comprehensive scores corresponding to the various motion features includes:
[0034] Determine the motion features to be selected based on the comprehensive scores corresponding to the various motion features;
[0035] Performing correlation on the motion features to be selected, determining irrelevant motion features and relevant motion features, and determining selected relevant motion features from the relevant motion features;
[0036] using the irrelevant motion features and the selected relevant motion features as target motion features characterizing the motion state of the target lower limb; or,
[0037] Performing pairwise correlation analysis on each motion feature to determine irrelevant motion features and relevant motion features, and determining selected relevant motion features among the relevant motion features;
[0038] The target motion feature is determined from among the irrelevant motion features and the selected relevant motion features according to the comprehensive scores of the irrelevant motion features and the selected relevant motion features.
[0039] Optionally, the adopting of a machine learning model to perform a correlation analysis based on the label of the sample data and a motion feature to determine a first correlation score between various motion features and the current target lower limb motion state includes:
[0040] Using a logistic regression model, performing correlation analysis based on the label of the sample data and the one motion feature, determining a characteristic coefficient corresponding to the one motion feature in the logistic regression model, and using the absolute value of the characteristic coefficient as a first correlation score between the one motion feature and the current target lower limb motion state; or,
[0041] Using a Gaussian Naive Bayes model, a correlation analysis is performed based on the label of the sample data and the one motion feature, and the standard deviation under the current target lower limb motion state and the non-current target lower limb motion state is determined respectively;
[0042] The average value of the standard deviation of the current lower limb state and the non-current lower limb state corresponding to the one motion feature is calculated as the first correlation score between the one motion feature and the current target lower limb motion state.
[0043] Optionally, the binary classification model corresponding to the current target lower limb motion state is trained to obtain model parameters of the binary classification model corresponding to the current target lower limb motion state and current classification results of each sample data, including: training various types of binary classification models corresponding to the current target lower limb motion state respectively to obtain model parameters of various types of binary classification models, and determining model quality scores of various types of binary classification models;
[0044] The binary classification model with the best model quality score is selected as the selected binary classification model corresponding to the current target lower limb movement state, and the current classification result corresponding to the selected binary classification model is obtained.
[0045] In a second aspect, an embodiment of the present disclosure provides a method for identifying a lower limb movement state, comprising:
[0046] Determine corresponding motion characteristics based on lower limb motion inertial measurement signals acquired in real time;
[0047] According to the predetermined sorting order of the binary classification models of the lower limb motion states, the binary classification models corresponding to the respective lower limb motion states are used in turn to process the motion features to obtain corresponding binary classification results, wherein the binary classification model corresponding to the latter lower limb motion state simultaneously processes the motion features and the former binary classification results to obtain the corresponding latter binary classification results, and the former binary classification results are the classification results obtained by processing the motion features by the former lower limb motion state binary classification model;
[0048] Input the binary classification results corresponding to all lower limb movement states into the result decision model to obtain the identified lower limb movement states;
[0049] Among them, each lower limb movement state binary classification model and the result decision model are obtained using the training method described in claims 1-8.
[0050] In a third aspect, an embodiment of the present disclosure provides a computing device, comprising a processor and a memory, wherein the memory is used to store a computer program; when the computer program is loaded by the processor, the processor executes the lower limb motion state recognition model training method as described above and / or the lower limb motion state recognition method as described above.
[0051] The lower limb motion state recognition model training method provided by the embodiment of the present disclosure, before training the binary classification model in the lower limb motion state recognition model, first determine the sorting order of the binary classification models corresponding to each lower limb motion state, and then train each binary classification model one by one (cascade) according to the sorting order, and use the binary classification results obtained by processing the sample data in the first binary classification model as input when training the second binary classification model, so that the training of the first binary classification model has an impact on the training of the second binary classification model. By referring to the output results of the first two classification results, the correct results can be output by the second binary classification model as much as possible, improving the model accuracy and robustness of the second binary classification model, and thus improving the accuracy and robustness of the entire lower limb motion state recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor, including
[0054] Figure 1 is a flow chart of a lower limb motion state recognition model training method provided by an embodiment of the present disclosure;
[0055] Figure 2 is a flow chart of determining motion characteristics based on inertial measurement signals provided by some embodiments;
[0056] Figure 3 is a flow chart of a method for determining a binary classification model sorting order corresponding to various lower limb movement states in some embodiments;
[0057] Figure 4 is a flow chart of a method for determining target motion characteristics adopted in some embodiments of the present disclosure;
[0058] Figure 5 is a flow chart of a method for identifying lower limb motion states provided by an embodiment of the present disclosure;
[0059] Figure 6 It is a schematic diagram of the structure of a computing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0060] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0061] The term "including" and its variations used in this document are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. In this document, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0062] In order to solve the problem that the existing lower limb motion state recognition model has poor recognition accuracy and robustness for a specific type of lower limb motion state, the present disclosure provides a new lower limb motion state recognition model training method. The lower limb motion state recognition model training method provided by the present disclosure is executed by a computing device.
[0063] It should be noted that the lower limb motion state recognition model provided by the embodiment of the present disclosure includes a binary classification model and a result decision model corresponding to various lower limb motion states.
[0064] Figure 1 : is a flow chart of the lower limb motion state recognition model training method provided by the embodiment of the present disclosure. Figure 1 As shown, the lower limb motion state recognition model training method provided by the embodiment of the present disclosure includes S110-S170.
[0065] S110: Determine the corresponding motion features based on the inertial measurement signals collected during various lower limb motion states, use the lower limb motion states as labels of sample data and the corresponding motion features to form sample data, and use the sample data to construct a sample data set.
[0066] Because the movement of the lower limbs of the human body is the coordinated movement of the thigh and calf, there are usually two inertial measurement units used in actual acquisition and motion recognition. The two inertial measurement units are fixed relative to the thigh and calf, respectively, to collect the movement status of the thigh and calf, and obtain the corresponding inertial measurement signals.
[0067] In the embodiment of the present disclosure, after obtaining the inertial measurement signal collected by the inertial measurement unit fixed on the thigh and the calf, the computing device determines multiple motion features based on the inertial measurement signal. The following is an analysis of how to determine multiple motion features based on the inertial measurement signal in the embodiment of the present disclosure.
[0068] Figure 2 is a flow chart of determining motion characteristics based on inertial measurement signals provided by some embodiments. Figure 2 As shown, in some embodiments, the computing device may determine at least some of the multiple motion features using the following S111 - S112 .
[0069] S111: sampling the inertial measurement signals collected during various lower limb motion states according to the preset sliding time window and sliding window frequency, and obtaining a kinematic feature sequence sorted within the sliding time window.
[0070] The inertial measurement unit includes an accelerometer and a gyroscope, wherein the accelerometer can measure the acceleration of three axes, and the gyroscope can measure the angular velocity of three axes. After obtaining the original three-axis acceleration and original three-axis angular velocity measured by an inertial measurement unit, the computing device can obtain the three-axis acceleration and three-axis angular velocity in the reference coordinate system through data processing, and then obtain the corresponding roll angle, pitch angle and yaw angle through Euler angle calculation after obtaining the three-axis acceleration and three-axis angular velocity. Because the aforementioned technical content is already a common practice in this field, the aforementioned content will not be analyzed in detail here.
[0071] As analyzed above, when two inertial measurement units are used to obtain the kinematic characteristics of the thigh and calf respectively, 18 kinematic characteristics can be obtained based on the inertial measurement signal at one time point, which are the three-axis acceleration, three-axis angular velocity, and roll angle, pitch angle, and yaw angle of the thigh and calf after attitude solution. Since the inertial measurement signal may be affected by the background noise of the inertial measurement unit and the environmental noise, a low-pass filter (such as a fourth-order Butterworth low-pass filter) can be used in practical applications to smooth the inertial measurement signal, and the smoothed inertial measurement signal can be used to determine the above 18 kinematic characteristics.
[0072] In practical applications, the motion state cannot be determined by the kinematic features of a single time point, but by the kinematic features of enough time points. To this end, it is necessary to sample the inertial measurement signals collected for various lower limb motion states using a preset sliding time window, and determine each kinematic feature within the sliding time window according to the aforementioned method, and sort each kinematic feature according to the time mark to obtain a sorted kinematic feature sequence.
[0073] In order to fully obtain a complete sequence of kinematic features of the lower limb movement state, it is necessary to ensure that the aforementioned preset sliding time window size is larger than the lower limb movement cycle. Considering that the normal walking frequency of a typical human body is 0.6-1.0Hz (corresponding to 0.6s to complete a step, and the lower limb movement cycle is 1.2s-2.0s), the preset sliding time window can be set to 2s to obtain the sequence of kinematic features within the 2s sliding time window.
[0074] It should be noted that in order to obtain inertial measurement signals and kinematic features that characterize sufficient motion details, the correlation measurement unit should be sampled at a higher sampling frequency. For example, in a specific application, the sampling frequency of the inertial measurement unit is set to 50 Hz. In addition, in order to obtain as many sorted kinematic feature sequences as possible in a motion state, the sliding window step size of the preset sliding time window cannot be too small. In one embodiment, the sliding step size of the preset sliding time window is set to 0.02s, that is, the preset sliding time window completes 50 sliding windows within 1s, and 50 sorted kinematic feature sequences are obtained.
[0075] S112: Determine at least part of the motion features based on various kinematic feature sequences.
[0076] After obtaining a sorting kinematic feature sequence, at least one of the following parameters can be obtained as the corresponding multiple motion features for a single sorting kinematic feature sequence: mean, maximum, minimum, median, variance, peak-to-peak difference, signal energy, skewness, kurtosis, maximum slope, root mean square, absolute mean, pulse factor, root amplitude, margin index, waveform factor, crest factor, vector and amplitude, absolute area.
[0077] The mean represents the average value of all data in a kinematic feature sequence; the maximum value represents the maximum value of all data in a kinematic feature sequence; the minimum value represents the minimum value of all data in a kinematic feature sequence; the median represents the median of all data in a kinematic feature sequence; the variance represents the degree of dispersion of data in a kinematic feature sequence; the peak-to-peak difference represents the difference between the maximum and minimum values in a kinematic feature sequence; the signal energy represents the sum of squares of all data in a kinematic feature sequence; the skewness represents the degree of asymmetry of all data in a kinematic feature sequence; the kurtosis represents the degree of peak distribution of all data in a kinematic feature sequence; the maximum slope represents the difference between the maximum and minimum values in a kinematic feature sequence and the relative The ratio of the time interval to the time interval; the root mean square is used to characterize the effective amplitude of the data in a kinematic feature sequence; the absolute value mean is the mean of the absolute values of all the data in a kinematic feature sequence; the pulse factor is the ratio of the maximum value to the root mean square in a kinematic feature sequence; the root mean square amplitude is the square root of the root mean square value in a kinematic feature sequence and the sequence length; the margin index is the ratio of the maximum value to the root mean square amplitude in a kinematic feature sequence; the waveform factor characterizes the peak characteristics of the data in the kinematic feature sequence, which is the ratio of the peak value to the root mean square; the crest factor is the peak characteristics of the data in a kinematic feature sequence, which is the ratio of the data peak value to the mean; the vector sum amplitude is the amplitude of all the values in a kinematic feature sequence added directly. The absolute value area is the sum of the absolute values of all the data in a kinematic feature sequence.
[0078] As analyzed above, the inertial measurement signal includes the thigh inertial measurement signal collected by the inertial measurement unit located on the thigh, and the calf inertial measurement signal collected by the inertial measurement unit located on the calf. The computing device can respectively determine the thigh kinematic feature sequence and the sorted kinematic feature sequence of the calf within the sliding time window, and use the aforementioned method to determine the thigh motion features of the corresponding dimension based on the thigh kinematic feature sequence (here the thigh motion features are also the thigh motion features determined by the previous method), and determine the calf motion features of the corresponding dimension based on the calf kinematic feature sequence (here the thigh motion features are also the thigh motion features determined by the previous method).
[0079] Accordingly, the computing device may also determine partial motion features according to S1121-S1122 as follows.
[0080] S1121: Obtain the ratio of the thigh motion feature and the calf motion feature of the corresponding dimension, and / or the signal energy of the thigh motion feature and the calf motion feature of the corresponding dimension.
[0081] S1122: Use the ratio and / or signal energy as at least part of the motion feature.
[0082] After obtaining the thigh motion features and calf motion features of a certain motion dimension within a preset sliding time window, the ratio of the thigh motion features and the calf motion features can be subsequently calculated, or the signal energy of the thigh motion features and the calf motion features of the corresponding dimension can be calculated. The aforementioned ratio represents the ratio of the motion features of the same kinematic dimension, such as the thigh and calf, and the aforementioned signal energy is the sum of the squares of the same motion features.
[0083] In one embodiment, in order to identify whether filtering the inertial measurement signal affects the correlation between the motion characteristics and the motion state of the lower limbs, this scheme obtains the corresponding kinematic characteristics based on the inertial measurement signal before filtering and the inertial measurement signal after filtering, and determines the corresponding motion characteristics according to the above method.
[0084] After obtaining a plurality of motion features, the computing device then associates the aforementioned plurality of motion features with corresponding lower limb motion state labels to form sample data, and constructs a sample data set based on the sample data.
[0085] In some embodiments, when sliding window sampling is performed according to a preset sliding time window and sliding window frequency to obtain a kinematic feature sequence sorted within the sliding time window, a sorting identifier of the kinematic feature sequence is also determined. When the kinematic feature sequence is used to determine the motion feature and sample data is determined based on the motion feature, the computing device also uses the sorting identifier of the kinematic feature sequence as the sorting identifier of the sample data. The role of the sorting identifier will be analyzed later.
[0086] S120: Determine the sorting order of the binary classification models corresponding to various lower limb movement states.
[0087] In the disclosed embodiment, the binary classification models corresponding to various lower limb movement states are not trained independently of each other, but are trained in cascade, and the classification results obtained by processing the sample data with the first binary classification model will be used to train the binary classification model corresponding to the subsequent lower limb movement state.
[0088] In order to realize the aforementioned cascade training, it is necessary to determine the sorting order of the binary classification models corresponding to various lower limb movement states, so as to realize the training of the subsequent binary classification models corresponding to each lower limb movement state according to the sorting order.
[0089] In some embodiments, the manually determined sorting order of lower limb motion states can be input into a computing device to determine the sorting order of the binary classification models corresponding to various lower limb motion states.
[0090] In some other embodiments, the computing device may determine the sorting order of the binary classification models corresponding to various lower limb movement states by means of correlation analysis. Figure 3 1 is a flow chart of a method for determining the sorting order of the binary classification models corresponding to various lower limb motion states in some embodiments. Figure 3 As shown, in some embodiments, the method for determining the sorting order includes S121-S123.
[0091] S121: For sample data of various lower limb motion states, determine the correlation score between each motion feature and the sample data label, and select a preset number of selected related features with a high correlation with the sample data label from the motion features according to the correlation score.
[0092] As analyzed above, there are a large number of motion features determined in the foregoing text. If all the aforementioned motion features are directly used for motion correlation analysis, the amount of data calculation will be too large. Determining the sorting order of the binary classification model corresponding to the binary lower limb motion state is only an operation performed from a macroscopic dimension, and there is no need to consider the accuracy of details. In order to reduce the amount of calculation, in the embodiment of the present disclosure, for sample data of various lower limb motion states, a small amount of sample data is used to analyze the correlation between each motion feature and the sample data label, and a preset number of selected related features with a high correlation with the sample data label are determined.
[0093] It should be noted that when executing operation S121, for sample data of a specific lower limb motion state, the sample data having the corresponding lower limb motion state is used as a positive sample, and the sample data having other lower limb motion states is used as a negative sample, and correlation analysis is performed.
[0094] In a specific implementation, an existing correlation analysis method such as the Pearson correlation coefficient method may be used to perform the above operations to obtain a preset number of selected related features.
[0095] S122: For the sample data of various lower limb movement states, perform preliminary regression analysis on the various lower limb movement states based on the corresponding selected relevant features and labels, and determine the regression analysis accuracy results corresponding to each movement state.
[0096] In a specific implementation, after obtaining the selected relevant features corresponding to various lower limb movement states, a regression analysis can be performed using a method such as logistic regression to obtain a corresponding regression analysis model, and the regression analysis model corresponding to each movement state is evaluated using the validation data in the sample data to determine the corresponding regression analysis accuracy result. The regression analysis accuracy result can be represented in percentage.
[0097] S123: The order of the regression analysis accuracy results from best to worst is used as the sorting order of the binary classification models corresponding to various lower limb movement states.
[0098] After obtaining the regression analysis accuracy result by using S122, the various regression analysis accuracy results are compared and sorted from best to worst (specifically, from large to small) to determine the sorting order. The aforementioned sorting order can be used as the sorting order of the binary classification model corresponding to various lower limb movement states.
[0099] It should be noted here that the aforementioned sorting order is only a preliminary sorting order and is not absolutely correct.
[0100] In a specific embodiment, the lower limb movement states include: running, jumping, squatting, going upstairs, walking and going downstairs. The sorting order determined by the above S121-S123 is: squatting, running, jumping, going upstairs, walking and going downstairs. According to the above sorting order, the numbers corresponding to the lower limb movement states are 1-6 respectively.
[0101] After executing the aforementioned S120, the following S130-S160 may be subsequently executed until the binary classification models corresponding to all lower limb movement states and the binary classification results obtained by processing each sample data by the aforementioned binary classification model are determined.
[0102] S130: Obtain the first binary classification result obtained by processing the motion features by the binary classification model corresponding to the lower limb motion state in the first order.
[0103] S140: Use the motion features in the sample data corresponding to the current target lower limb motion state i and the corresponding previous binary classification results as the input features of the positive sample, use the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results as the input features of the negative sample, train the binary classification model corresponding to the current target lower limb motion state i, and obtain the model parameters of the binary classification model corresponding to the current target lower limb motion state and the current classification results of each sample data.
[0104] As its name suggests, the binary classification model is a model for implementing binary classification tasks. The labels of the sample data in the sample data set are labels of various lower limb motion states, which cannot be directly used for the training of the binary classification model corresponding to the target lower limb motion state i. For this reason, in the disclosed embodiment, the sample data corresponding to the current target lower limb motion state i and the corresponding previous binary classification results are used as positive samples, and the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results are used as negative samples, and the binary classification model corresponding to the current target lower limb motion state i is trained to obtain the model parameters of the binary classification model corresponding to the current target lower limb motion state and the current classification results of each sample data.
[0105] It should be noted here that the input data for training the binary classification model corresponding to the current target lower limb motion state i includes not only the motion features in the sample data, but also the previous binary classification results. The sorting order of the binary classification models corresponding to each lower limb motion state mentioned in the previous text directly determines the previous binary classification results corresponding to the current target lower limb motion state i, which also affects the model parameters of the current target lower limb motion state i and the current classification result state of each sample data (the influence mentioned here is a relative influence, not an absolute influence). In practical applications, because the previous two classification results generally have a higher accuracy, using them for the training of the binary classification model corresponding to the current target lower limb motion state i can improve the model accuracy of the binary classification model corresponding to the current target lower limb motion state i.
[0106] It should also be noted that when the current target lower limb motion state i is the lower limb motion state that is first in the sorting order, it does not have a corresponding first two classification results, and there is no need to use the so-called first two classification results as model input.
[0107] S150: Determine whether the current target lower limb movement state i is the lower limb movement state at the end of the sorting order; if so, execute S160; if not, execute S170.
[0108] After determining the binary classification model corresponding to the current target lower limb motion state i, the computing device then determines whether the current target lower limb motion state i is the lower limb motion state at the end of the sorting order. If so, it is determined that the binary classification models corresponding to all lower limb motion states have been trained, so S170 can be executed; if not, it is also necessary to train the binary classification models corresponding to the lower limb motion states at the end of the sorting order, so S160 and subsequent steps S130-S150 are executed in a loop.
[0109] S160: Set i=i+1, and execute S130.
[0110] S170: Training a result decision model based on the binary classification results obtained by processing the sample data with the binary classification model corresponding to all lower limb movement states and the lower limb movement state labels of the sample data to determine model parameters of the result decision model.
[0111] After all binary classification models corresponding to the lower limb movement states are trained, the binary classification results obtained by processing the sample data with the binary classification models corresponding to all lower limb movement states can be obtained. Then, for each sample data, the binary classification results are sorted in the same sorting order, and the binary classification result vector of each sample data can be obtained. The aforementioned binary classification result vector is used as the input of the result decision model, and the lower limb movement state label of the sample data is used as the output of the result absolute model. The result decision model is trained to obtain the model parameters of the result decision model.
[0112] After obtaining the binary classification model and the result decision model trained in the aforementioned sorting order, the binary classification model and the result model are combined to obtain the lower limb movement state recognition model. The specific use of the lower limb movement state recognition model will be analyzed in detail later.
[0113] As analyzed above, before training the binary classification model in the lower limb motion state recognition model, the embodiment of the present disclosure first determines the sorting order of the binary classification models corresponding to each lower limb motion state, and then trains each binary classification model one by one (cascade) according to the sorting order, and uses the binary classification results obtained by processing the sample data in the first binary classification model as input when training the second binary classification model, so that the training of the first binary classification model has an impact on the training of the second binary classification model. Since a lower limb motion state sample data has only one lower limb motion state label, by referring to the output results of the first two classification results, the correct result can be output by the second binary classification model as much as possible, thereby improving the model accuracy and robustness of the second binary classification model, and thus improving the accuracy and robustness of the entire lower limb motion state recognition model.
[0114] As analyzed above, in some embodiments, the sorting mark of the sample data may also be obtained. When the sorting mark is obtained, in some embodiments, while executing the above S130, the following S180 may also be executed.
[0115] S180: When the lower limb movement state ranked previously is a continuous movement state, according to the ranking identifier of each sample data, obtain the previous historical binary classification result obtained by processing the previous sample data with the binary classification model corresponding to the lower limb movement state ranked previously.
[0116] For example, if the current lower limb movement state is jumping, the corresponding previous lower limb movement state includes running, and running is a continuous movement state, then the historical binary classification results obtained by the historical sample data before the binary classification model corresponding to running processes the sample data can be obtained.
[0117] When executing the aforementioned S180, the corresponding aforementioned S140 is specifically the following S141.
[0118] S141: Use the motion features in the sample data corresponding to the current target lower limb motion state, the corresponding previous two-classification results, and the corresponding previous historical two-classification results as input features of the positive sample; use the motion features in the sample data corresponding to the non-current target lower limb motion state, the corresponding previous two-classification results, and the corresponding previous historical two-classification results as input features of the negative sample.
[0119] By using the historical binary classification results obtained from the historical sample data before the previous continuous motion state processing sample data as input to train the current target lower limb motion state, some continuous lower limb motion states can be effectively identified, thereby making the current lower limb motion state more accurately classified for the aforementioned continuous lower limb motion state, thereby improving the recognition accuracy of the binary classification model corresponding to the current lower limb motion state.
[0120] In the previous solution, all motion features are used to train the binary classification model corresponding to the current lower limb motion state. As analyzed above, the number of all motion features is too large, which makes the binary classification model too complicated and may cause overfitting problems. To solve this problem, in the specific implementation, the motion features with a high correlation with the current lower limb motion state can be selected from all motion features as the target motion features, and only the target motion features and the previous binary classification results are used to train the binary classification model corresponding to the current lower limb motion state.
[0121] Figure 4 FIG. 1 is a flow chart of a method for determining target motion characteristics used in some embodiments of the present disclosure. Figure 4 As shown, in some embodiments, the method for determining target motion characteristics includes the following S210-S250.
[0122] S210: Using a machine learning model to perform correlation analysis based on the label of the sample data and a motion feature, determine a first correlation score between various motion features and the current target lower limb motion state.
[0123] Before determining the first correlation scores between various motion features and the current target lower limb motion state, it is necessary to use the data labeled with the current target lower limb motion label as positive samples and the data labeled with non-current target lower limb motion labels as negative samples for correlation analysis.
[0124] In a specific implementation, the computing device uses a predetermined machine learning model to perform the aforementioned correlation analysis to obtain a first correlation score. The machine learning model can be any one of a logistic regression model, a latent Dirichlet distribution model, a K nearest neighbor algorithm model, a decision tree model, a Gaussian naive Bayes analysis model, an extreme gradient boosting tree model, a lightweight gradient boosting machine model, a decision tree model based on gradient boosting, a random forest model, and a generalized additive model, and the embodiments of the present disclosure are not particularly limited.
[0125] In some embodiments, the computing device uses a logistic regression model to perform a correlation analysis on a motion feature and a label of sample data to determine a first correlation score between a motion feature and the current target lower limb motion state, specifically including the following S211-S212.
[0126] S211: Using a logistic regression model, performing correlation analysis based on the label of the sample data and a motion feature, respectively, to determine a feature coefficient corresponding to a motion feature in the logistic regression model.
[0127] The basic form of the logistic regression model is Where X f Characterize a motion feature, w f is the characteristic coefficient, which represents a motion feature X f The sample data label is the degree of influence of the current target lower limb motion state, w f The larger the absolute value of is, the greater the influence of a motion feature on the output result is.
[0128] S212: Using the absolute value of the characteristic coefficient as a first correlation score between a motion feature and the current target lower limb motion state.
[0129] As analyzed above, w f The larger the absolute value of the characteristic coefficient is, the greater the impact of a motion feature on the output result is. Therefore, the absolute value of the characteristic coefficient can be used as the first correlation score between a motion feature and the current target lower limb motion state, that is, MLscore (X f )=|w f |.
[0130] In some other embodiments, the computing device uses a Gaussian Naive Bayes model to perform a correlation analysis on a motion feature and a label of sample data to determine a first correlation score between a motion feature and the current target lower limb motion state, specifically including the following S213-S214.
[0131] S213: Using a Gaussian Naive Bayes model, a correlation analysis is performed based on the label of the sample data and a motion feature to determine the standard deviation in the current target lower limb motion state and the non-current target lower limb motion state.
[0132] S214: Calculate the average value of the standard deviations of the current target lower limb state and the non-current target lower limb movement state corresponding to a movement feature, as a first correlation score between the movement feature and the current target lower limb movement state.
[0133] For a motion feature X f , in a given lower limb motion state C k The conditional probability under the Gaussian distribution where μ k,f Category C k Lower Movement Feature X f The mean value of k,f Category C k Lower Movement Feature X f The standard deviation of the motion feature X f For classification of lower limb movement status C k The importance of can be measured by the change in conditional probability, so by calculating the conditional probability P(X f |C k ), and the standard deviation is used to characterize the importance of motion characteristics in determining the motion state of the lower limbs. Therefore, by taking the mean of each standard deviation, A first relevance score is determined.
[0134] In some embodiments, at least two machine learning models may be used to perform correlation analysis on a motion feature and a label of sample data to obtain corresponding correlation scores, and then weighted sum the corresponding correlation scores to obtain a corresponding first correlation score.
[0135] S220: randomly selecting multiple target samples in the sample data set, and determining N adjacent positive samples in the positive samples that are closest to each target sample in a motion feature dimension, and determining N adjacent negative samples in the negative samples that are closest to each target sample in a motion feature dimension.
[0136] Through the numerical distribution characteristics of a large number of motion features that have a significant correlation with the label, as well as the numerical analysis of motion features that have no significant correlation with the label, it is found that the numerical characteristics of similar samples (similar positive samples, similar negative samples) of motion features that have a significant correlation with the label are relatively close, and the numerical characteristics of heterogeneous features are farther apart, while the similar features and heterogeneous features of motion features that have no significant correlation with the label do not have the aforementioned characteristics.
[0137] Based on the findings in the previous paragraph, the embodiments of the present disclosure can determine the correlation score between each motion feature and the label by whether the similar features and heterogeneous features have typical clustering characteristics. Specifically, in order to make the final correlation score typical and reliable, it is necessary to randomly select multiple target samples in the sample data set, and then for each target sample, determine the M adjacent samples in the positive sample that are closest to each target sample in a motion feature dimension, and determine the N adjacent samples in the negative sample that are closest to each target sample in a motion feature dimension. The aforementioned M and N can be the same or different, and the embodiments of the present disclosure do not limit this. In practical applications, M and N can be 1 or a positive integer greater than 1.
[0138] S230: Calculate a first average distance between the target sample and the nearest N adjacent positive samples in a motion feature dimension, and calculate a second average distance between the target sample and the nearest N adjacent negative samples in a motion feature dimension, calculate a distance difference between the first average distance and the second average distance, and determine a second correlation score of a motion feature according to the distance difference.
[0139] Calculating the first average distance between the target sample and the nearest M adjacent positive samples in a motion feature dimension is to calculate the distance between the nearest M adjacent samples in a motion feature dimension and the target sample in a motion feature dimension, and then taking the average of the aforementioned distances to obtain the first average distance.
[0140] Similarly, calculating the first average distance between the target sample and the nearest M adjacent negative samples in a motion feature dimension is to calculate the distance between the nearest M adjacent samples in a motion feature dimension and the target sample in a motion feature dimension, and then taking the average of the aforementioned distances to obtain the first average distance.
[0141] After obtaining the first average distance and the second average distance, the distance difference between the first average distance and the second average distance may be calculated. After obtaining the distance difference, the computing device may determine a second correlation score of a motion feature based on the distance differences corresponding to all target samples in the following manner:
[0142] When the distance difference is a positive value, the initial weight is adjusted down to obtain a corresponding reduced weight; and when the distance difference is a negative value, the initial weight is adjusted up to obtain a corresponding increased weight; the average value of all reduced weights and increased weights is calculated as a second correlation score of a motion feature. The aforementioned initial weight can be 0 or a value greater than 0.
[0143] S240: Perform a weighted summation of the first correlation score and the second correlation score corresponding to each motion feature to obtain a comprehensive score corresponding to each motion feature.
[0144] The above method based on machine learning model correlation analysis and the method based on feature proximity analysis are used to determine the first correlation score and the second correlation score of each motion feature. Then, the first correlation score and the second correlation score can be weighted and summed to obtain the comprehensive score corresponding to each motion feature.
[0145] In some embodiments, in order to achieve better data comparison and thus make weight setting simpler, the computing device can normalize the first correlation score and the second correlation score respectively to obtain a first normalized score and a second normalized score, and then perform weighted summation based on the first normalized score and the second normalized score to obtain a comprehensive score corresponding to each motion feature.
[0146] Specifically, the computing device may use the formula Calculate the comprehensive score W mix,f , where w RFscore and w MLscore is a predetermined weight, RFscore f The first relevance score of the f-th motion feature, RFscore min is the minimum value of the first relevance score of all motion features, RFscore max is the maximum value of the first correlation score of all motion features, MLscore f The second correlation score of the f-th motion feature, MLscore min is the minimum value of the second correlation score of all motion features, MLscore max is the maximum value of the second correlation scores of all motion features.
[0147] S250: Determine a target motion feature for characterizing the current target lower limb motion state based on the comprehensive scores corresponding to the various motion features.
[0148] After obtaining the comprehensive scores corresponding to each motion feature, the computing device can sort the comprehensive scores by size, and then determine the sorting order corresponding to each motion feature. After determining the sorting order, the target motion feature used to characterize the current target lower limb motion state can be determined according to the sorting order and the predetermined selection criteria. For example, in some applications, the predetermined selection criteria is to select the first L motion features in the sorting order, and the first L motion features are used as the target motion features of the target lower limb motion state.
[0149] As previously analyzed, the disclosed embodiment scheme adopts a machine learning-based method to determine the first correlation score of each motion feature, adopts a clustering-based method to determine the second correlation score of each motion feature, and then weights and sums the first correlation score and the second correlation score to determine the comprehensive score of each motion feature, and determines the target motion feature that characterizes the motion state of the target lower limb based on the comprehensive score of each motion feature. The aforementioned method determines the comprehensive score of each motion by combining different correlation analysis methods, so that the scoring result of the comprehensive score is more in line with the actual situation, thereby making the target motion feature finally selected more reasonable.
[0150] In other embodiments, the aforementioned method for determining the first correlation score or the second correlation score may also be used to directly determine the target motion feature characterizing the current target lower limb motion state.
[0151] In practical applications, some motion features are correlated (e.g., linear positive correlation). If all the aforementioned motion features with correlation are used for model training, not only will there be too many motion features in the subsequent model training, but it may also cause the fitting to deteriorate during model training. Therefore, in the process of determining the target motion features based on the comprehensive score of the motion features, some motion features with correlation need to be removed. In some embodiments, the method for determining the target motion features based on the comprehensive score may include the following S261-S263.
[0152] S261: Determine the motion features to be selected based on the comprehensive scores corresponding to the various motion features.
[0153] The motion features to be selected are determined according to the comprehensive scores corresponding to the various motion features. The comprehensive scores of the various motion features may be sorted, and a preset number of motion features that are ranked first are used as the motion features to be selected.
[0154] S262: performing pairwise correlation analysis on the motion features to be selected, determining irrelevant motion features and relevant motion features, and determining selected relevant motion features among the relevant motion features.
[0155] In a specific implementation, the computing device may use a Pearson correlation coefficient analysis method to perform a pairwise correlation analysis on the selected motion features to obtain pairwise correlation coefficients of the selected motion features. The Pearson correlation coefficient r is calculated, where A and B are feature vectors constructed using a motion feature in the sample data set, and N is the length of the feature vector.
[0156] After calculating the pairwise correlation coefficients representing each of the motion features to be selected, the pairwise correlation coefficients can be compared with a preset correlation threshold. If the pairwise correlation coefficients are greater than the correlation threshold, the two motion features to be selected are determined to be related motion features, otherwise the two motion features to be selected are irrelevant features. In the case where the two motion features to be selected are determined to be related motion features, the motion feature to be selected with a better comprehensive score can be selected as the selected related motion feature.
[0157] S263: After determining the irrelevant motion features and selecting the relevant motion features, both of them can be used as target motion features.
[0158] In some embodiments, the method for determining target motion characteristics based on the comprehensive score may include the following S264-S265.
[0159] S264: performing pairwise correlation analysis based on the motion features, determining irrelevant motion features and relevant motion features, and determining selected relevant motion features among the relevant motion features.
[0160] Different from the above S261-S263, this embodiment first performs a pairwise correlation analysis on each motion feature to determine irrelevant motion features and selected relevant motion features among relevant motion features. In a specific implementation, the same method as the above S162 can be used to perform a correlation analysis to determine irrelevant motion features and relevant motion features, thereby obtaining irrelevant motion features and selected relevant motion features.
[0161] S265: Determine the target motion feature from the irrelevant motion features and the selected relevant motion features according to the comprehensive scores of the irrelevant motion features and the selected relevant motion features.
[0162] After determining irrelevant motion features and selecting relevant motion features, the aforementioned motion features may be sorted according to their comprehensive scores to determine a sorting order, and the motion features ranked first may be used as target motion features.
[0163] In the above text, S130 only mentions training the binary classification model corresponding to the current target lower limb motion state i, but does not mention the specific type of the binary classification model used. The following is an analysis of how to determine the specific type of the binary classification model corresponding to the current target lower limb state. In some embodiments, the computing device can use the following S131-S132 to determine the binary classification model corresponding to the current target lower limb motion state.
[0164] S131: training various types of binary classification models corresponding to the current target lower limb motion state respectively, obtaining model parameters of various types of binary classification models, and determining model quality scores of various types of binary classification models.
[0165] The binary classification model corresponding to the current target lower limb motion state may be a binary classification model such as a logistic regression model as analyzed above. In practical applications, the computing device may train the aforementioned various types of binary classification models according to the training method of the corresponding binary classification model, and after the training, sample evaluation sample data may be collected to score the model quality of the various binary classification models. The aforementioned model quality score may be obtained by evaluating at least one of accuracy, precision, recall rate, F1 score, area under the receiver operating characteristic curve, training time, etc.
[0166] S132: Selecting the binary classification model with the best model quality score as the selected binary classification model corresponding to the current target lower limb movement state.
[0167] After obtaining the model quality scores of various types of binary classification models, the computing device may select the binary classification model with the best model quality score as the selected binary classification model corresponding to the current target lower limb state.
[0168] In practical applications, in order to reduce the impact of target feature selection on the model quality scores of each binary classification model, the corresponding binary classification model can be used to determine the corresponding target motion features according to S210-S260 in the previous text, and then all the corresponding target motion features are used to train this type of binary classification model, and the corresponding target motion features are used to determine the model quality scores of each binary classification model.
[0169] In addition to providing the aforementioned lower limb motion state recognition model training method, the embodiment of the present disclosure also provides a lower limb motion state recognition method. Figure 5 is a flow chart of the method for identifying the lower limb movement state provided by the embodiment of the present disclosure. Figure 5 As shown, the lower limb motion state recognition method provided by the embodiment of the present disclosure includes S310-S330. The binary classification models and result decision models used in the lower limb motion recognition method of the embodiment of the present disclosure are the models obtained by the previous training.
[0170] S310: Determine corresponding motion characteristics based on the lower limb motion inertial measurement signal collected in real time.
[0171] In the disclosed embodiment, the steps in the model training method mentioned above can be used to perform sliding window sampling on the collected lower limb movement inertial measurement signals to obtain the corresponding kinematic feature sequence, and the kinematic feature sequence is processed to obtain the motion features. The analysis will not be expanded here, and the specific content can be found in the above analysis.
[0172] S320: According to the predetermined sorting order of the binary classification models of lower limb motion states, the binary classification models corresponding to each lower limb motion state are used in turn to process the motion features to obtain corresponding binary classification results, wherein the binary classification model corresponding to the later lower limb motion state simultaneously processes the motion features and the previous binary classification results to obtain the corresponding later binary classification results, and the previous binary classification results are the classification results obtained by processing the motion features with the binary classification model of the previous lower limb motion state.
[0173] After obtaining the aforementioned motion features, the computing device determines the sorting order corresponding to each lower limb motion state binary classification model in accordance with the aforementioned text, and sequentially uses the corresponding binary classification model to process the motion features to obtain all binary classification results. As in the previous model training process, the binary classification results and motion features obtained by the previous binary classification model are used as inputs to the subsequent binary classification model until the binary classification results of all binary classification models are obtained.
[0174] S330: Input the binary classification results corresponding to all lower limb movement states into the result decision model to obtain the identified lower limb movement state.
[0175] After obtaining the binary classification results output by all binary classification models, the computing device then inputs all the binary classification results into the result decision model to obtain the identified lower limb movement state.
[0176] In some embodiments, for each lower limb motion binary classification model, the computing device does not use all motion features as model input features, but instead uses the selected motion features used in the previous model training method as model input to obtain the corresponding binary classification results.
[0177] In some embodiments, when the lower limb movement state is a continuous movement state, the computing device will also use the aforementioned model training method to temporarily store the historical binary classification results obtained by processing the previous movement features, and input the historical binary classification results into the subsequent binary classification model to obtain the subsequent binary classification results.
[0178] The embodiment of the present disclosure also provides a computing device for implementing the aforementioned method. Figure 6 Schematic diagram of the structure of the computing device provided by the embodiment of the present disclosure. Figure 6 , which shows a schematic diagram of the structure of a computing device 600 suitable for implementing the embodiments of the present disclosure. Figure 6 The computing device shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present disclosure.
[0179] like Figure 6As shown, the computing device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory ROM 602 or a program loaded from a storage device 608 to a random access memory RAM 603. Various programs and data required for the operation of the computing device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output I / O interface 605 is also connected to the bus 604.
[0180] Typically, the following devices may be connected to the I / O interface 605: input devices 605 including, for example, a touch screen, a touch pad, a camera, a microphone, etc.; output devices 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 608 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 609. The communication devices 609 may allow the computing device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The computing device 600 is shown with various devices, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0181] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0182] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable storage medium, a computer-readable signal medium, or any combination of the above two.
[0183] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0184] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program codes. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0185] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText TraNsferProtocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0186] The computer-readable medium may be included in the computing device, or may exist independently without being incorporated into the computing device.
[0187] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, SMalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the tester computer, partially on the tester computer, as a separate software package, partially on the tester computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the tester computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0188] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system based on hardware that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0189] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The name of the unit does not, in some cases, constitute a limitation on the unit itself. The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0190] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for training a lower limb motion state recognition model, characterized in that: The lower limb movement state recognition model includes a binary classification model and a result decision model corresponding to various lower limb movement states; the method includes: Determine the corresponding motion features based on the inertial measurement signals collected during various lower limb motion states, use the lower limb motion states as labels of sample data and the corresponding motion features to form sample data, and use the sample data to construct a sample data set; Determine the sorting order of the binary classification models corresponding to various lower limb motion states, and train the binary classification models corresponding to each lower limb motion state in sequence according to the sorting order as follows S1-S2, until the model parameters of the binary classification models corresponding to all lower limb motion states are obtained and the sample data are processed respectively to obtain the binary classification results: S1: Obtain the first binary classification result obtained by processing the motion features with the binary classification model corresponding to the lower limb motion state in the previous order; S2: taking the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample, taking the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results as the input features of the negative sample, training the binary classification model corresponding to the current target lower limb motion state, and obtaining the model parameters of the binary classification model corresponding to the current target lower limb motion state and the current classification results of each sample data; The result decision model is trained according to the binary classification results obtained by processing the sample data with the binary classification model corresponding to all lower limb movement states and the lower limb movement state labels of the sample data to determine the model parameters of the result decision model.
2. The training method according to claim 1, characterized in that: The step of determining the sorting order of the binary classification models corresponding to various lower limb movement states includes: For sample data of various lower limb motion states, determine the correlation score between each motion feature and the label, and select a preset number of selected related features with a high correlation with the sample data label from the motion features according to the correlation score; For the sample data of various lower limb movement states, preliminary regression analysis is performed based on the corresponding selected relevant features and labels to determine the regression analysis accuracy results corresponding to each movement state; The order of the regression analysis accuracy results from best to worst is used as the sorting order of the binary classification models corresponding to various lower limb movement states.
3. The training method according to claim 1, characterized in that: The inertial measurement signals collected based on various lower limb motion states respectively determine corresponding motion features, including: According to a preset sliding time window and sliding window frequency, sliding window sampling is performed on the inertial measurement signals collected during various lower limb movement states to obtain a kinematic feature sequence sorted within the sliding time window and a sorting identifier of the kinematic feature sequence; Determine the motion feature based on the kinematic feature sequence, and use the sorting identifier of the kinematic feature sequence as the sorting identifier of the sample data; In the case where the lower limb movement state ranked first is a continuous state, the method further includes: obtaining, according to the ranking identifier of each sample data, a previous historical binary classification result obtained by processing the previous sample data with a binary classification model corresponding to the lower limb movement state ranked first; The method of using the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample includes: using the motion features in the sample data corresponding to the current target lower limb motion state, the corresponding previous binary classification results, and the corresponding previous historical binary classification results as the input features of the positive sample; The method of using the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous two-classification results as the input features of the negative sample includes: using the motion features in the sample data corresponding to the non-current target lower limb motion state, the corresponding previous two-classification results, and the corresponding previous historical two-classification results as the input features of the negative sample.
4. The training method according to any one of claims 1 to 3, characterized in that: Before training the binary classification model corresponding to the current target lower limb motion state, the method further includes: Using a machine learning model to perform a correlation analysis based on the label of the sample data and a motion feature to determine a first correlation score between various motion features and the current target lower limb motion state; Randomly select multiple target samples in the sample data set, and determine N adjacent positive samples in the positive samples that are closest to each of the target samples in a motion feature dimension, and determine N adjacent negative samples in the negative samples that are closest to each of the target samples in the motion feature dimension; Calculating a first average distance between the target sample and the nearest N adjacent positive samples in the one motion feature dimension, and calculating a second average distance between the target sample and the nearest N adjacent negative samples in the one motion feature dimension, calculating a distance difference between the first average distance and the second average distance, and determining a second correlation score of the one motion feature according to the distance difference; Taking a weighted sum of the first correlation score and the second correlation score corresponding to each motion feature to obtain a comprehensive score corresponding to each motion feature; Based on the comprehensive scores corresponding to the various motion features, a target motion feature for characterizing the current target lower limb motion state is determined; The method uses the motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results as the input features of the positive sample, uses the motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results as the input features of the negative sample, and trains the binary classification model corresponding to the current target lower limb motion state, including: The target motion features in the sample data corresponding to the current target lower limb motion state and the corresponding previous binary classification results are used as the input features of the positive sample, and the target motion features in the sample data corresponding to the non-current target lower limb motion state and the corresponding previous binary classification results are used as the input features of the negative sample, and the binary classification model corresponding to the current target lower limb motion state is trained.
5. The training method according to claim 4, characterized in that: The determining a second correlation score of the one motion feature according to the distance difference includes: When the distance difference is a positive value, a reduction process is performed on the basis of the initial weight to obtain a corresponding reduced weight; and When the distance difference is a negative value, the initial weight is adjusted up to obtain a corresponding increased weight; An average value of all the decreased weights and the increased weight is calculated as a second correlation score of the one motion feature.
6. The training method according to claim 4, characterized in that: The target motion feature for characterizing the current target lower limb motion state is determined based on the comprehensive score corresponding to each motion feature, including: Determine the motion features to be selected based on the comprehensive scores corresponding to the various motion features; Performing correlation on the motion features to be selected, determining irrelevant motion features and relevant motion features, and determining selected relevant motion features from the relevant motion features; using the irrelevant motion features and the selected relevant motion features as target motion features characterizing the motion state of the target lower limb; or, Performing pairwise correlation analysis on each motion feature to determine irrelevant motion features and relevant motion features, and determining selected relevant motion features among the relevant motion features; The target motion feature is determined from among the irrelevant motion features and the selected relevant motion features according to the comprehensive scores of the irrelevant motion features and the selected relevant motion features.
7. The training method according to claim 4, characterized in that: The machine learning model is used to perform correlation analysis based on the label of the sample data and a motion feature to determine a first correlation score between various motion features and the current target lower limb motion state, including: Using a logistic regression model, performing correlation analysis based on the label of the sample data and the one motion feature, determining a characteristic coefficient corresponding to the one motion feature in the logistic regression model, and using the absolute value of the characteristic coefficient as a first correlation score between the one motion feature and the current target lower limb motion state; or, Using a Gaussian Naive Bayes model, a correlation analysis is performed based on the label of the sample data and the one motion feature, and the standard deviation under the current target lower limb motion state and the non-current target lower limb motion state is determined respectively; The average value of the standard deviation of the current lower limb state and the non-current lower limb state corresponding to the one motion feature is calculated as the first correlation score between the one motion feature and the current target lower limb motion state.
8. The training method according to any one of claims 1 to 3, characterized in that: The binary classification model corresponding to the current target lower limb motion state is trained to obtain the model parameters of the binary classification model corresponding to the current target lower limb motion state and the current classification results of each sample data, including: training various types of binary classification models corresponding to the current target lower limb motion state respectively to obtain the model parameters of various types of binary classification models, and determining the model quality scores of various types of binary classification models; The binary classification model with the best model quality score is selected as the selected binary classification model corresponding to the current target lower limb movement state, and the current classification result corresponding to the selected binary classification model is obtained.
9. A method for identifying lower limb movement status, characterized in that: include: Determine corresponding motion characteristics based on lower limb motion inertial measurement signals acquired in real time; According to the predetermined sorting order of the binary classification models of the lower limb motion states, the binary classification models corresponding to the respective lower limb motion states are used in turn to process the motion features to obtain corresponding binary classification results, wherein the binary classification model corresponding to the latter lower limb motion state simultaneously processes the motion features and the former binary classification results to obtain the corresponding latter binary classification results, and the former binary classification results are the classification results obtained by processing the motion features by the former lower limb motion state binary classification model; Input the binary classification results corresponding to all lower limb movement states into the result decision model to obtain the identified lower limb movement states; Among them, each lower limb movement state binary classification model and the result decision model are obtained using the training method described in claims 1-8.
10. A computing device, characterized in that It includes a processor and a memory, wherein the memory is used to store a computer program; when the computer program is loaded by the processor, the processor executes the lower limb movement state recognition model training method as described in any one of claims 1 to 8 and / or the lower limb movement state recognition method as described in claim 9.
Citation Information
Patent Citations
Identification method and device of motion states
CN107015646A
Motion intention recognition device for lower extremity exoskeletons and method thereof
CN110141239A
Composite signal modulation identification method based on cascade SVM and all-digital receiver
CN111245756A
Gait motion mode recognition method and model establishment method
CN112926390A
Underwater robot human body lower limb motion prediction method and system, medium and equipment
CN114879499A