Disclosure of Invention
The embodiment of the invention provides an intelligent speed regulating system and method for an underwater running platform based on deep learning, which can dynamically regulate the water flow speed according to the real-time physiological state and the athletic performance of athletes, and effectively improve the training effect of underwater sports.
The embodiment of the invention provides an intelligent speed regulation system of an underwater running platform based on deep learning, which comprises the following components:
the heart rate detection device is used for detecting the heart rate of a user moving on the underwater running platform;
the camera is used for shooting the image of the user;
The control device is in communication connection with the heart rate detection device and the camera and is used for:
acquiring the heart rate and the image;
Performing motion gesture analysis on the image by using an image processing algorithm to obtain the motion gesture of the user;
Taking the heart rate and the motion gesture as input data, and inputting the input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain the motion state of the user on an underwater running platform;
Inputting the motion state into a trained underwater running platform speed regulation model to obtain the optimal training water flow speed of the user on the underwater running platform;
and controlling the current water flow speed of the underwater running platform to be adjusted to the optimal training water flow speed.
As an improvement of the above solution, the inputting the heart rate and the motion gesture as input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain a motion state of the user on an underwater running platform includes:
extracting the characteristics of the heart rate and the motion gesture to obtain heart rate characteristics and motion gesture characteristics;
performing attention weight calculation and feature stitching on the heart rate features and the motion gesture features to obtain attention weighted fusion features;
and inputting the fusion characteristics into a built multi-layer perceptron neural network model with an attention mechanism, and outputting the motion state of the user on the underwater running platform through multi-layer nonlinear transformation.
As an improvement of the above solution, the calculating the attention weight of the heart rate feature and the motion gesture feature and performing feature stitching to obtain an attention weighted fusion feature includes:
converting heart rate feature vector O HR and motion gesture feature vector O STA into key vectors and value vectors using linear transformations;
The attention weight w i of the heart rate feature vector O HR and the motion-posture feature vector O STA is calculated by the following formula:
Wherein Q k,Ki,Vi represents a query vector, a key vector, and a value vector, respectively, from linear transformations of heart rate feature vector O HR and motion gesture feature vector O STA, respectively, d k is the dimension of the key vector for scaling the dot product result to avoid gradient vanishing;
feature stitching is performed through the following formula to obtain a weighted attention feature vector v:
n is the number of linearly transformed value vectors V i of the heart rate feature vector O HR and the motion gesture feature vector O STA.
As an improvement of the above scheme, the multi-layer perceptron neural network model with the attention mechanism is composed of a plurality of hidden layers, and the calculation formula of each hidden layer is as follows:
hl=f(Wl·v+bl),l=1,...,L
Wherein h l-1 is the output of the previous layer, W l and b l are the weight matrix and bias vector of the first layer, f is a nonlinear activation function, the output of the last layer L is used as the input of the final layer h L, and the calculation formula of the final layer h L is:
S=g (W S·hL+bS) where W S and b S are the weight matrix and bias vector of the final layer h L, g
And S is the motion state of the user on the underwater running platform.
As an improvement of the scheme, the model formula of the underwater running platform speed regulation model is as follows:
Wherein V opt is the output optimal training water flow speed of the user on the underwater running platform at present; The method is a deep learning model, the parameters are Θ, the parameters comprise a weight matrix W h、Wf and a bias vector b h、bf, sigma (·) is an activation function of an output layer, and tan h (·) is an activation function of a hidden layer, and the method is used for introducing nonlinear transformation and enhancing the expression capability of the model.
Another embodiment of the present invention correspondingly provides an intelligent speed regulation method for an underwater running platform based on deep learning, which is applied to the intelligent speed regulation system for an underwater running platform based on deep learning as described above, and includes:
acquiring the heart rate and the image;
Performing motion gesture analysis on the image by using an image processing algorithm to obtain the motion gesture of the user;
Taking the heart rate and the motion gesture as input data, and inputting the input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain the motion state of the user on an underwater running platform;
Inputting the motion state into a trained underwater running platform speed regulation model to obtain the optimal training water flow speed of the user on the underwater running platform;
and controlling the current water flow speed of the underwater running platform to be adjusted to the optimal training water flow speed.
As an improvement of the above solution, the inputting the heart rate and the motion gesture as input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain a motion state of the user on an underwater running platform includes:
extracting the characteristics of the heart rate and the motion gesture to obtain heart rate characteristics and motion gesture characteristics;
performing attention weight calculation and feature stitching on the heart rate features and the motion gesture features to obtain attention weighted fusion features;
and inputting the fusion characteristics into a built multi-layer perceptron neural network model with an attention mechanism, and outputting the motion state of the user on the underwater running platform through multi-layer nonlinear transformation.
As an improvement of the above solution, the calculating the attention weight of the heart rate feature and the motion gesture feature and performing feature stitching to obtain an attention weighted fusion feature includes:
converting heart rate feature vector O HR and motion gesture feature vector O STA into key vectors and value vectors using linear transformations;
The attention weight w i of the heart rate feature vector O HR and the motion-posture feature vector O STA is calculated by the following formula:
Wherein Q k,Ki,Vi represents a query vector, a key vector, and a value vector, respectively, from linear transformations of heart rate feature vector O HR and motion gesture feature vector O STA, respectively, d k is the dimension of the key vector for scaling the dot product result to avoid gradient vanishing;
Feature stitching is performed through the following formula to obtain a weighted attention feature vector v:
n is the number of linearly transformed value vectors V i of the heart rate feature vector O HR and the motion gesture feature vector O STA.
As an improvement of the above scheme, the multi-layer perceptron neural network model with the attention mechanism is composed of a plurality of hidden layers, and the calculation formula of each hidden layer is as follows:
hl=f(Wl·v+bl),l=1,...,L
Wherein h l-1 is the output of the previous layer, W l and b l are the weight matrix and bias vector of the first layer, f is a nonlinear activation function, the output of the last layer L is used as the input of the final layer h L, and the calculation formula of the final layer h L is:
S=g (W S·hL+bS) where W S and b S are the weight matrix and bias vector of the final layer h L, g
And S is the motion state of the user on the underwater running platform.
As an improvement of the scheme, the model formula of the underwater running platform speed regulation model is as follows:
Wherein V opt is the output optimal training water flow speed of the user on the underwater running platform at present; The method is a deep learning model, the parameters are Θ, the parameters comprise a weight matrix W h、Wf and a bias vector b h、bf, sigma (·) is an activation function of an output layer, and tan h (·) is an activation function of a hidden layer, and the method is used for introducing nonlinear transformation and enhancing the expression capability of the model.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
According to the embodiment of the invention, heart rate variation and motion gesture of the athlete are captured in real time, heart rate data and motion gesture characteristics are fused and are input into a trained multi-layer perceptron neural network model with a attention mechanism, the model can deeply analyze the motion state of the athlete, the obtained motion state information is input into a specially trained underwater running platform speed regulation model, and the model learns and predicts the current optimal training water flow speed by utilizing a deep learning technology so as to realize personalized speed regulation. Finally, according to the current optimal training water flow speed, the water flow speed of the underwater running platform is adjusted in real time, so that the athlete can train in the optimal state, the training efficiency is improved, and the training safety is guaranteed. From the analysis, the embodiment of the invention solves the problems of excessive static speed regulation strategy and lack of individuation in the prior art, can dynamically adjust the water flow speed according to the real-time physiological state and the athletic performance of athletes, and effectively improves the training effect of underwater sports.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, an architecture diagram of an intelligent speed regulation method system for an underwater running platform based on deep learning according to an embodiment of the present invention is provided. The intelligent speed regulation system of the underwater running platform based on deep learning comprises a heart rate detection device 10, a camera 11 and a control device 12, wherein the heart rate detection device 10 is used for detecting the heart rate of a user moving on the underwater running platform, the heart rate detection device 10 can be an intelligent wearing device with a heart rate detection function, the user can wear on a body when moving on an underwater cannon platform, for example, the user can wear an intelligent watch with the heart rate detection function on the hand of the user, the camera 11 is used for shooting images of the user moving on the underwater running platform, the camera 11 can be provided with a waterproof function and arranged in water and aligned with the underwater running platform, the control device 12 (for example, a desktop computer or a control main board used for controlling the underwater running platform) is in communication connection (such as wired connection or wireless communication connection) with the heart rate detection device and the camera, and is used for:
acquiring the heart rate and the image;
Performing motion gesture analysis on the image by using an image processing algorithm to obtain the motion gesture of the user;
Taking the heart rate and the motion gesture as input data, and inputting the input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain the motion state of the user on an underwater running platform;
Inputting the motion state into a trained underwater running platform speed regulation model to obtain the optimal training water flow speed of the user on the underwater running platform;
and controlling the current water flow speed of the underwater running platform to be adjusted to the optimal training water flow speed.
According to the embodiment of the invention, heart rate variation and motion gesture of the athlete are captured in real time, heart rate data and motion gesture characteristics are fused and are input into a trained multi-layer perceptron neural network model with a attention mechanism, the model can deeply analyze the motion state of the athlete, the obtained motion state information is input into a specially trained underwater running platform speed regulation model, and the model learns and predicts the current optimal training water flow speed by utilizing a deep learning technology so as to realize personalized speed regulation. Finally, according to the current optimal training water flow speed, the water flow speed of the underwater running platform is adjusted in real time, so that the athlete can train in the optimal state, the training efficiency is improved, and the training safety is guaranteed. From the analysis, the embodiment of the invention solves the problems of excessive static speed regulation strategy and lack of individuation in the prior art, can dynamically adjust the water flow speed according to the real-time physiological state and the athletic performance of athletes, and effectively improves the training effect of underwater sports.
It should be noted that, the image processing algorithm used for the motion gesture analysis of the image may be a prior art, for example OpenPose, deepLab, hourglass Network, etc.
It will be appreciated that an underwater treadmill is typically equipped with a water return system that can adjust the speed and direction of the water flow, thereby affecting the resistance and strength of the runner's exercise. The basic principle of adjusting the water flow speed is that a water return system of the underwater running platform is designed to circulate water and generate water flow. The system may include a water pump, piping, nozzles, valves, and filtration devices. The water pump pumps the water out of the bottom of the pool, filters the water to remove impurities, and then re-injects the water into the pool through the pipeline and the nozzle to form water flow. The core of controlling the water flow rate is to adjust the power of the water pump and/or change the path of the water flow. This can be achieved by:
The rotation speed of the water pump motor is adjusted so as to change the flow and pressure of water.
A variable cross-section nozzle or valve is used to vary the cross-sectional area of the water flow, thereby affecting the flow rate.
The direction of water flow is changed by the guide plate or the baffle plate, so that the density and the speed of the water flow in front of the runner are influenced.
In one embodiment, the inputting the heart rate and the motion gesture as input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain a motion state of the user on an underwater running platform includes:
extracting the characteristics of the heart rate and the motion gesture to obtain heart rate characteristics and motion gesture characteristics;
performing attention weight calculation and feature stitching on the heart rate features and the motion gesture features to obtain attention weighted fusion features;
and inputting the fusion characteristics into a built multi-layer perceptron neural network model with an attention mechanism, and outputting the motion state of the user on the underwater running platform through multi-layer nonlinear transformation.
In this embodiment, through a deep learning technology, in particular, a multi-layer perceptron neural network model with a attention mechanism, the heart rate data and the motion gesture data acquired in real time are subjected to deep analysis, so as to acquire the accurate motion state of the athlete on the underwater running platform. Specifically, first, raw heart rate data and exercise posture data are preprocessed, and key features capable of reflecting physiological states and exercise performances of the athlete are extracted. This stage aims to convert the complex data into a form that is easy to process by the machine learning model, ensuring the accuracy of the subsequent analysis. Next, the heart rate features and the motion gesture features are weighted using an attention mechanism to emphasize those feature information that are most critical to the current motion state. Through the calculation of the attention weight, the model can autonomously decide which features are more important under the current situation, so that intelligent screening and fusion of the features are performed. The weighted feature stitching not only enhances the understanding capability of the model to complex motion scenes, but also improves the distinguishing degree of the features, and lays a solid foundation for the subsequent motion state prediction. And finally, inputting the weighted fusion characteristics to a pre-trained multi-layer perceptron neural network model with an attention mechanism. The model can capture complex correlations among features through multi-layer nonlinear transformation, so that the motion state of an athlete on an underwater running platform is output, wherein the motion state comprises but is not limited to state indexes of multiple dimensions such as fatigue degree, motion efficiency and the like.
As an improvement of the above solution, the calculating the attention weight of the heart rate feature and the motion gesture feature and performing feature stitching to obtain an attention weighted fusion feature includes:
converting heart rate feature vector O HR and motion gesture feature vector O STA into key vectors and value vectors using linear transformations;
The attention weight w i of the heart rate feature vector O HR and the motion-posture feature vector O STA is calculated by the following formula:
Wherein Q k,Ki,Vi represents a query vector, a key vector, and a value vector, respectively, from linear transformations of heart rate feature vector O HR and motion gesture feature vector O STA, respectively, d k is the dimension of the key vector for scaling the dot product result to avoid gradient vanishing;
feature stitching is performed through the following formula to obtain a weighted attention feature vector v:
n is the number of linearly transformed value vectors V i of the heart rate feature vector O HR and the motion gesture feature vector O STA.
In the embodiment, the depth fusion of the heart rate characteristic and the movement posture characteristic is realized by using an attention mechanism so as to enhance the accuracy and individualization of the model for understanding the movement state of the athlete. Specifically, first, the extracted heart rate feature vector and motion gesture feature vector are converted into key vectors (Keys) and value vectors (Values) through linear transformation. This process aims to lay a foundation for the subsequent calculation of the attention mechanism, so that the model can process the characteristic information of different sources in a unified manner. And then, obtaining the attention weights of the heart rate feature vector and the motion gesture feature vector by calculating the dot product between the Query vector (Query) and the key vector (Keys) and performing scaling and Softmax function processing. The query vector can be regarded as the focus of attention of the model on the current task, and the key vector represents the potential meaning of the feature vector. This calculation process enables the model to adaptively adjust the degree of importance to different features, thereby giving more important features higher weight when feature fusion. And finally, carrying out weighted summation on the value vectors according to the calculated attention weight to obtain the feature vectors after attention weighting. The weighted fusion process not only enhances the interaction between the features, but also ensures that the model can make more comprehensive and accurate decisions from the global perspective. In conclusion, the intelligent fusion of the heart rate characteristics and the movement posture characteristics is realized by introducing the attention mechanism, and the performance of the model in the field of analysis of the movement states of athletes is remarkably improved.
As an improvement of the above scheme, the multi-layer perceptron neural network model with the attention mechanism is composed of a plurality of hidden layers, and the calculation formula of each hidden layer is as follows:
hl=f(Wl·v+bl),l=1,...,L
Wherein h l-1 is the output of the previous layer, W l and b l are the weight matrix and bias vector of the first layer, f is a nonlinear activation function (such as a ReLU or tanh function), the output of the last layer L is used as the input of the final layer h L, and the calculation formula of the final layer h L is:
S=g (W S·hL+bS), where W S and b S are the weight matrix and bias vector of the final layer h L, g is the output activation function (softmax or linear function may be used), S is the output motion state of the user on the underwater treadmill.
In the embodiment, a multi-layer perceptron neural network model with an attention mechanism is constructed and used for deeply processing and fusing heart rate characteristics and motion gesture characteristics so as to accurately predict the motion state of a user on an underwater running platform. The multi-layer perceptron neural network (MLP) model structure consists of a plurality of hidden layers, each hidden layer carries out linear transformation through a weight matrix and a bias vector, and then the expression capacity of the model is increased through a nonlinear activation function so as to learn a complex feature mapping relation. The attention mechanism enables the model to focus on key parts in the input features by calculating the attention weight, so that the sensitivity and learning efficiency of the model to important features are improved. By means of the attention weighting, the model can adaptively adjust the importance of the features, thereby better capturing patterns closely related to motion state prediction in complex feature spaces. Therefore, the embodiment can automatically screen and learn the information most valuable for predicting the motion state from the complex heart rate and motion gesture features by introducing an attention mechanism, and the accuracy of prediction is remarkably improved. Meanwhile, the deep structure and nonlinear transformation capability of the multi-layer perceptron neural network model enable the model to learn deep abstract features of data, so that good prediction performance is still maintained under different individuals and environmental conditions. In addition, the attention mechanism enables the model to adaptively adjust the prediction strategy according to different user characteristics and motion situations, so that personalized analysis of motion states of each user is realized.
As an improvement of the scheme, the model formula of the underwater running platform speed regulation model is as follows:
Wherein V opt is the output optimal training water flow speed of the user on the underwater running platform at present; The method is a deep learning model, the parameters are Θ, the parameters comprise a weight matrix W h、Wf and a bias vector b h、bf, sigma (·) is an activation function of an output layer (Sigmoid, reLU or linear function can be selected), and tan h (·) is an activation function of a hidden layer, and the method is used for introducing nonlinear transformation and enhancing the expression capability of the model.
In this embodiment, a special underwater running platform speed regulation model is constructed by using a deep learning model to predict the current optimal training water flow speed of the user. The deep learning model is designed to handle complex nonlinear relations, and key features can be automatically learned and extracted from the input motion state so as to predict the optimal training water flow speed. The structure of the model comprises a hidden layer and an output layer, wherein the hidden layer introduces the complexity of the model through a nonlinear activation function, and the modeling capability of the model on the nonlinear relation is enhanced. By predicting the water flow speed which is most matched with the current motion state of the user, the system can provide personalized training conditions for each user, and reduce unnecessary physical consumption and damage risk while maximizing the training effect. And the optimal water flow speed is adjusted in real time, so that the water flow speed is always in an optimal state in the training process, and the endurance, speed and skill of athletes are improved, and the overall training efficiency is improved.
Referring to fig. 2, a schematic flow chart of an intelligent speed regulation method for an underwater running platform based on deep learning according to an embodiment of the invention is provided. The intelligent speed regulation method of the underwater running platform based on the deep learning is applied to the intelligent speed regulation system of the underwater running platform based on the deep learning, and comprises the following steps of S10 to S14:
s10, acquiring the heart rate and the image;
S11, performing motion gesture analysis on the image by using an image processing algorithm to obtain the motion gesture of the user;
S12, taking the heart rate and the motion gesture as input data, and inputting the input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain a motion state of the user on an underwater running platform;
S13, inputting the motion state into a trained underwater running platform speed regulation model to obtain the optimal training water flow speed of the user on the underwater running platform;
S14, controlling the current water flow speed of the underwater running platform to be adjusted to the optimal training water flow speed.
According to the embodiment of the invention, heart rate variation and motion gesture of the athlete are captured in real time, heart rate data and motion gesture characteristics are fused and are input into a trained multi-layer perceptron neural network model with a attention mechanism, the model can deeply analyze the motion state of the athlete, the obtained motion state information is input into a specially trained underwater running platform speed regulation model, and the model learns and predicts the current optimal training water flow speed by utilizing a deep learning technology so as to realize personalized speed regulation. Finally, according to the current optimal training water flow speed, the water flow speed of the underwater running platform is adjusted in real time, so that the athlete can train in the optimal state, the training efficiency is improved, and the training safety is guaranteed. From the analysis, the embodiment of the invention solves the problems of excessive static speed regulation strategy and lack of individuation in the prior art, can dynamically adjust the water flow speed according to the real-time physiological state and the athletic performance of athletes, and effectively improves the training effect of underwater sports.
As an improvement of the above solution, the inputting the heart rate and the motion gesture as input data into a trained multi-layer perceptron neural network model with an attention mechanism to obtain a motion state of the user on an underwater running platform includes:
extracting the characteristics of the heart rate and the motion gesture to obtain heart rate characteristics and motion gesture characteristics;
performing attention weight calculation and feature stitching on the heart rate features and the motion gesture features to obtain attention weighted fusion features;
and inputting the fusion characteristics into a built multi-layer perceptron neural network model with an attention mechanism, and outputting the motion state of the user on the underwater running platform through multi-layer nonlinear transformation.
As an improvement of the above solution, the calculating the attention weight of the heart rate feature and the motion gesture feature and performing feature stitching to obtain an attention weighted fusion feature includes:
converting heart rate feature vector O HR and motion gesture feature vector O STA into key vectors and value vectors using linear transformations;
The attention weight w i of the heart rate feature vector O HR and the motion-posture feature vector O STA is calculated by the following formula:
Wherein Q k,Ki,Vi represents a query vector, a key vector, and a value vector, respectively, from linear transformations of heart rate feature vector O HR and motion gesture feature vector O STA, respectively, d k is the dimension of the key vector for scaling the dot product result to avoid gradient vanishing;
feature stitching is performed through the following formula to obtain a weighted attention feature vector v:
n is the number of linearly transformed value vectors V i of the heart rate feature vector O HR and the motion gesture feature vector O STA.
As an improvement of the above scheme, the multi-layer perceptron neural network model with the attention mechanism is composed of a plurality of hidden layers, and the calculation formula of each hidden layer is as follows:
hl=f(Wl·v+bl),l=1,...,L
Wherein h l-1 is the output of the previous layer, W l and b l are the weight matrix and bias vector of the first layer, f is a nonlinear activation function, the output of the last layer L is used as the input of the final layer h L, and the calculation formula of the final layer h L is:
S=g (W S·hL+bS) where W S and b S are the weight matrix and bias vector of the final layer h L, g is the output activation function, and S is the output motion state of the user on the underwater running deck.
As an improvement of the scheme, the model formula of the underwater running platform speed regulation model is as follows:
Wherein V opt is the output optimal training water flow speed of the user on the underwater running platform at present; The method is a deep learning model, the parameters are Θ, the parameters comprise a weight matrix W h、Wf and a bias vector b h、bf, sigma (·) is an activation function of an output layer, and tan h (·) is an activation function of a hidden layer, and the method is used for introducing nonlinear transformation and enhancing the expression capability of the model.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.