Action feature acquisition methods, devices, electronic equipment and storage media

By utilizing the gradient information of a neural network model to determine the evaluation parameters of action features, the problem of low accuracy in existing feature extraction methods is solved. This enables the selection of the most valuable features from a large number of action features, thereby improving the accuracy of action feature acquisition.

CN118675006BActive Publication Date: 2026-01-30BEIJING SPORT UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410700494.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2026-01-30
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing feature extraction methods have low feature accuracy and fail to include more important features, resulting in inaccurate acquisition of action features.

Method used

The evaluation parameters of action features are determined by the gradient information of the trained neural network model. Based on the evaluation parameters, feature selection is performed to select the most valuable features from a large number of action features.

Benefits of technology

It improves the accuracy of action feature acquisition, enabling the selection of the most valuable features from a large number of features, thus improving the precision of feature acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675006B_ABST
    Figure CN118675006B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, electronic device, and storage medium for acquiring action features. The method includes: acquiring an initial feature set, the initial feature set comprising multiple action features related to a time-series task; inputting the initial feature set into a trained neural network model, determining evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model; and performing feature selection based on the evaluation parameters corresponding to each action feature to obtain a target feature subset. This method enables the selection of the most valuable action features from a large number of action features, improving the accuracy of action feature acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motion recognition technology, and in particular to a method, apparatus, electronic device, and storage medium for acquiring motion features. Background Technology

[0002] Feature engineering includes feature extraction and feature selection. Feature extraction involves further extracting features with physical or statistical significance from raw data or raw features. These features have a higher degree of abstraction, which can help subsequent research and more easily express the characteristics of the data. Feature selection, also known as feature subset selection, refers to selecting a small subset of features from an existing feature set to reduce its dimensionality and improve the performance of the algorithm.

[0003] Existing feature extraction methods typically extract features in both the time and frequency domains. Time-domain features are mostly means, variances, and standard deviations, while frequency-domain features are mostly extracted using Fourier transforms or wavelet transforms. However, existing feature extraction methods only extract a subset of features and do not include more important features, resulting in low extraction accuracy. Summary of the Invention

[0004] This invention provides a feature extraction method to address the shortcomings of low extraction accuracy in existing feature extraction methods. By determining the evaluation parameters corresponding to action features through the gradient information of a trained neural network model, and performing feature selection based on the evaluation parameters, the most valuable action features can be selected from a large number of action features, thereby improving the accuracy of action feature acquisition.

[0005] This invention provides a method for obtaining action features, comprising the following steps:

[0006] Obtain an initial feature set, which includes multiple action features related to the time series task;

[0007] When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0008] Feature selection is performed based on the evaluation parameters corresponding to each action feature to obtain a target feature subset, wherein the number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0009] According to a feature extraction method provided by the present invention, determining the evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model includes:

[0010] Obtain the gradient information corresponding to each action feature, wherein the gradient information corresponding to each action feature is the gradient information of the loss function of the trained neural network model with respect to the input of each action feature;

[0011] The evaluation parameters corresponding to each action feature are determined based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set.

[0012] According to a feature extraction method provided by the present invention, the gradient information corresponding to each action feature includes the absolute value of the gradient corresponding to each action feature. The step of determining the evaluation parameter corresponding to each action feature based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set includes: calculating the proportion of the absolute value of the gradient corresponding to each action feature in the absolute values ​​of the gradients corresponding to all action features to obtain the weight corresponding to each action feature, and the weight corresponding to each action feature is the evaluation parameter corresponding to each action feature.

[0013] The step of selecting features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset includes: determining the target feature subset according to the weight of each action feature.

[0014] According to a feature extraction method provided by the present invention, before performing feature selection based on the evaluation parameters corresponding to each action feature to obtain a target feature subset, the method further includes:

[0015] Obtain the parameter threshold corresponding to the evaluation parameter;

[0016] The step of selecting features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset includes: obtaining a target feature subset based on the evaluation parameters corresponding to each action feature and the parameter threshold corresponding to the evaluation parameters, wherein the parameter value indicated by the evaluation parameters corresponding to each action feature included in the target feature subset is greater than the parameter threshold.

[0017] According to a feature extraction method provided by the present invention, before determining the evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model, the method further includes: determining the trained neural network model and / or the preset feature set based on the target evaluation result, wherein the target evaluation result is obtained by evaluating the classification accuracy of the candidate feature subset obtained in the previous round of feature selection.

[0018] According to a feature extraction method provided by the present invention, determining the trained neural network model and / or the preset feature set based on the target evaluation result includes:

[0019] If the ability to distinguish feature categories indicated by the classification accuracy is lower than the capability parameter threshold, then the trained neural network is replaced, or the trained neural network is retrained, or the preset feature set is replaced.

[0020] If the ability to distinguish feature categories indicated by the classification accuracy is greater than or equal to the capability parameter threshold, and the number of action features included in the candidate feature subset is greater than the number threshold, then the candidate feature subset is determined to be a preset feature set.

[0021] According to a feature extraction method provided by the present invention, the preset feature set includes action features that are some or all of the action features in the initial feature set.

[0022] According to a feature extraction method provided by the present invention, obtaining an initial feature set includes:

[0023] Acquire a motion dataset, which includes motion data collected via an accelerometer;

[0024] The initial feature set is obtained by using a time-series data feature extraction tool to extract features from the action dataset.

[0025] The present invention also provides a motion feature acquisition device, comprising the following modules:

[0026] An initial feature acquisition module is used to acquire an initial feature set, which includes multiple action features related to the time series task.

[0027] The evaluation parameter acquisition module is used to determine the evaluation parameter corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model when the initial feature set is input into the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0028] The feature acquisition module is used to select features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset. The number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0029] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-described motion feature acquisition methods.

[0030] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the action feature acquisition method described above.

[0031] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described motion feature acquisition methods.

[0032] The motion feature acquisition method, device, electronic device, and storage medium provided by this invention determine the evaluation parameters corresponding to the motion features by using the gradient information of a trained neural network model, and perform feature selection based on the evaluation parameters, thereby selecting the most valuable motion features from a large number of motion features and improving the accuracy of motion feature acquisition. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0034] Figure 1 This is one of the flowcharts illustrating the motion feature acquisition method provided by the present invention.

[0035] Figure 2 This is one of the flowcharts illustrating the method for obtaining evaluation parameters provided by the present invention.

[0036] Figure 3 This is the second flowchart illustrating the method for obtaining evaluation parameters provided by this invention.

[0037] Figure 4 The second flowchart of the motion feature acquisition method provided by this invention.

[0038] Figure 5This is the third flowchart of the motion feature acquisition method provided by the present invention.

[0039] Figure 6 This is a scene diagram illustrating the motion feature acquisition method provided by the present invention.

[0040] Figure 7 This is a schematic diagram of the motion feature acquisition device provided by the present invention.

[0041] Figure 8 This is a schematic diagram of the physical structure of the electronic device that complies with the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0043] Feature engineering includes feature extraction and feature selection. Feature extraction involves further extracting features with physical or statistical significance from raw data or raw features. These features have a higher degree of abstraction, which can help subsequent research and more easily express the characteristics of the data. Feature selection, also known as feature subset selection, refers to selecting a small subset of features from an existing feature set to reduce its dimensionality and improve the performance of the algorithm.

[0044] Existing feature extraction methods typically extract features in both the time and frequency domains. Time-domain features are mostly means, variances, and standard deviations, while frequency-domain features are mostly extracted using Fourier transforms or wavelet transforms. However, existing feature extraction methods only extract a subset of features and do not include more important features, resulting in low extraction accuracy.

[0045] In view of this, embodiments of the present invention provide a method for obtaining action features, including obtaining an initial feature set, the initial feature set including multiple action features related to a time series task; inputting the initial feature set into a trained neural network model, determining an evaluation parameter corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model; and performing feature selection based on the evaluation parameter corresponding to each action feature to obtain a target feature subset. This method can select the most valuable features from a large number of action features, improving the accuracy of action feature acquisition.

[0046] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0047] Figure 1 This is one of the flowcharts illustrating the motion feature acquisition method provided by this invention. For example... Figure 1 As shown, the method includes the following steps 101 to 103.

[0048] Step 101: Obtain an initial feature set, which includes multiple action features related to the time series task.

[0049] It should be noted that the initial feature set includes a large number of action features, which can be features related to the time series task obtained through feature extraction, or features related to the time series task sent by other devices. This invention does not limit the method of obtaining the initial feature set. The multiple action features related to the time series task refer to specific data attributes or metrics that need to be considered or utilized when performing time series analysis or prediction. These features can directly serve to solve specific tasks such as time series prediction, classification, and clustering. For example, the features in the initial feature set can be features obtained after feature extraction based on the time series task.

[0050] Step 102: When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0051] It should be noted that since neural networks are optimized using the gradient descent algorithm, their feature extraction and selection capabilities also improve along with the optimization process of gradient descent. The solution of this invention analyzes the gradient information of the neural network model to understand the evaluation parameters of the neural network model for different input features, that is, to determine the importance of action features. This allows us to understand which input information the neural network model values ​​more during classification. If this input information itself consists of features such as mean, variance, Fourier coefficients, wavelet coefficients, etc., then this method can explore which input features the neural network values ​​more and which input features it considers relatively unimportant. In other words, the neural network can be used for feature selection of the input features. This analytical approach can also be called attribution technique.

[0052] There are many ways to determine the evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model. For example, the feature weights or feature coefficients can be determined based on the gradient information. This invention does not limit the method of determining the evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model. The trained neural network model can be trained using a preset feature set, which may include multiple action features. The features in the preset feature set can be a large number of manually extracted relevant features, or features from the initial feature set, etc. This invention does not limit the content of the action features included in the preset feature set.

[0053] In some embodiments, the action features included in the preset feature set may be some or all of the action features in the initial feature set.

[0054] It should be noted that, since the purpose of this invention is to perform feature selection on the initial feature set, and to train the initial neural network model using some or all of the features of the initial feature set to obtain a trained neural network model, and then to perform feature selection on the features of the initial feature set to obtain more important or more valuable features.

[0055] Step 103: Select features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset. The number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0056] It should be noted that there are many ways to select features based on the evaluation parameters corresponding to each action feature. For example, the magnitude of the evaluation parameters can be compared, or the target feature subset can be determined based on the relationship between the evaluation parameters and a threshold. This invention does not limit the method of selecting features based on the evaluation parameters corresponding to each action feature to obtain the target feature subset. It is understood that after feature selection, the number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0057] The method provided in this invention utilizes a trained neural network model to obtain evaluation parameters for action features based on the gradient information of each feature. Feature selection is then performed based on these evaluation parameters, minimizing the reliance on prior knowledge. By using the neural network to analyze which features are more important to the task objective, this approach leverages the complexity of neural networks to explore causes through results, uncovering features with unknown causal relationships in prior knowledge. This method achieves the selection of the most valuable features from a large number of features, improving the accuracy of action feature acquisition. Furthermore, traditional feature selection methods are difficult to implement for a large number of features; the feature selection method for time-series tasks based on a neural network model proposed in this invention has significant advantages.

[0058] It is understandable that neural network models extract and select features from input data through multiple hidden layers. However, because deep neural networks are driven by large amounts of data and optimize the model through backpropagation, their interpretability is poor. Therefore, it is currently difficult to understand the specific feature extraction mechanism of neural network models during the recognition process. Furthermore, features extracted by neural networks often lack practical statistical or physical significance. Although these features usually outperform manually extracted features in completing subsequent tasks when the amount of data and model complexity are matched, humans cannot understand the specific meaning of these features. Therefore, this invention does not directly employ feature selection through neural network models.

[0059] In some embodiments, the initial feature set may be extracted from the dataset.

[0060] In this embodiment of the invention, obtaining the initial feature set may include: obtaining an action dataset, the action dataset including action data collected by an accelerometer; and extracting features from the action dataset using a time-series data feature extraction tool to obtain the initial feature set.

[0061] It should be noted that the motion dataset can be motion data collected by an accelerometer. This invention can use a time-series data feature extraction tool to extract features from the motion dataset to obtain the initial feature set. The time-series data feature extraction tool may include tools such as tsfresh.

[0062] For example, this invention can use tsfresh for feature extraction to obtain a large number of features relevant to the time series task, which can then be further selected. tsfresh is a Python library for feature extraction, particularly suitable for time series data. Compared to traditional feature extraction methods, this approach can consider more relevant features and may discover features that are difficult to obtain using traditional methods. Because tsfresh extracts a wider range of features, encompassing almost all the common features that can be extracted manually from time series data, further feature selection may yield even more important features.

[0063] In some embodiments, the gradient information may include gradient information corresponding to each action feature. The present invention can determine the evaluation parameters corresponding to each action feature by using the gradient information corresponding to each action feature.

[0064] Figure 2 This is one of the flowcharts illustrating the method for obtaining evaluation parameters provided by this invention. For example... Figure 2 As shown, determining the evaluation parameters corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model may include the following steps 201 to 202.

[0065] Step 201: Obtain the gradient information corresponding to each action feature. The gradient information corresponding to each action feature is the gradient information of the loss function of the trained neural network model with respect to the input of each action feature.

[0066] It's important to note that during model training, gradients are calculated on the model's parameters to update the model. However, when using attribution techniques for feature selection, the model has already been trained, so calculating the gradients of the model's parameters is unnecessary; instead, the gradients of the model's inputs are calculated. For most deep learning tasks, since the output loss is often a scalar while the input dimension is high, calculating the same result using the backpropagation method requires less computation than the forward method. Therefore, deep learning frameworks typically use the backpropagation method for gradient calculation. Since neural network models are optimized based on a loss function, using the gradient of the input using the loss function is more representative. The method for obtaining the gradient information corresponding to each action feature can employ the backpropagation algorithm.

[0067] For example, PyTorch's automatic differentiation generates a computation graph through tensor operations during forward propagation, and then uses the computation graph to perform chain rule differentiation to obtain the gradient during backpropagation. It's important to note that PyTorch accumulates gradients by default; previously calculated gradients are added to the current gradient. Therefore, you should set the gradient to zero before calculating it. Gradient calculations should be canceled when not needed to reduce memory usage and unnecessary computation.

[0068] Step 202: Determine the evaluation parameters corresponding to each action feature based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set.

[0069] It should be noted that there are many ways to determine the evaluation parameters corresponding to each action feature based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set. For example, the evaluation parameters corresponding to each action feature can be determined based on the magnitude, position, and proportion of the gradient information corresponding to each action feature among the gradient information corresponding to all action features. This invention does not limit the method of determining the evaluation parameters corresponding to each action feature based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set.

[0070] It should be noted that by obtaining the gradient information of the loss function of the trained neural network model for each input action feature, and determining the evaluation parameters based on the features corresponding to each action feature and the gradient information corresponding to all action features, the importance of each action feature can be accurately obtained, thereby enabling accurate feature selection.

[0071] In some embodiments, evaluation parameters can be obtained by the absolute value of the gradient corresponding to each action feature.

[0072] Figure 3 This is the second flowchart illustrating the method for obtaining evaluation parameters provided by this invention. For example... Figure 3 As shown, the gradient information includes the absolute value of the gradient, and obtaining the gradient information corresponding to each action feature may include:

[0073] Step 301: Calculate the absolute value of the gradient of the loss function of the trained neural network model with respect to each of the input action features.

[0074] It should be noted that the description of step 301 can be the same as the description of step 201 in the aforementioned embodiments, and will not be repeated here.

[0075] Step 302: Calculate the proportion of the absolute gradient value corresponding to each action feature in the absolute gradient values ​​corresponding to all action features, and obtain the weight corresponding to each action feature. The weight corresponding to each action feature is the evaluation parameter corresponding to each action feature.

[0076] For example, by using a trained neural network model, the absolute values ​​of the gradients of the loss function with respect to the input features on all data are summed and normalized to obtain the weight corresponding to each action feature. This weight reflects the importance of each feature to the neural network model in completing the recognition task.

[0077] It's important to note that when calculating gradients, the absolute value of the gradient for each action feature needs to be taken. For any given feature, regardless of whether the gradient is positive or negative, a larger absolute value indicates a greater impact on the result, meaning the feature is relatively more important. Conversely, a gradient closer to zero indicates a smaller impact, making it more likely to be a feature to be removed. This invention also attempted to calculate the gradient of the input features using the output corresponding to the model's predicted category, but the results were unsatisfactory. Since the loss function used is the multi-class cross-entropy loss, which describes the difference between the data distribution and the model's predicted distribution, and the model is optimized based on the loss function, using the gradient of the input using the loss function is more representative. Determining the evaluation parameters using the above method can improve the accuracy of feature selection.

[0078] Furthermore, the step of selecting features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset may include: determining the target feature subset according to the weight of each action feature.

[0079] For example, there are many ways to determine the target feature subset according to the weight of each action feature. For example, it can be to start from the largest weight and select the 50 largest features to form the target feature subset, or it can be to select half of the features with the largest weight to form the target feature subset. This invention does not limit the way of determining the target feature subset according to the weight of each action feature.

[0080] One immediate approach is to determine the target feature subset based on the weights, which is simple and convenient and can further improve the efficiency of feature extraction.

[0081] In some embodiments, after determining the evaluation parameters, a threshold for the evaluation parameters can also be determined, and feature selection can be performed based on the threshold of the evaluation parameters.

[0082] Figure 4 This is the second flowchart illustrating the motion feature acquisition method provided by this invention. For example... Figure 4As shown, the action feature acquisition method may include the following steps:

[0083] Step 401: Obtain an initial feature set, which includes multiple action features related to the time series task.

[0084] It should be noted that the description of step 401 can be found in the description of step 101 in the foregoing embodiments, and will not be repeated here.

[0085] Step 402: When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0086] It should be noted that the description of step 402 can be found in the description of step 102 in the previous embodiment, and will not be repeated here.

[0087] Step 403: Obtain the parameter threshold corresponding to the evaluation parameter.

[0088] It should be noted that there are many ways to obtain the parameter threshold corresponding to the evaluation parameter. For example, the parameter threshold for selecting features can be determined by other machine learning algorithms, the parameter threshold can be customized, or the parameter threshold can be received from other devices. This invention does not limit the method of obtaining the parameter threshold corresponding to the evaluation parameter.

[0089] Step 404: Based on the evaluation parameters corresponding to each action feature and the parameter threshold corresponding to the evaluation parameters, a target feature subset is obtained, wherein the parameter value indicated by the evaluation parameters corresponding to each action feature included in the target feature subset is greater than the parameter threshold.

[0090] It should be noted that after obtaining the parameter threshold, features whose parameter values ​​indicated by the evaluation parameters are greater than the parameter threshold can be selected as values ​​in the target feature subset.

[0091] Understandably, selecting features by using evaluation parameters and their thresholds allows for simple and convenient feature selection, thus accelerating the efficiency of feature selection.

[0092] For example, to prevent bias in feature selection of neural network models, after determining the evaluation parameters of different features, the Support Vector Machine (SVM) algorithm can be used to classify the selected feature subsets. While keeping the change in prediction accuracy small, features with lower values ​​indicated by the evaluation parameters should be removed as much as possible to determine the parameter threshold corresponding to the evaluation parameters of the filtered features.

[0093] In some embodiments, the action feature acquisition method can iteratively select features. The trained neural network model and / or preset feature set can be adjusted according to the obtained feature selection results, and feature selection can be performed again to obtain the most valuable action features.

[0094] Figure 5 This is the third flowchart illustrating the motion feature acquisition method provided by this invention. For example... Figure 5 As shown, the action feature acquisition method may include the following steps.

[0095] Step 501: Obtain an initial feature set, which includes multiple action features related to the time series task.

[0096] It should be noted that the description of step 501 can be found in the description of step 101 in the previous embodiment, and will not be repeated here.

[0097] Step 502: Determine the trained neural network model and / or preset feature set based on the target evaluation results, wherein the target evaluation results are obtained by evaluating the classification accuracy of the candidate feature subset obtained in the previous round of feature selection.

[0098] It should be noted that before performing the current feature selection step, the classification accuracy can be evaluated based on the candidate feature subset obtained from the previous round of feature selection, and the trained neural network model and / or preset feature set to be used can be determined based on the evaluation results.

[0099] There are many ways to obtain the target evaluation results. For example, the accuracy of the feature subset on other traditional machine learning algorithms can be used as the evaluation standard. Alternatively, unsupervised clustering algorithms can be used to evaluate the ability of the feature to distinguish different categories. This invention does not limit the method for determining the trained neural network model and / or the preset feature set based on the target evaluation results.

[0100] Step 503: When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0101] It should be noted that the explanation of step 503 can be found in the explanation of step 102 in the aforementioned embodiments, and will not be repeated here.

[0102] Step 504: Select features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset. The number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0103] It should be noted that the description of step 504 can be found in the description of step 103 in the previous embodiment, and will not be repeated here.

[0104] Understandably, determining the trained neural network model and preset feature set based on the target evaluation results can determine the current feature extraction results, and updating or adjusting the trained neural network model based on the results can further improve the accuracy of feature selection.

[0105] Furthermore, determining the trained neural network model and / or the preset feature set based on the target evaluation result may include:

[0106] If the ability to distinguish feature categories indicated by the classification accuracy is lower than the capability parameter threshold, then the trained neural network is replaced, the trained neural network is retrained, or the preset feature set is replaced. If the ability to distinguish feature categories indicated by the classification accuracy is greater than or equal to the capability parameter threshold, and the number of action features included in the candidate feature subset is greater than the quantity threshold, then the candidate feature subset is determined to be the preset feature set.

[0107] It is understood that this invention uses the gradient information of a trained neural network model for feature selection and compares the results with those obtained using other methods. By adopting an iterative feature selection method, valuable features can be selected from a large number of features, thus improving the accuracy of feature acquisition.

[0108] The following describes an exemplary application of the embodiments of this application in a real-world application scenario.

[0109] Figure 6 This is a scene illustration of the motion feature acquisition method provided by the present invention. For example... Figure 6As shown, the action feature acquisition method includes the following steps:

[0110] Step 601: Obtain the action feature set X. The action feature set X is the initial feature set, which is the feature extracted from the initial feature data by tsfresh.

[0111] Step 602: Train the neural network classification model f(X) by extracting the action feature set X.

[0112] Step 603: Using the trained neural network classification model f(X), feature selection is performed through attribution techniques to obtain a candidate feature subset X'. The attribution techniques here are the steps described in the preceding embodiments. Specifically, attribution techniques involve analyzing the gradient information of the neural network to understand its weights on different inputs, thereby aiding in feature selection.

[0113] Step 604: Evaluate the classification accuracy of the candidate feature subset X'. If the evaluation is satisfactory, proceed to step 605; otherwise, proceed to step 601 or 602. This embodiment uses the accuracy of the feature subset on other traditional machine learning algorithms as the evaluation standard. This invention also suggests that unsupervised clustering algorithms can be used to evaluate the ability of this feature to distinguish different categories. If the feature has good discriminative ability, it can be used for clustering, with similar categories tending to cluster together.

[0114] In cases where there is sufficient data, if evaluating the classification accuracy of candidate feature X' reveals its weak ability to distinguish different categories, it may be necessary to replace the model or adjust the parameters for retraining. If satisfactory results are still not obtained after replacing the model, it may be necessary to consider whether the initially extracted feature X can complete the classification task. If candidate feature X' can distinguish different categories well, but its number of features is still too high (i.e., high dimensionality), then candidate feature X' can be used as the initial feature for model training, and attribution techniques can be used to further select a smaller feature subset. This process continues until the feature dimensionality cannot be further reduced, i.e., accuracy significantly decreases after reducing the feature dimensionality. This yields the final selected feature subset.

[0115] Step 605: Determine the qualified candidate features X' as the target feature subset.

[0116] It is understood that the action feature acquisition method of this invention includes using tsfresh for system feature extraction and using a deep neural network for feature selection. This action feature acquisition method first uses tsfresh to extract features relevant to the time series task as broadly as possible, ensuring the target features are covered as much as possible. However, too many features often make subsequent feature selection difficult, making it challenging for conventional algorithms to complete the selection. Therefore, this action feature acquisition method uses attribution techniques, leveraging a deep neural network, and combining wrapper and embedded feature selection methods to select the most valuable features from a large number of features. The deep neural network is used to obtain the weights of different features, and other algorithms are used to determine the weight thresholds for feature selection.

[0117] For example, this method was used to acquire action features from a dataset containing 1522 Taekwondo movements. 3680 features were extracted using tsfresh, and 31 features were selected from these using a neural network. The F1 score obtained using different classification algorithms, such as SVM, was 0.95, which is no less accurate than the recognition accuracy achieved using 3860 features or other deep learning algorithms such as CNN and RNN. This invention also applied this feature engineering to other publicly available datasets and verified its applicability through comparison. It is evident that the feature extraction method provided by this invention has good accuracy and applicability.

[0118] The motion feature acquisition device provided by the present invention is described below. The motion feature acquisition device described below and the feature extraction method described above can be referred to in correspondence.

[0119] Figure 7 This is a schematic diagram of the motion feature acquisition device provided by the present invention. Figure 7 As shown, the modules and units included in the action feature acquisition device 700 can be implemented using a processor; alternatively, they can be implemented using specific logic circuits. During implementation, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP), or field-programmable gate array (FPGA), etc. The action feature acquisition device includes an initial feature acquisition module 701, an evaluation parameter acquisition module 702, and a selected feature acquisition module 703. The initial feature acquisition module 701 is used to acquire an initial feature set, which includes multiple action features related to the time-series task.

[0120] The evaluation parameter acquisition module 702 is used to determine the evaluation parameter corresponding to each action feature in the initial feature set based on the gradient information of the trained neural network model when the initial feature set is input into the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0121] The feature acquisition module 703 is used to select features based on the evaluation parameters corresponding to each action feature to obtain a target feature subset. The number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0122] Based on the above embodiments, in this embodiment, the evaluation parameter acquisition module 702 includes a gradient acquisition unit and a parameter determination unit, wherein,

[0123] The gradient acquisition unit is used to acquire gradient information corresponding to each action feature, wherein the gradient information corresponding to each action feature is the gradient information of the loss function of the trained neural network model with respect to the input of each action feature; the parameter determination unit is used to determine the evaluation parameter corresponding to each action feature based on the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set.

[0124] Based on the above embodiments, in this embodiment, the gradient information corresponding to each action feature includes the absolute value of the gradient corresponding to each action feature, and the parameter determination unit is specifically used for:

[0125] Calculate the proportion of the absolute gradient value corresponding to each action feature in the absolute gradient values ​​corresponding to all action features to obtain the weight corresponding to each action feature. The weight corresponding to each action feature is the evaluation parameter corresponding to each action feature.

[0126] The feature acquisition module 703 is specifically used to: determine a subset of target features according to the weight of each action feature.

[0127] Based on the above embodiments, in this embodiment, the device further includes a threshold acquisition module, which is used for:

[0128] Obtain the parameter threshold corresponding to the evaluation parameter;

[0129] The feature acquisition module 703 is specifically used for:

[0130] Based on the evaluation parameters corresponding to each action feature and the parameter threshold corresponding to the evaluation parameters, a target feature subset is obtained, wherein the parameter value indicated by the evaluation parameters corresponding to each action feature included in the target feature subset is greater than the parameter threshold.

[0131] Based on the above embodiments, in this embodiment, the device further includes a model training determination module, wherein the model training determination module is used to: determine the trained neural network model and / or a preset feature set according to the target evaluation result, wherein the target evaluation result is obtained by evaluating the classification accuracy of the candidate feature subset obtained in the previous round of feature selection.

[0132] Based on the above embodiments, in this embodiment, the model training determination module is specifically used for:

[0133] If the ability to distinguish feature categories indicated by the classification accuracy is lower than the capability parameter threshold, then the trained neural network is replaced, or the trained neural network is retrained, or the preset feature set is replaced.

[0134] If the ability to distinguish feature categories indicated by the classification accuracy is greater than or equal to the capability parameter threshold, and the number of action features included in the candidate feature subset is greater than the number threshold, then the candidate feature subset is determined to be a preset feature set.

[0135] Based on the above embodiments, in this embodiment, the preset feature set includes some or all of the action features in the initial feature set.

[0136] Based on the above embodiments, in this embodiment, the initial feature acquisition module 701 is specifically used to: acquire an action dataset, the action dataset including action data collected by an accelerometer; and extract features from the action dataset using a time-series data feature extraction tool to obtain the initial feature set.

[0137] In this embodiment of the invention, the evaluation parameters corresponding to the action features are determined by the gradient information of the trained neural network model, and feature selection is performed based on the evaluation parameters. This enables the selection of the most valuable action features from a large number of action features, thereby improving the accuracy of action feature acquisition.

[0138] Figure 8 This is a schematic diagram of the physical structure of the electronic device that complies with the present invention, as shown below. Figure 8As shown, the electronic device may include a processor 801, a communications interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communications interface 802, and the memory 803 communicate with each other via the communication bus 804. The processor 801 can call logical instructions in the memory 803 to execute an action feature acquisition method, which includes: acquiring an initial feature set, the initial feature set including multiple action features related to a time-series task;

[0139] When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0140] Feature selection is performed based on the evaluation parameters corresponding to each action feature to obtain a target feature subset, wherein the number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0141] Furthermore, the logical instructions in the aforementioned memory 803 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute the action feature acquisition method provided by the above methods, the method including: acquiring an initial feature set, the initial feature set including multiple action features related to the time series task;

[0143] When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0144] Feature selection is performed based on the evaluation parameters corresponding to each action feature to obtain a target feature subset, wherein the number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0145] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0146] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the motion feature acquisition method provided by the above methods, the method comprising:

[0147] Obtain an initial feature set, which includes multiple action features related to the time series task;

[0148] When the initial feature set is input into the trained neural network model, the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model. The evaluation parameter is used to indicate the importance of the action feature. The trained neural network model is trained using a preset feature set, which includes multiple action features.

[0149] Feature selection is performed based on the evaluation parameters corresponding to each action feature to obtain a target feature subset, wherein the number of action features included in the target feature subset is less than the number of action features included in the initial feature set.

[0150] The aforementioned non-transitory computer-readable storage medium may take the form of any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a non-transitory computer-readable storage medium. A non-transitory 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 non-transitory computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a non-transitory computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0151] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than non-transitory computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0152] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.

[0153] Computer program code for performing the operations described herein can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0154] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A motion feature acquisition method characterized by comprising: The method comprises the following steps: obtaining an initial feature set comprising a plurality of action features related to a time series task; determining an evaluation parameter corresponding to each action feature in the initial feature set according to gradient information of a trained neural network model, the evaluation parameter being used to indicate the importance of the action feature, the trained neural network model being trained using a preset feature set comprising a plurality of action features, the gradient information of the trained neural network model being obtained by calculating the gradient of the input of the trained neural network model, and the gradient information of the trained neural network model being used to represent which information input by the trained neural network model is more valued in the classification process; performing feature selection according to the evaluation parameter corresponding to each action feature to obtain a target feature subset, the number of action features included in the target feature subset being less than the number of action features included in the initial feature set; The method comprises the following steps: obtaining gradient information corresponding to each action feature, the gradient information corresponding to each action feature being the gradient information of the loss function of the trained neural network model with respect to the input of each action feature; determining the evaluation parameter corresponding to each action feature according to the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set; The gradient information corresponding to each action feature comprises a gradient absolute value corresponding to each action feature, and the determination of the evaluation parameter corresponding to each action feature according to the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set comprises the following steps: calculating the proportion of the gradient absolute value corresponding to each action feature in the gradient absolute values corresponding to all action features to obtain a weight corresponding to each action feature, the weight corresponding to each action feature being the evaluation parameter corresponding to each action feature; and determining the target feature subset according to the size of the weight corresponding to each action feature.

2. The motion feature acquisition method of claim 1, wherein Before the feature selection according to the evaluation parameter corresponding to each action feature to obtain the target feature subset, the method further comprises the following steps: obtaining a parameter threshold corresponding to the evaluation parameter; and The feature selection according to the evaluation parameter corresponding to each action feature to obtain the target feature subset comprises the following steps: obtaining the target feature subset according to the evaluation parameter corresponding to each action feature and the parameter threshold corresponding to the evaluation parameter, the evaluation parameter value indicated by the evaluation parameter corresponding to each action feature included in the target feature subset being greater than the parameter threshold.

3. The motion feature acquisition method of claim 1, wherein, Before the evaluation parameter corresponding to each action feature in the initial feature set is determined according to the gradient information of the trained neural network model, the method further comprises: The trained neural network model and / or the preset feature set are determined according to a target evaluation result, which is obtained by performing classification precision evaluation on the candidate feature subset obtained through the feature selection in the last round.

4. The action feature acquisition method according to claim 3, characterized by, The trained neural network model and / or the preset feature set are determined according to a target evaluation result, which is obtained by performing classification precision evaluation on the candidate feature subset obtained through the feature selection in the last round. If the ability of distinguishing feature categories indicated by the classification precision is lower than the ability parameter threshold, the trained neural network is replaced, or the trained neural network is retrained, or the preset feature set is replaced. If the ability of distinguishing feature categories indicated by the classification precision is greater than or equal to the ability parameter threshold, and the number of action features included in the candidate feature subset is greater than the number threshold, the candidate feature subset is determined as the preset feature set.

5. An action feature acquisition apparatus characterized by comprising: Comprise: An initial feature acquisition module is configured to acquire an initial feature set, wherein the initial feature set comprises a plurality of action features related to a time series task. An evaluation parameter acquisition module is configured to determine an evaluation parameter corresponding to each action feature in the initial feature set according to gradient information of a trained neural network model when the initial feature set is input into the trained neural network model, wherein the evaluation parameter is used to indicate the importance of the action feature, the trained neural network model is trained using a preset feature set, the preset feature set comprises a plurality of action features, the gradient information of the trained neural network model is obtained by calculating the gradient of the input of the trained neural network model, and the gradient information of the trained neural network model is used to represent which input information is more important in the classification process of the trained neural network model. A selected feature acquisition module is configured to perform feature selection according to the evaluation parameter corresponding to each action feature to obtain a target feature subset, wherein the number of action features included in the target feature subset is less than the number of action features included in the initial feature set. The evaluation parameter acquisition module comprises: A gradient acquisition unit is configured to acquire gradient information corresponding to each action feature, wherein the gradient information corresponding to each action feature is the gradient information of the loss function of the trained neural network model with respect to the input of each action feature. A parameter determination unit is configured to determine the evaluation parameter corresponding to each action feature according to the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set, wherein the gradient information corresponding to each action feature comprises a gradient absolute value corresponding to each action feature, and the determination of the evaluation parameter corresponding to each action feature according to the gradient information corresponding to each action feature and the gradient information corresponding to all action features in the initial feature set comprises: The proportion of the gradient absolute value corresponding to each action feature in the gradient absolute values corresponding to all action features is calculated to obtain a weight corresponding to each action feature, which is an evaluation parameter corresponding to each action feature; and the feature selection according to the evaluation parameter corresponding to each action feature to obtain a target feature subset comprises: A target feature subset is determined according to the size of the weight corresponding to each action feature.

6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the action feature acquisition method according to any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the action feature acquisition method according to any one of claims 1 to 4.

8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the action feature acquisition method according to any one of claims 1 to 4. The computer program is executed by the processor to implement the steps of the action feature acquisition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Model training method and device, storage medium and equipment

    CN114757244A