Method and device for determining cycling training load, storage medium and electronic device
By dividing cycling records into motion segments and using information obtained from mobile phone GPS to build a multilayer perceptron regression model, the problem of difficulty in obtaining heart rate data for users who do not use wearable devices is solved, and the effect of accurately calculating training load is achieved.
Patent Information
- Application Number
- CN202311865586.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-30
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2043-12-30
AI Technical Summary
Existing technologies make it difficult to obtain heart rate data from users who are not using wearable devices, making it difficult to calculate training load during cycling.
Cycling records are divided into multiple motion segments. User attributes, weather, and speed information are obtained through mobile phone GPS. A multilayer perceptron regression model is then constructed to predict training load.
Accurately calculate the training load for users who are not using wearable devices, helping them adjust their exercise plans and avoid sports injuries.
Smart Images

Figure CN117618856B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of training load determination technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining cycling training load. Background Technology
[0002] Training load is an important indicator for guiding users to engage in long-term and effective exercise. It reflects the fatigue generated by the body during training, helps users clarify training goals and adjust training plans, avoid overtraining, and prevent sports injuries.
[0003] Specifically, in the context of cycling, the number of people engaging in outdoor cycling activities is increasing daily, and calculating training load helps in developing effective cycling plans and preventing sports injuries. However, current training load calculations are based primarily on real-time heart rate, which needs to be collected using wearable devices. For users who do not use wearable devices, it is difficult to obtain real-time heart rate data and calculate training load.
[0004] There is currently no effective solution to the problem that it is difficult to obtain heart rate data from users who are not using wearable products, thus making it difficult to calculate the training load of users during exercise. Summary of the Invention
[0005] This application provides a method, apparatus, storage medium, and electronic device for determining cycling training load, in order to solve the problem in the related art that it is difficult to obtain the heart rate data of users who do not use wearable products, thus making it difficult to calculate the training load of users during exercise.
[0006] According to one aspect of this application, a method for determining cycling training load is provided. The method includes: dividing a target user's entire cycling record into M motion segments, where M is a positive integer; determining N feature matrices based on the data from the M motion segments, where N is a positive integer less than or equal to M, each feature matrix including at least one of the following: user attribute information, weather information, gradient information, and speed information; inputting the N feature matrices into a target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; and accumulating the training loads of the N motion segments to obtain the total training load of the target user's cycling.
[0007] Optionally, determining N feature matrices based on the data of M motion segments includes: determining an initial feature matrix based on the data of each motion segment to obtain M initial feature matrices; obtaining the numerical range matching the value of each element in the initial feature data, identifying the initial feature matrix where the value of at least one element exceeds the matching numerical range as an abnormal feature matrix, removing the abnormal feature matrices from the M initial feature matrices to obtain N initial feature matrices; normalizing the values of the elements in the N initial feature matrices, and forming a feature matrix from the normalized elements in each initial feature matrix to obtain N feature matrices, wherein the value of each element is normalized based on the values of elements of the same type in the N initial feature matrices.
[0008] Optionally, determining an initial feature matrix based on the data of each motion segment includes: obtaining the target user's attribute information, wherein the attribute information includes at least one of the following: gender, age, height, and weight; obtaining the target user's location data and the weather information of the cycling location, wherein the weather information includes at least temperature and wind information; obtaining the beginning and end positions of a motion segment from the location data, and determining the slope and speed information based on the beginning and end positions; determining each piece of attribute information, each piece of weather information, each piece of speed information, and each piece of slope information as an element, and determining an initial feature matrix of the motion segment based on all the elements.
[0009] Optionally, determining the slope and speed information based on the initial and final positions includes: calculating the ratio of the horizontal distance between the initial and final positions to the altitude to obtain the slope information; determining the relative posture and riding time between the initial and final positions, and calculating the real-time speed and speed heading angle based on the relative posture and riding time; extracting the wind direction from the wind information in the weather information, and calculating the cosine of the angle between the speed heading angle and the wind direction; calculating the global average speed based on the total distance and total riding time of the entire riding record, and calculating the speed ratio between the real-time speed and the global average speed; and determining the angle cosine, speed ratio, and global average speed as speed information.
[0010] Optionally, obtaining the target user's location data and the weather information of the cycling location includes: obtaining data collected by the positioning sensor on the terminal device carried by the target user to obtain the target user's location data; determining the area information of the cycling location based on the location data; and calling the interface of the weather application based on the area information of the cycling location to obtain the weather information of the cycling location.
[0011] Optionally, the target model is obtained by: extracting multiple sample motion segments from the cycling records of multiple cycling users using wearable devices, wherein the wearable devices are used to detect the user's heart rate; determining a sample feature matrix based on each sample motion segment, and obtaining the heart rate data of the cycling user for each sample motion segment collected by the wearable device, thus obtaining sample heart rate data; determining the sample feature matrix and sample heart rate data of each sample motion segment as a set of sample data, thus obtaining multiple sets of sample data; and training a preset model based on the multiple sets of sample data to obtain the target model.
[0012] Optionally, the target model is a multilayer perceptron regression model, which consists of an input layer, a hidden layer, and an output layer. The input layer and the output layer each contain one neuron and one activation function. The hidden layer includes a first hidden layer and a second hidden layer connected in series. The first hidden layer contains five neurons and one activation function, and the second hidden layer contains two neurons and one activation function.
[0013] According to another aspect of this application, a device for determining cycling training load is provided. The device includes: a segmentation unit for dividing a target user's entire cycling record into M motion segments, where M is a positive integer; a determination unit for determining N feature matrices based on the data from the M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following: user attribute information, weather information, slope information, and speed information; a processing unit for inputting the N feature matrices into a target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; and an accumulation unit for accumulating the training load of the N motion segments to obtain the total training load of the target user's cycling.
[0014] According to another aspect of the present invention, a computer storage medium is also provided for storing a program, wherein the program, when running, controls the device where the non-volatile storage medium is located to execute a method for determining cycling training load.
[0015] According to another aspect of the present invention, an electronic device is also provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform a method for determining cycling training load.
[0016] This application employs the following steps: dividing the target user's entire cycling record into M motion segments, where M is a positive integer; determining N feature matrices based on the data from the M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following: user attribute information, weather information, slope information, and speed information; inputting the N feature matrices into the target model for processing to obtain the training load for the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; accumulating the training loads of the N motion segments to obtain the total training load for the target user's cycling, thus solving the problem in related technologies where it is difficult to obtain heart rate data from users who do not use wearable products, making it difficult to calculate the user's training load during exercise. By determining feature matrices based on multiple motion segments of the entire cycling record, and determining the training load for each motion segment corresponding to each feature matrix through the model, the total training load is obtained by accumulating the training loads of all running segments, thereby achieving the effect of accurately determining the training load for users who do not use wearable products. Attached Figure Description
[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a flowchart of a method for determining cycling training load according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the target model according to an embodiment of this application;
[0020] Figure 3 This is a flowchart of an optional method for determining cycling training load according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of a cycling training load determination device according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] To address the difficulty in obtaining heart rate data from users who are not using wearable devices, thus hindering the calculation of training load during exercise, the following methods have emerged in related technologies:
[0027] As a personal item carried by users, mobile phones contain GPS sensors that can acquire a wealth of motion information, allowing for the calculation of a cyclist's training load. However, cycling activities can vary significantly in pace due to different route choices and equipment, making it difficult to establish a correlation between pace and heart rate, and thus difficult to calculate the training load.
[0028] Therefore, this application aims to provide a solution that can solve the above-mentioned technical problems, the details of which will be described in subsequent embodiments.
[0029] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties.
[0030] According to an embodiment of this application, a method for determining cycling training load is provided.
[0031] Figure 1 This is a flowchart of a method for determining cycling training load according to an embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0032] Step S102: Divide the target user's entire cycling record into M motion segments, where M is a positive integer.
[0033] Specifically, the target users can be outdoor cyclists. Since the length of outdoor cycling varies greatly, the entire cycling record can be divided into multiple exercise segments, and then the training load can be determined. For example, if the entire cycling record is 15 minutes long and each exercise segment is 30 seconds long, then it can be divided into 30 exercise segments.
[0034] Step S104: Determine N feature matrices based on the data of M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following information: user attribute information, weather information, slope information, and speed information.
[0035] Specifically, a feature matrix is determined based on the data from each motion segment. Since the motion segment data may contain anomalies, the number of valid feature matrices is less than or equal to the total number of motion segments. Each feature matrix can contain information such as user attributes, weather information, slope information, and speed information. Attribute information may include descriptions of the user such as gender, age, height, and weight; weather information may include temperature and wind information; and speed information may include the magnitude and direction of the speed. Determining the feature matrix based on multiple dimensions of information from the motion segment lays the data foundation for accurately determining the training load of the motion segment.
[0036] Step S106: Input the N feature matrices into the target model for processing to obtain the training load of N motion segments. The target model is trained from multiple sets of sample data. Each set of sample data includes a sample feature matrix and a sample training load calculated based on the sample heart rate data.
[0037] The target model is a model that predicts cycling training load based on the feature matrix. It needs to be trained in advance. Optionally, the target model is obtained in the following way: extract multiple sample motion segments from the cycling records of multiple cycling users using wearable devices, where the wearable devices are used to detect the user's heart rate; determine the sample feature matrix based on each sample motion segment, and obtain the heart rate data of the cycling user for each sample motion segment collected by the wearable device to obtain sample heart rate data; determine the sample feature matrix and sample heart rate data of each sample motion segment as a set of sample data to obtain multiple sets of sample data; train the preset model based on the multiple sets of sample data to obtain the target model.
[0038] Specifically, since users of wearable devices can collect heart rate data through the wearable devices, thereby calculating the training load, sample feature matrices can be extracted from the cycling records of sample users using wearable devices and the sample training load can be calculated to obtain sample data. Based on multiple sets of sample data from multiple sample users, a preset model can be trained to obtain the target model.
[0039] Optionally, the target model is a multilayer perceptron regression model, which consists of an input layer, a hidden layer, and an output layer. The input layer and the output layer each contain one neuron and one activation function. The hidden layer includes a first hidden layer and a second hidden layer connected in series. The first hidden layer contains five neurons and one activation function, and the second hidden layer contains two neurons and one activation function.
[0040] Figure 2 This is a schematic diagram of the target model according to an embodiment of this application, such as... Figure 2 As shown, the feature matrix of a motion segment is input into the input layer of the target model. The neurons in the input layer are connected to the neurons in the first hidden layer. The five neurons in the first hidden layer are connected to the two neurons in the second hidden layer. The features in the feature matrix are processed by the neurons in the first and second hidden layers. The training load of the motion segment is output by the neurons in the output layer. The neurons in the hidden layer generate the output through the activation function, such as ReLU or tanh.
[0041] Step S108: Accumulate the training load of N motion segments to obtain the total training load of the target user's cycling.
[0042] That is, the training load of each effective motion segment is determined based on the feature matrix, and the sum of the training loads of all effective motion segments is the total training load of the target user's cycling.
[0043] The method for determining cycling training load provided in this application divides the entire cycling record of a target user into M motion segments, where M is a positive integer; N feature matrices are determined based on the data of the M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following: user attribute information, weather information, slope information, and speed information; the N feature matrices are input into a target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; the training load of the N motion segments is accumulated to obtain the total training load of the target user's cycling, thus solving the problem in related technologies where it is difficult to obtain heart rate data of users who do not use wearable products, making it difficult to calculate the user's training load during exercise. By determining feature matrices based on multiple motion segments of the entire cycling record and determining the training load of each motion segment corresponding to each feature matrix through the model, the total training load is obtained by accumulating the training load of all running segments, thereby achieving the effect of accurately determining the training load of users who do not use wearable products.
[0044] To ensure the accuracy of the feature matrix and facilitate its processing by the target model, optionally, in the method for determining cycling training load provided in this application embodiment, determining N feature matrices based on data from M motion segments includes: determining an initial feature matrix based on the data from each motion segment to obtain M initial feature matrices; obtaining the numerical range matching the value of each element in the initial feature data, identifying initial feature matrices where at least one element's value exceeds the matching numerical range as abnormal feature matrices, removing abnormal feature matrices from the M initial feature matrices to obtain N initial feature matrices; normalizing the values of the elements in the N initial feature matrices, and forming a feature matrix from the normalized elements in each initial feature matrix to obtain N feature matrices, wherein the value of each element is normalized based on the values of elements of the same type in the N initial feature matrices.
[0045] Specifically, determining the initial feature matrix based on the data from each motion segment involves extracting user attribute information, weather information, slope information, and speed information from the motion segment data. Each feature extracted is treated as an element, and multiple elements form the initial feature matrix. It should be noted that the types and data of the elements in the initial feature matrix can be preset. If any elements in the initial feature matrix determined from the collected data are missing, they can be supplemented using statistical data from the server-side database. For example, if temperature is missing, a default value of 25 degrees is used; if wind direction and wind intensity are missing, they are replaced with 0.
[0046] After obtaining the initial feature matrix, outlier handling is performed. Specifically, training set data can be acquired first, and then the matching data range can be determined based on the values of each feature in the training set data. For example, various features can be extracted from cycling data longer than 15 minutes from 100,000 sample users to form the training set data. The mean and standard deviation of each feature in the training set data can be calculated, and the matching numerical range of each feature can be determined by adding or subtracting three times the standard deviation from the mean. Further, it is determined whether the values of the elements in the initial feature matrix are within the matching numerical range. If the values of all elements in the initial feature matrix are within the matching numerical range, it is considered a normal feature matrix. If at least one element in the initial feature matrix is within the matching numerical range, it is considered an outlier feature matrix. Outlier feature matrices are removed from multiple initial feature matrices to obtain a valid feature matrix. This ensures that the feature matrix used to determine the training load can accurately represent the user's cycling situation and the surrounding environment, laying a data foundation for improving the accuracy of determining the training load. It should be noted that the probability of anomalies in user attribute information such as gender and temperature is relatively small. In order to improve the efficiency of outlier handling, gender and temperature information may not be processed for outliers.
[0047] Furthermore, feature normalization is performed on the values of the elements in the feature matrix. Specifically, for the effective feature matrix obtained after filtering, the mean (feature_mean) and variance (feature_std) of each feature are calculated, and the processed features are determined using the following standard normalization method: feature_processed = (feature_raw - feature_mean) / feature_std. The value of the processed feature, feature_processed, falls between 0 and 1, which facilitates the processing of the feature matrix by the target model.
[0048] Each element in the feature matrix is used to characterize the user's cycling status and surrounding environment. Optionally, determining an initial feature matrix based on the data of each motion segment includes: obtaining the target user's attribute information, wherein the attribute information includes at least one of the following: gender, age, height, and weight; obtaining the target user's location data and the weather information of the cycling location, wherein the weather information includes at least temperature and wind information; obtaining the beginning and end positions of a motion segment from the location data, and determining the slope and speed information based on the beginning and end positions; determining each attribute information, each weather information, each speed information, and the slope information as an element, and determining an initial feature matrix of the motion segment based on all the elements.
[0049] Specifically, multiple attribute information of the target user can generate multiple elements. For example, age, gender, height, and weight in the attribute information can generate elements Age, gender, height, and weight. Multiple weather information can generate multiple elements. For example, temperature and wind intensity in the weather information can generate elements temperature and wind_level. Slope can generate an element slope_windows. Speed information can include global average speed, the ratio of window pace to average pace, and the cosine of the angle between the window heading angle and the wind direction angle, which can generate elements Pace_mean, Pace_windows / Pace_mean, and cos_windows. These elements constitute the feature matrix [age, gender, height, weight, temperature, wind_level, slope_windows, Pace_mean, Pace_windows / Pace_mean, cos_windows].
[0050] Location data can be obtained through the terminal device carried by the target user. Optionally, obtaining the target user's location data and the weather information of the cycling location includes: obtaining the data collected by the positioning sensor on the terminal device carried by the target user to obtain the target user's location data; determining the area information of the cycling location based on the location data; and calling the interface of the weather application based on the area information of the cycling location to obtain the weather information of the cycling location.
[0051] Specifically, the target user's terminal device can be a mobile phone, and the positioning sensor can be a GPS (Global Positioning System) sensor installed on the mobile phone. The GPS sensor can obtain latitude and longitude information, and can locate the specific location based on the latitude and longitude information of the target user's start or end. Based on the specific location, the administrative region information of the cycling location can be determined. A weather application can be installed on the mobile phone, and the local weather forecast can be queried from the weather application based on the administrative region information, and weather information such as temperature, wind direction and intensity of the day can be obtained.
[0052] The starting position is determined based on the latitude and longitude information collected from the beginning of the motion segment, and the ending position is determined based on the latitude and longitude information collected from the end of the motion segment. Optionally, determining the slope and speed information based on the starting and ending positions includes: calculating the ratio of the horizontal distance between the starting and ending positions to the altitude to obtain the slope information; determining the relative pose and riding time between the starting and ending positions, and calculating the real-time speed and speed heading angle based on the relative pose and riding time; extracting the wind direction from the wind information in the weather information, and calculating the cosine of the angle between the speed heading angle and the wind direction; calculating the global average speed based on the total distance and total riding time of the entire riding record, and calculating the speed ratio between the real-time speed and the global average speed; and determining the angle cosine, speed ratio, and global average speed as speed information.
[0053] Specifically, the horizontal distance between the beginning and end positions is determined based on the latitude and longitude information obtained by the GPS sensor. The GPS sensor can also record the elevation changes between the beginning and end positions and calculate the ratio of horizontal distance to elevation, which is the current slope of the motion segment.
[0054] The length of the route segment between the initial and final positions can be determined based on the latitude and longitude changes obtained from GPS sensors. The ratio between the length of the route segment and the time of the motion segment is calculated to obtain the real-time speed. The direction of the speed is determined based on the relative position between the initial and final positions, and the angle between the direction of the speed and true north is determined as the heading angle.
[0055] Furthermore, the cosine value of the angle between the speed heading angle and the wind direction (0-180°) is calculated, where the wind direction is obtained from the weather forecast for the day, and the wind heading angle is calculated in real time. This embodiment calculates the gradient of the uphill section and the cosine value of the angle between the speed heading angle and the wind direction for the motion segment, so that the elements in the feature matrix can reflect the influence of uphill and wind direction on cycling.
[0056] Furthermore, the entire cycling activity can be traversed, excluding pause sections, to calculate the average pace and obtain the global average speed. Then, the ratio of the real-time speed of a movement segment to the global average speed can be calculated. In this embodiment, calculating the ratio of the real-time speed of a movement segment to the global average speed is equivalent to converting the speed into a relative value, which can effectively eliminate pace differences caused by bicycle type and user ability.
[0057] Figure 3 This is a flowchart of an optional method for determining cycling training load according to an embodiment of this application. Figure 3 As shown, the method includes:
[0058] It acquires cycling record data, calculates the global average speed, obtains user attribute information, which may include age, gender, height, weight, etc., and obtains weather information for the cycling location on that day, which may include temperature, wind direction, and wind intensity.
[0059] Furthermore, the entire cycling record is divided into multiple motion segments, each corresponding to a time window. Each motion segment is iterated over, with one counter accumulating the time of the traversed window and another counter accumulating the training load of the motion segment. During each iteration, it is determined whether the accumulated time of the traversed window is greater than the total exercise duration.
[0060] If the cumulative time of the traversal is less than the total motion time, calculate the average speed of the window, and then calculate the ratio of the average speed of the window to the global average speed, the ratio of the speed heading angle to the wind speed, and the average slope of the window. Concatenate these calculated information with the acquired user attribute information and temperature information to obtain the initial feature matrix.
[0061] Furthermore, the initial feature matrix undergoes anomaly processing and normalization. The processed feature matrix is then input into the cycling training load estimation model to obtain the training load for each motion segment. Simultaneously, the training load for each traversed motion segment is accumulated. If the traversed window time is greater than or equal to the total exercise duration, the accumulated training load is input.
[0062] This embodiment enables accurate calculation of training load indicators for outdoor cyclists even when they are not using wearable devices. This enriches the exercise indicators and helps users adjust their exercise plans more accurately to better achieve their goals.
[0063] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0064] This application also provides a device for determining cycling training load. It should be noted that this device can be used to execute the method for determining cycling training load provided in this application. The following describes the device for determining cycling training load provided in this application.
[0065] Figure 4 This is a schematic diagram of a cycling training load determination device according to an embodiment of this application. Figure 4 As shown, the device includes: a division unit 402, a determination unit 404, a processing unit 406, and an accumulation unit 408.
[0066] The segmentation unit 402 is used to divide the entire cycling record of the target user into M motion segments, where M is a positive integer.
[0067] The determining unit 404 is used to determine N feature matrices based on the data of M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following information: user attribute information, weather information, slope information, and speed information.
[0068] The processing unit 406 is used to input the N feature matrices into the target model for processing to obtain the training load of N motion segments. The target model is trained by multiple sets of sample data, and each set of sample data includes a sample feature matrix and a sample training load calculated based on the sample heart rate data.
[0069] Accumulation unit 408 is used to accumulate the training load of N motion segments to obtain the total training load of the target user's cycling.
[0070] The cycling training load determination device provided in this application embodiment, through the determination unit 404, determines N feature matrices based on data from M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following information: user attribute information, weather information, slope information, and speed information; the processing unit 406 inputs the N feature matrices into the target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, and each set of sample data includes a sample feature matrix and a sample training load calculated based on sample heart rate data; the accumulation unit 408 accumulates the training load of the N motion segments to obtain the total training load of the target user's cycling, thus solving the problem in related technologies that it is difficult to obtain the heart rate data of users who do not use wearable products, thereby making it difficult to calculate the training load of users during exercise. The device determines the feature matrix based on multiple motion segments of the entire cycling record, and determines the training load of the motion segment corresponding to each feature matrix through the model. The total training load is obtained by accumulating the training load of all running segments, thereby achieving the effect of accurately determining the training load of users who do not use wearable products.
[0071] Optionally, in the cycling training load determination device provided in this application embodiment, the determination unit 404 includes: a first determination module, configured to determine an initial feature matrix based on the data of each motion segment, to obtain M initial feature matrices; a removal module, configured to obtain the numerical range matching the value of each element in the initial feature data, determine the initial feature matrix where the value of at least one element exceeds the matching numerical range as an abnormal feature matrix, remove the abnormal feature matrix from the M initial feature matrices, to obtain N initial feature matrices; and a processing module, configured to normalize the values of the elements in the N initial feature matrices, and form a feature matrix from the normalized elements in each initial feature matrix, to obtain N feature matrices, wherein the value of each element is normalized based on the values of the same type of elements in the N initial feature matrices.
[0072] Optionally, in the cycling training load determination device provided in this application embodiment, the first determination module includes: a first acquisition submodule, used to acquire attribute information of the target user, wherein the attribute information includes at least one of the following: gender, age, height, and weight; a second acquisition submodule, used to acquire the target user's location data and the weather information of the cycling location, wherein the weather information includes at least temperature and wind information; a third acquisition submodule, used to acquire the beginning and end positions of a motion segment from the location data, and determine slope information and speed information based on the beginning and end positions; and a determination submodule, used to determine each piece of attribute information, each piece of weather information, each piece of speed information, and slope information as an element, and determine an initial feature matrix of the motion segment based on all the elements.
[0073] Optionally, in the cycling training load determination device provided in this application embodiment, the third acquisition submodule is further configured to: calculate the ratio of the horizontal distance between the beginning position and the end position to the altitude to obtain slope information; determine the relative pose and cycling time between the beginning position and the end position, and calculate the real-time speed and speed heading angle based on the relative pose and cycling time; extract the wind direction from the wind information in the weather information, and calculate the cosine value of the angle between the speed heading angle and the wind direction; calculate the global average speed based on the total distance and total cycling time of the entire cycling record, and calculate the speed ratio between the real-time speed and the global average speed; and determine the angle cosine value, the speed ratio, and the global average speed as speed information.
[0074] Optionally, in the cycling training load determination device provided in this application embodiment, the second acquisition submodule is further configured to: acquire data collected by the positioning sensor on the terminal device carried by the target user to obtain the target user's positioning data; determine the area information of the cycling location based on the positioning data; and call the interface of the weather application based on the area information of the cycling location to obtain the weather information of the cycling location.
[0075] Optionally, the cycling training load determination device provided in this application embodiment further includes a model determination unit for determining a target model. The model determination unit includes: an extraction module for extracting multiple sample motion segments from the cycling records of multiple cycling users using wearable devices, wherein the wearable devices are used to detect the user's heart rate; a second determination module for determining a sample feature matrix based on each sample motion segment and obtaining the heart rate data of the cycling user for each sample motion segment collected by the wearable device, thereby obtaining sample heart rate data; a third determination module for determining the sample feature matrix and sample heart rate data of each sample motion segment as a set of sample data, thereby obtaining multiple sets of sample data; and a training module for training a preset model based on the multiple sets of sample data to obtain the target model.
[0076] Optionally, in the cycling training load determination device provided in the embodiments of this application, the target model is a multilayer perceptron regression model, which consists of an input layer, a hidden layer and an output layer. The input layer and the output layer each contain one neuron and one activation function. The hidden layer includes a first hidden layer and a second hidden layer connected in series. The first hidden layer contains five neurons and one activation function, and the second hidden layer contains two neurons and one activation function.
[0077] The above-mentioned device for determining cycling training load includes a processor and a memory. The division unit 402, determination unit 404, processing unit 406 and accumulation unit 408 are all stored in the memory as program units. The processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0078] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the difficulty in obtaining heart rate data from users not using wearable devices, thus hindering the calculation of training load during exercise.
[0079] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0080] This application embodiment also provides a computer storage medium for storing a program. During program execution, the program controls the device containing the non-volatile storage medium to perform the following method for determining cycling training load: dividing the entire cycling record of the target user into M motion segments, where M is a positive integer; determining N feature matrices based on the data of the M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following: user attribute information, weather information, slope information, and speed information; inputting the N feature matrices into a target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; accumulating the training load of the N motion segments to obtain the total training load of the target user's cycling.
[0081] This application also provides an electronic device. Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application. The electronic device 50 includes a processor and a memory. The memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions. When the computer-readable instructions are executed, they perform the following method for determining the cycling training load: dividing the entire cycling record of the target user into M motion segments, where M is a positive integer; determining N feature matrices based on the data of the M motion segments, where N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following: user attribute information, weather information, slope information, and speed information; inputting the N feature matrices into a target model for processing to obtain the training load of the N motion segments, wherein the target model is trained from multiple sets of sample data, each set of sample data including a sample feature matrix and a sample training load calculated based on sample heart rate data; accumulating the training load of the N motion segments to obtain the total training load of the target user's cycling. The electronic device in this document can be a server, PC, PAD, mobile phone, etc.
[0082] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0083] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0084] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0085] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0086] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0087] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0088] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0089] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0090] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for determining a cycling training load, characterized in that The method comprises the following steps: dividing a whole ride record of a target user into M movement segments, wherein M is a positive integer; determining N feature matrices according to data of the M movement segments, wherein N is a positive integer less than or equal to M, and each feature matrix comprises at least one of the following information: user attribute information, weather information, slope information and speed information; inputting the N feature matrices into a target model for processing to obtain training loads of the N movement segments, wherein the target model is trained by a plurality of sets of sample data, and each set of sample data comprises a sample feature matrix and a sample training load calculated according to sample heart rate data; accumulating the training loads of the N movement segments to obtain a total training load of the ride of the target user.
2. The method of claim 1, wherein, The step of determining N feature matrices according to data of the M movement segments comprises the following steps: determining an initial feature matrix according to data of each movement segment to obtain M initial feature matrices; acquiring a value matching range of each element in the initial feature data, determining an initial feature matrix in which at least one element has a value exceeding the value matching range as an abnormal feature matrix, removing the abnormal feature matrix from the M initial feature matrices to obtain N initial feature matrices; normalizing values of elements in the N initial feature matrices to form a feature matrix from normalized elements in each initial feature matrix to obtain the N feature matrices, wherein the value of each element is normalized based on values of the same type of elements in the N initial feature matrices.
3. The method of claim 2, wherein, The step of determining an initial feature matrix according to data of each movement segment comprises the following steps: acquiring the attribute information of the target user, wherein the attribute information comprises at least one of the following: gender, age, height and weight; acquiring positioning data of the target user and weather information of a ride location, wherein the weather information comprises at least temperature and wind information; acquiring a start position and an end position of a movement segment from the positioning data, and determining slope information and speed information according to the start position and the end position; determining each piece of attribute information, each piece of weather information, each piece of speed information and the slope information as elements, and determining an initial feature matrix of the movement segment according to all the elements.
4. The method of claim 3, wherein, The step of determining slope information and speed information according to the start position and the end position comprises the following steps: calculating a ratio of a horizontal distance between the start position and the end position to an altitude to obtain the slope information; determining a relative pose and a ride duration between the start position and the end position, and calculating a real-time speed and a speed heading angle according to the relative pose and the ride duration; extracting a wind direction from the wind information in the weather information, and calculating a cosine value of an included angle between the speed heading angle and the wind direction; calculating a global average speed according to a total distance and a total ride duration of the whole ride record, and calculating a speed ratio of the real-time speed to the global average speed; determining the cosine value, the speed ratio and the global average speed as the speed information.
5. The method of claim 3, wherein, The step of acquiring positioning data of the target user and weather information of a ride location comprises the following steps: Obtaining data collected by a positioning sensor on a terminal device carried by the target user to obtain positioning data of the target user; According to the positioning data, the area information of the riding place is determined, and the interface of the weather application program is called according to the area information of the riding place to obtain the weather information of the riding place.
6. The method of claim 1, wherein, The target model is obtained by the following way: Extracting a plurality of sample motion segments from a plurality of riding records of a plurality of riding users using a wearable device, wherein the wearable device is used to detect the heart rate of the user; Determining a sample feature matrix based on each sample motion segment, and obtaining the heart rate data of the riding user of each sample motion segment collected by the wearable device to obtain sample heart rate data; Determining the sample feature matrix and the sample heart rate data of each sample motion segment as a group of sample data to obtain a plurality of groups of sample data; Training a preset model according to the plurality of groups of sample data to obtain the target model.
7. The method of claim 6, wherein, The target model is a multilayer perceptron regression model, which includes an input layer, a hidden layer and an output layer, wherein the input layer and the output layer each include one neuron and one activation function, the hidden layer includes a first hidden layer and a second hidden layer connected in series, the first hidden layer includes five neurons and one activation function, and the second hidden layer includes two neurons and one activation function.
8. An apparatus for determining a cycling training load, characterized in that Comprising: The division unit is used to divide the whole riding record of the target user into M motion segments, wherein M is a positive integer; The determination unit is used to determine N feature matrices according to the data of the M motion segments, wherein N is a positive integer less than or equal to M, and each feature matrix includes at least one of the following information: user attribute information, weather information, slope information and speed information; The processing unit is used to input the N feature matrices into the target model for processing to obtain the training load of the N motion segments, wherein the target model is trained by a plurality of groups of sample data, and each group of sample data includes a sample feature matrix and a sample training load calculated according to sample heart rate data; The accumulation unit is used to accumulate the training load of the N motion segments to obtain the total training load of the target user's riding.
9. A computer storage medium, characterized in that The computer storage medium is used to store a program, wherein the program controls the device where the computer storage medium is located to execute the determination method of the riding training load in any one of claims 1 to 7 when running.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the determination method of the riding training load in any one of claims 1 to 7 through the computer program. The memory stores a computer program, and the processor is configured to execute the determination method of the riding training load in any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Method and apparatus for determining and displaying force applied by cyclist
US20160041051A1
Methods and apparatus for analyzing and providing feedback of training effects, primary exercise benefits, training status, balance between training intensities and an automatic feedback system and apparatus for guiding future training
US20200261011A1