Disclosure of Invention
The invention mainly aims to provide a heart rate detection method, wearable equipment and a computer storage medium, and aims to calculate the heart rate of a user according to a processing mode corresponding to a motion state and improve the heart rate detection accuracy.
In order to achieve the above object, the present invention provides a method for detecting a heart rate, which comprises the following steps:
acquiring motion data acquired by a motion sensor in a wearable device, wherein the motion sensor comprises an acceleration sensor and/or a geomagnetic sensor;
acquiring a motion state corresponding to the motion data;
processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value;
outputting the heart rate value.
Optionally, the step of acquiring a motion state corresponding to the motion data includes:
obtaining a distance between the motion data and each preset motion data, wherein the distance comprises at least one of a manhattan distance, an euclidean distance, and a minkowski distance;
sequencing the preset motion data from large to small according to the distance, and taking a first preset number of preset motion data which are sequenced in the front as target motion data;
and determining the motion state corresponding to the motion data according to the motion state corresponding to the target motion data.
Optionally, the step of acquiring a motion state corresponding to the motion data includes:
acquiring a plurality of characteristic data of the motion data in each preset dimension, wherein the motion data comprises data collected by the motion sensor within a preset time length;
acquiring the intra-class divergence of each feature data in each preset dimension in the preset dimension;
acquiring inter-class dispersion of a plurality of feature data on each preset dimension in a plurality of preset dimensions;
acquiring a characteristic value of each characteristic data according to the intra-class divergence and the inter-class divergence;
sorting the plurality of feature data from large to small according to the feature values, and taking a second preset number of feature data which are sorted in front as target feature data;
and acquiring a motion state according to the target characteristic data.
Optionally, the step of processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value includes:
inputting the heart rate data into a neural network model corresponding to the motion state;
and acquiring the heart rate value output by the neural network model.
Optionally, the heart rate detection method further includes:
acquiring a plurality of historical motion data acquired by the motion sensor;
determining a motion state corresponding to each historical motion data;
acquiring a plurality of historical motion data corresponding to each motion state;
and training a preset model corresponding to the motion state according to the heart rate data acquired by the heart rate sensor in the acquisition time period corresponding to each historical motion data corresponding to each motion state to obtain a neural network model corresponding to the motion state.
Optionally, before the step of processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value, the method further includes:
preprocessing the heart rate data, wherein the preset processing comprises at least one of filtering processing, segmentation processing and normalization processing;
the step of processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value comprises:
and processing the preprocessed heart rate data according to the motion state to obtain the heart rate value.
Optionally, before the step of processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value, the method further includes:
acquiring a user type corresponding to the wearable device;
the step of processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value comprises:
and processing the heart rate data according to the user type and the motion state to obtain the heart rate value.
In addition, to achieve the above object, the present invention also provides a wearable device, including: a memory, a processor and a heart rate detection program stored on the memory and executable on the processor, the heart rate detection program, when executed by the processor, implementing the steps of the heart rate detection method as described in any one of the above.
In addition, to achieve the above object, the present invention further provides a computer storage medium, on which a heart rate detection program is stored, and the heart rate detection program, when executed by a processor, implements the steps of the heart rate detection method according to any one of the above.
The heart rate detection method, the wearable device and the computer storage medium provided by the embodiment of the invention are used for acquiring motion data acquired by a motion sensor in the wearable device, wherein the motion sensor comprises an acceleration sensor and/or a geomagnetic sensor, acquiring a motion state corresponding to the motion data, processing the heart rate data acquired by the heart rate sensor in the wearable device according to the motion state to obtain a heart rate value, and outputting the heart rate value. According to the heart rate detection method and device, the exercise state of the user is determined by collecting the exercise data of the user, the heart rate of the user is calculated according to the corresponding processing mode of the exercise state, the influence of different exercise states of the user on the heart rate detection is reduced, and the accuracy of the heart rate detection is improved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a solution, which is characterized in that the exercise state of a user is determined by collecting exercise data of the user, the heart rate of the user is calculated according to a processing mode corresponding to the exercise state, the influence of different exercise states of the user on heart rate detection is reduced, and the accuracy of the heart rate detection is improved.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal provided by the embodiment of the invention is a wearable device, such as a smart watch, a smart bracelet, an earphone and the like.
As shown in fig. 1, the terminal may include: aprocessor 1001, such as a CPU, anetwork interface 1004, auser interface 1003, amemory 1005, acommunication bus 1002. Wherein acommunication bus 1002 is used to enable connective communication between these components. Theuser interface 1003 may comprise a Display screen (Display), an input unit such as a button, and theoptional user interface 1003 may also comprise a standard wired interface, a wireless interface. Thenetwork interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may alternatively be a storage device separate from theprocessor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, amemory 1005, which is a kind of computer storage medium, may include therein a network communication module, a user interface module, and a heart rate detection program.
In the terminal shown in fig. 1, thenetwork interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; theprocessor 1001 may be configured to invoke a heart rate detection program stored in thememory 1005 and perform the following operations:
acquiring motion data acquired by a motion sensor in a wearable device, wherein the motion sensor comprises an acceleration sensor and/or a geomagnetic sensor;
acquiring a motion state corresponding to the motion data;
processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value;
outputting the heart rate value.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
obtaining a distance between the motion data and each preset motion data, wherein the distance comprises at least one of a manhattan distance, an euclidean distance, and a minkowski distance;
sequencing the preset motion data from large to small according to the distance, and taking a first preset number of preset motion data which are sequenced in the front as target motion data;
and determining the motion state corresponding to the motion data according to the motion state corresponding to the target motion data.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
acquiring a plurality of characteristic data of the motion data in each preset dimension, wherein the motion data comprises data collected by the motion sensor within a preset time length;
acquiring the intra-class divergence of each feature data in each preset dimension in the preset dimension;
acquiring inter-class dispersion of a plurality of feature data on each preset dimension in a plurality of preset dimensions;
acquiring a characteristic value of each characteristic data according to the intra-class divergence and the inter-class divergence;
sorting the plurality of feature data from large to small according to the feature values, and taking a second preset number of feature data which are sorted in front as target feature data;
and acquiring a motion state according to the target characteristic data.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
inputting the heart rate data into a neural network model corresponding to the motion state;
and acquiring the heart rate value output by the neural network model.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
acquiring a plurality of historical motion data acquired by the motion sensor;
determining a motion state corresponding to each historical motion data;
acquiring a plurality of historical motion data corresponding to each motion state;
and training a preset model corresponding to the motion state according to the heart rate data acquired by the heart rate sensor in the acquisition time period corresponding to each historical motion data corresponding to each motion state to obtain a neural network model corresponding to the motion state.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
preprocessing the heart rate data, wherein the preset processing comprises at least one of filtering processing, segmentation processing and normalization processing;
and processing the preprocessed heart rate data according to the motion state to obtain the heart rate value.
Further, theprocessor 1001 may call a heart rate detection program stored in thememory 1005, and also perform the following operations:
acquiring a user type corresponding to the wearable device;
and processing the heart rate data according to the user type and the motion state to obtain the heart rate value.
Referring to fig. 2, in an embodiment, the heart rate detection method includes the following steps:
step S10, acquiring motion data acquired by a motion sensor in the wearable device, wherein the motion sensor comprises an acceleration sensor and/or a geomagnetic sensor;
in this embodiment, the terminal in this embodiment is a wearable device. Be provided with motion sensor in the wearable equipment, motion sensor includes acceleration sensor and/or earth magnetism sensor, and correspondingly, motion data includes acceleration data that acceleration sensor gathered and/or earth magnetism data that earth magnetism sensor gathered. Alternatively, the acceleration sensor is a three-dimensional acceleration sensor, and may be used to detect linear acceleration values of the X-axis, the Y-axis, and the Z-axis.
Alternatively, the motion data acquired by the wearable device may be the motion data acquired by the motion sensor for a period of time, that is, the motion data acquired is continuously changed along with a time point, for example, the wearable device acquires the motion data acquired by the motion sensor within the past 10 seconds.
Step S20, obtaining a motion state corresponding to the motion data;
in this embodiment, after acquiring the exercise data, the current exercise state of the user of the wearable device is determined according to the exercise data, where the exercise state includes at least one of running, indoor running, walking, outdoor riding, indoor bicycle riding, elliptical machine, mountain climbing, cross-country running, and strength training.
Optionally, when the motion state corresponding to the motion data is obtained, data characteristics of the motion data may be extracted, for example, a numerical value of each data in the motion data, a change rate of the data, a change period of the data, a change amplitude of the data, and the like. The method comprises the steps of obtaining preset data characteristics corresponding to all motion states, comparing the data characteristics of the motion data with the preset data characteristics, and determining the motion states corresponding to the motion data according to the similarity between the data characteristics of the motion data and the preset data characteristics.
Optionally, the motion state corresponding to the motion data is determined by a nearest neighbor classifier (KNN, k-nearest neighbor), wherein the motion data of the user in each motion state may be collected in advance, and the nearest neighbor classifier is generated and trained according to the motion data corresponding to each motion state.
Step S30, processing heart rate data collected by a heart rate sensor in the wearable device according to the motion state to obtain a heart rate value;
and step S40, outputting the heart rate value.
In this embodiment, after determining the motion state of the user of the wearable device, the heart rate data collected by the heart rate sensor is processed according to the motion state, and when the motion states are different, the processing on the heart rate data is also different.
Alternatively, the heart rate data may comprise directly measured heart rate values and the step of processing the heart rate data comprises modifying the directly measured heart rate values to obtain processed heart rate values. When the heart rate value obtained by direct measurement is corrected, the correction parameter corresponding to the motion state can be obtained, and the heart rate value obtained by direct measurement is corrected according to the correction parameter. Optionally, when the directly measured heart rate value is corrected according to the correction parameter, at least one of conventional mathematical operations such as addition, subtraction, multiplication, division and the like may be performed on the correction parameter and the directly measured heart rate value to obtain the heart rate value.
Optionally, when the heart rate data is processed according to the motion state, the neural network model corresponding to the motion state may be obtained, the heart rate data is input to the neural network model corresponding to the motion state, and a result output by the neural network model is obtained, where the result is the heart rate value. The method can acquire motion data of a user in each motion state in advance, and train the neural network model corresponding to each motion state according to the motion data corresponding to each motion state.
Alternatively, the heart rate data may be a directly measured heart rate value, or may be a signal value of a physiological signal such as a PPG (photoplethysmography) signal, an ECG (electrocardiogram) signal, or the like, and the heart rate sensor may be a PPG sensor.
Optionally, when outputting the heart rate value, the heart rate value may be output by displaying the heart rate value on a display interface of the wearable device or the bound user APP, or by sound. Optionally, the step of outputting the heart rate value is performed upon receiving a user triggered heart rate value display instruction.
Optionally, before the heart rate data is processed according to the exercise state to obtain the heart rate data, user information stored in the wearable device may be further acquired, and the user type may be determined according to the user information, where the user information may include at least one of user age, user height, user weight, user gender, and eating habits. And processing the heart rate data according to the user type and the motion state to obtain a heart rate value, namely, when the user type and the motion state are different, the heart rate data are processed differently. For example, different user types and different motion states may correspond to different neural network models, a neural network model corresponding to both the user type and the motion state is obtained, and heart rate data is input to the neural network model to obtain a heart rate value.
In the technical scheme disclosed in this embodiment, the exercise state of the user is determined by collecting the exercise data of the user, and the heart rate of the user is calculated according to the corresponding processing mode of the exercise state, so that the influence of different exercise states of the user on heart rate detection is reduced, and the accuracy of heart rate detection is improved.
In another embodiment, as shown in fig. 3, on the basis of the embodiment shown in fig. 2, the step S20 includes:
step S21, obtaining a distance between the motion data and each preset motion data, wherein the distance includes at least one of a manhattan distance, an euclidean distance, and a minkowski distance;
in the embodiment, the motion state corresponding to the motion data is determined by a nearest neighbor classifier (KNN, k-nearest neighbor). Specifically, the nearest neighbor classifier includes preset motion data corresponding to each operation state, and the motion data is classified according to the distance by calculating the distance between the motion data and each preset motion data, so as to determine which category of motion state the motion data belongs to. The distance represents the similarity between the motion data, and the distance between the motion data and each preset motion data in this embodiment may include at least one of a manhattan distance, an euclidean distance, and a minkowski distance, which may be set according to actual needs.
Step S22, sorting the preset motion data from big to small according to the distance, and taking the first preset number of preset motion data which are sorted in the front as target motion data;
step S23, determining a motion state corresponding to the motion data according to the motion state corresponding to the target motion data.
In this embodiment, the distances between the motion data and the preset motion data are sorted from large to small, the first preset number of preset motion data close to the motion data are determined, the motion state corresponding to each preset motion data in the first preset number of preset motion data close to the motion data is obtained, and according to the classification rule of majority vote, which motion state corresponds to the most preset motion data in the first preset number of preset motion data close to the motion data is the most, the motion state is used as the motion state corresponding to the motion data.
Optionally, when the nearest neighbor classifier is trained, the value of the first preset number is mainly corrected. Specifically, motion data to be tested and a motion state actually corresponding to the motion data to be tested are obtained, the motion data to be tested are input into a nearest neighbor classifier, an output motion state is obtained according to the method, whether the value of the first preset number is accurate or not is determined according to whether the output motion state corresponds to the motion state actually corresponding to the motion data to be tested, and the value of the first preset number is corrected when the value of the first preset number is inaccurate.
Optionally, historical motion data of the user in each motion state is collected in advance, the historical motion data is used as preset motion data, the motion state of the user when the historical motion data is collected is used as a motion state corresponding to the preset motion data, and the nearest neighbor classifier is generated according to the preset motion data and the motion state corresponding to the preset motion data.
Optionally, when the nearest neighbor classifier is generated and trained, the historical motion data and the motion data to be tested may be preprocessed, and the nearest neighbor classifier is generated and trained according to the preprocessed data, where the preprocessing includes at least one of a filtering process, a segmentation process, a normalization process, and a data dimension reduction process.
Optionally, when a motion state corresponding to the motion data is obtained, firstly, data dimension reduction processing is performed on the motion data to obtain target feature data, then, the corresponding motion state is obtained through the nearest neighbor classifier according to the target feature data after the data dimension reduction processing, and through the data dimension reduction, the motion data is more concise, and the motion state corresponding to the obtained motion data is more accurate. Optionally, the data dimensionality reduction may be implemented by Linear Discriminant Analysis (LDA), Principal Component Analysis (PCA), equidistant feature mapping (ISOMap), and the like, for example, in the Linear Discriminant Analysis LDA, a plurality of preset dimensions are divided for motion data, since the motion data includes data collected by a motion sensor within a preset time duration, a plurality of features of the motion data in each preset dimension may be obtained, for a single preset dimension, the intra-class divergence of each feature data in the dimension is calculated, for a plurality of preset dimensions, the inter-class divergence of the feature data in a single preset temperature with respect to other respective preset dimensions is calculated, since the intra-class divergence and the inter-class divergence are both expressed in a matrix form, and therefore, for a single feature data, the product of the intra-class divergence of the feature data and the inter-class divergence of the preset temperature of the feature data is taken as a feature vector, taking the characteristic value corresponding to the characteristic vector as the characteristic value of the characteristic data; and sequencing the characteristic values of the characteristic data from large to small, and taking a second preset number of characteristic data which are sequenced in the front as target characteristic data to obtain data after dimension reduction, wherein the target characteristic data represent the data characteristics of the motion data in a corresponding motion state.
In the technical scheme disclosed in this embodiment, the motion data is classified by the nearest neighbor classifier, the motion state corresponding to the motion data is determined according to the motion state corresponding to the first preset number of preset motion data that is closest to the motion data, and the obtained motion state of the user is more accurate by nearest neighbor classification.
In yet another embodiment, as shown in fig. 4, on the basis of the embodiment shown in any one of fig. 2 to 3, the step S30 includes:
step S31, inputting the heart rate data into a neural network model corresponding to the motion state;
and step S32, acquiring the heart rate value output by the neural network model.
In this embodiment, after the current motion state of the user is obtained, heart rate data currently detected by a heart rate sensor is obtained, a neural network model corresponding to the motion state is obtained, the heart rate data is input to the neural network model corresponding to the motion state, the neural network model outputs a result, and the result is the current actual heart rate value of the user.
Optionally, the wearable device stores a plurality of neural network models, and the motion states corresponding to different neural network models are different, and the wearable device may directly input the heart rate data to the locally stored neural network model to obtain the output heart rate value.
Optionally, the wearable device is connected with a cloud server, the cloud server stores a plurality of neural network models, the motion states corresponding to different neural network models are different, the wearable device sends the motion state information and the heart rate data to the cloud server, so that the cloud server feeds back the heart rate value, wherein the motion state information sent to the cloud server is different when the motion states corresponding to the obtained motion data are different.
Optionally, the neural network model corresponding to each motion state is trained in advance. Specifically, a plurality of historical motion data acquired by a motion sensor are acquired, the motion state of a user when the historical motion data are acquired is used as the motion state corresponding to the historical motion data, a plurality of historical motion data corresponding to each motion state are acquired, an initial preset model corresponding to each motion state is acquired, a time period corresponding to each historical motion data corresponding to each motion state is determined for each single motion state when the historical motion data are acquired, heart rate data acquired by a heart rate sensor in the acquisition time period are used as the heart rate data of the user in the motion state, the initial model corresponding to the motion state is trained according to the heart rate data, and therefore the neural network model corresponding to the motion state is obtained. When the initial model is trained, the activation function is a sigmoid function, in order to prevent overfitting of the model, regularization operation can be added to the convolution layer, and a Drop out layer of 30% is added to the full-connection layer; when an initial model is trained, a mean square error loss function and an Adam optimization algorithm are selected, the number of circulation times is set to be N epochs, the learning rate is set to be l, the input of a network is a PPG signal, the output of the network is a heart rate value at a corresponding moment, the training is stopped when the mean square error is smaller than a set threshold value, and a neural network model corresponding to the motion state is obtained, wherein the mean square error loss function formula is as follows:
wherein, Yi is neural network's output, and Yi is neural network's expectation output, and the expectation output is the standard value of rhythm of the heart promptly, and the rhythm of the heart of user at corresponding time point is detected to the more accurate rhythm of the heart detection device of accessible, obtains this standard value, and more accurate rhythm of the heart detection device can include the rhythm of the heart area. The variables such as the set threshold, the number of cycles N, the learning rate, etc. can be determined by debugging after accumulating a large amount of test data.
Optionally, when training the neural network model corresponding to each motion state, a plurality of historical motion data acquired by the motion sensor and heart rate data acquired by the heart rate sensor may be preprocessed, and the neural network model may be trained according to the preprocessed data, where the preprocessing includes at least one of filtering, segmentation, and normalization.
In the technical scheme disclosed in this embodiment, the heart rate value under the different motion states of user is obtained through different neural network models, reduces the influence of the different motion states of user to heart rate detection, improves the accuracy of heart rate detection, and compare in traditional mode of revising the heart rate value according to certain error, the neural network model can be according to the corresponding heart rate value of arbitrary heart rate data output, the heart rate value that obtains is more accurate.
In another embodiment, as shown in fig. 5, on the basis of the embodiment shown in any one of fig. 2 to 4, before step S30, the method further includes:
step S50, preprocessing the heart rate data, where the preset processing includes at least one of filtering processing, segmentation processing, and normalization processing;
step S30 includes:
and step S33, processing the preprocessed heart rate data according to the motion state to obtain the heart rate value.
In this embodiment, before being handled heart rate data according to the motion state, still can carry out preliminary treatment to heart rate data to optimize heart rate data, the heart rate value that obtains according to the heart rate data after the optimization is more accurate.
Optionally, in the preprocessing, the heart rate data is first subjected to a filtering process, and the filtering process may be implemented by a band-pass filter. Because the heart rate data is the continuous signal of the collection in a period of time usually, therefore, after the filtering process, the heart rate data after the filtering process is segmented and cut into the heart rate data of a plurality of segments of different time periods, so as to process the heart rate data in different time periods separately. After segmentation, normalization processing is carried out on the segmented and cut heart rate data so as to simplify the processing process. And after the normalization processing, processing the heart rate data after the normalization processing according to the motion state to obtain a heart rate value.
Optionally, the motion state corresponding to the motion data is obtained, the motion data may be preprocessed, and the corresponding motion state is obtained according to the preprocessed motion data.
In the technical scheme disclosed in this embodiment, the heart rate data is optimized, and the heart rate value is calculated according to the optimized heart rate data, so that the calculation process is simplified, and the accuracy of the calculated heart rate value is improved.
In addition, an embodiment of the present invention further provides a wearable device, where the wearable device includes: the heart rate detection method comprises a memory, a processor and a heart rate detection program stored on the memory and capable of running on the processor, wherein the steps of the heart rate detection method are realized when the heart rate detection program is executed by the processor.
In addition, an embodiment of the present invention further provides a computer storage medium, where a heart rate detection program is stored on the computer storage medium, and when the heart rate detection program is executed by a processor, the steps of the heart rate detection method according to the above embodiments are implemented.
In another embodiment, referring to fig. 6 and 7, based on the embodiment shown in any one of fig. 2 to 5, fig. 6 is a schematic diagram of a component module of a heart rate detection device, and fig. 7 is a schematic flow chart of a heart rate detection method. The specific technical scheme of the embodiment is as follows:
a training stage: 1. the heart rate sensor, the acceleration sensor and the geomagnetic sensor are used for respectively acquiring human body signals of different motion states for a period of time, and the electrocardiogram recorder is used for recording the heart rates of the different motion states as labels. The signal is filtered using a band pass filter, segmented cut and normalized.
2. And selecting data signals of the acceleration sensor and the geomagnetic sensor, performing data dimensionality reduction and feature selection by using an LDA linear discriminant analysis method, and selecting the front k features as the input of the nearest neighbor KNN classifier. And training a nearest neighbor KNN classification model by using the k characteristics and the corresponding different motion states, and judging whether the input signal corresponds to the output state by adopting a classification rule of majority voting.
3. Selecting a heart rate sensor to collect signals of different motion states, respectively training different neural network models according to the different motion states, wherein an activation function is a sigmoid function, and 30% Drop out is added to a full connection layer in order to prevent overfitting and adding regularization operation to a convolutional layer. Selecting a mean square error loss function and an Adam optimization algorithm, setting the cycle number as N epochs, setting the learning rate as l, inputting PPG signals into the network, and outputting the PPG signals as heart rate values at corresponding moments. And stopping training when the training error is smaller than a set threshold value, and obtaining parameters of the neural network model for predicting the exercise heart rate.
Heart rate detection stage: the method comprises the steps of collecting human body signals of different motion states for a period of time by using a heart rate sensor, an acceleration sensor and a geomagnetic sensor respectively, filtering the signals by using a band-pass filter, and carrying out segmentation cutting and normalization. And (3) performing data dimensionality reduction and feature selection by using an LDA (linear discriminant analysis) method, inputting the features subjected to dimensionality reduction into a nearest neighbor KNN (K nearest neighbor) classifier, and classifying signals of the acceleration sensor and signals of the geomagnetic sensor by using the trained nearest neighbor KNN classifier to obtain different motion states. And selecting a corresponding heart rate prediction neural network model according to the classified motion state, and outputting a heart rate value.
In the technical scheme disclosed in the embodiment, different motion states are accurately and quickly classified by fusing multi-sensor data, a neural network model is trained aiming at the different motion states, and the heart rate is predicted by using the different neural network models. Therefore, heart rate prediction errors caused by the change of the motion state are effectively reduced, and the accuracy and the real-time performance of heart rate detection are improved. The algorithm related to the technical scheme has accuracy, self-adaptability and real-time performance, and the heart rate prediction method can obtain accurate heart rate values in both static and dynamic scenes, and is particularly suitable for heart rate prediction in physical exercise.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.