Motion amount detection method and device based on wearable device and storage medium
By collecting and processing motion data on wearable devices, using the motion quantity detection model of Transformer architecture, the problem of low motion quantity detection accuracy in the prior art is solved, and high-precision motion quantity detection and better efficiency are achieved.
Patent Information
- Application Number
- CN202411990841.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-13
AI Technical Summary
The fixed amount calculation formula used by existing wearable devices in motion detection cannot effectively adapt to diverse motion scenarios, resulting in low accuracy of the detection results.
By collecting motion data on the wearable device, feature extraction and time period division are performed, and the motion feature subsequences of different motion time periods are detected using the motion quantity detection model based on the Transformer architecture to generate a high-precision motion quantity index.
It improves the accuracy and efficiency of exercise volume detection, and can provide users with targeted high-precision exercise volume index to adapt to different exercise scenarios.
Smart Images

Figure CN119988862A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for detecting exercise volume based on a wearable device. Background Art
[0002] Scientific exercise can not only enhance physical fitness and improve appearance, but also has a significant effect on physical health, mental health, athletic performance, injury prevention, rehabilitation and delaying aging, helping to improve work efficiency and quality of life.
[0003] Currently, wearable devices can provide some simple exercise volume detection results, which collect the user's exercise steps or heart rate signal data and substitute them into a previously verified fixed exercise volume calculation formula to calculate the exercise volume result. However, the fixed exercise volume calculation formula cannot correspond to a variety of exercise scenarios, which affects the accuracy of the exercise volume detection results.
[0004] Therefore, how to improve the accuracy of motion detection to improve the accuracy of motion detection results has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The main purpose of the embodiments of the present application is to propose a method, device, equipment and storage medium for detecting exercise volume based on a wearable device, aiming to improve the accuracy of exercise volume detection and provide users with a targeted high-precision exercise volume index.
[0006] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a method for detecting an amount of exercise based on a wearable device, the method comprising:
[0007] Collect user's sports data through wearable devices;
[0008] Performing feature extraction processing on the motion data to obtain a motion feature sequence;
[0009] Dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods;
[0010] The exercise volume detection model based on the Transformer architecture is used to detect the exercise volume of each exercise feature subsequence in the exercise time period to obtain the exercise volume index of the user.
[0011] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes an exercise amount detection device based on a wearable device, the device comprising:
[0012] A motion data collection module is used to collect the user's motion data through a wearable device;
[0013] A motion feature extraction module, used for performing feature extraction processing on the motion data to obtain a motion feature sequence;
[0014] A motion feature division module, used for dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods;
[0015] The exercise volume detection module is used to perform exercise volume detection on the exercise feature subsequence of each exercise time period through an exercise volume detection model based on the Transformer architecture to obtain the user's exercise volume index.
[0016] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes a computer device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
[0017] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0018] The present application proposes a method, device, equipment and storage medium for detecting the amount of exercise based on a wearable device. The method for detecting the amount of exercise based on a wearable device collects the user's exercise data through a wearable device; performs feature extraction processing on the exercise data to obtain a motion feature sequence; performs motion time division processing on the motion feature sequence to obtain at least two motion feature subsequences of the motion time period; and performs motion amount detection on the motion feature subsequence of each motion time period through a motion amount detection model based on a Transformer architecture to obtain the user's exercise amount index. In this way, on the one hand, detailed exercise data can be collected very flexibly and conveniently using a wearable device, providing a more comprehensive analysis basis for the amount of exercise detection. On the other hand, by classifying the motion feature sequence in the motion data into motion time periods, the motion amount detection model based on the Transformer architecture can more clearly and meticulously capture the long-term dependency and complex temporal relationship in the motion features of different motion time periods, so as to better understand the contribution of the motion features of different motion time periods to the overall amount of exercise, and realize more refined and faster automated motion amount detection, thereby improving the accuracy and efficiency of the motion amount detection, and providing users with a targeted high-precision motion amount index. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flow chart of a method for detecting an amount of exercise based on a wearable device provided in an embodiment of the present application;
[0020] Figure 2 is another flow chart of the method for detecting the amount of exercise based on a wearable device provided in an embodiment of the present application;
[0021] Figure 3 is another flow chart of the method for detecting the amount of exercise based on a wearable device provided in an embodiment of the present application;
[0022] Figure 4 is a schematic block diagram of an exercise amount detection device based on a wearable device provided in an embodiment of the present application;
[0023] Figure 5 It is a schematic block diagram of the structure of the computer device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0025] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0027] First, some nouns involved in this application are analyzed:
[0028] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0029] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese, English, etc.). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.
[0030] Based on this, the embodiments of the present application provide a method, apparatus, device and storage medium for detecting exercise volume based on wearable devices, which realizes more refined and automated exercise volume detection through an exercise volume detection model based on the Transformer architecture, aiming to improve the accuracy of exercise volume detection and provide users with targeted high-precision exercise volume index.
[0031] The exercise volume detection method, apparatus, device and storage medium based on a wearable device provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the exercise volume detection method based on a wearable device in the embodiments of the present application is described.
[0032] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0033] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0034] The method for detecting the amount of exercise based on a wearable device provided in the embodiment of the present application relates to the field of artificial intelligence technology. The method for detecting the amount of exercise based on a wearable device provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a vehicle-mounted terminal, a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a method for detecting the amount of exercise based on a wearable device, etc., but is not limited to the above forms.
[0035] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer computer devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0036] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0037] Figure 1 is an optional flow chart of the method for detecting the amount of exercise based on a wearable device provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S104.
[0038] Step S101, collecting the user's motion data through a wearable device.
[0039] Among them, the motion data includes but is not limited to speed data, acceleration data, heart rate signal data, energy consumption data (such as calorie consumption value) and / or displacement data (such as running distance) during exercise.
[0040] Exemplarily, the wearable device is such as a smart bracelet, a smart watch, a smart sports ring, a sports monitoring chest strap, etc. The user wears the wearable device during exercise, so as to collect exercise data through the wearable device.
[0041] It is understandable that the motion data is presented in the form of a time series, and each time step in the time series corresponds to a motion speed, a motion acceleration, a heart rate signal, an energy consumption value and / or a motion displacement. The time series is determined by the total time range of the collected motion data. For example, if the motion data from 19:00 to 21:00 is continuously collected, then the time series is from 19:00 to 21:00; the time step refers to the time window for collecting motion data, such as a time window of one minute is a time step.
[0042] Wearable devices can flexibly and conveniently collect detailed and accurate exercise data, providing a more comprehensive analysis basis for subsequent exercise volume detection.
[0043] Step S102: performing feature extraction processing on the motion data to obtain a motion feature sequence.
[0044] The motion data can be processed for feature extraction to obtain a motion feature sequence to facilitate the understanding and processing of the motion detection model.
[0045] It can be understood that the motion feature sequence includes a time series and a motion feature vector, and the speed feature vector (such as average speed), acceleration feature vector (such as average acceleration), heart rate feature vector (such as heart rate standard deviation), energy consumption feature vector (such as total calorie consumption) and / or displacement feature vector (such as average motion displacement) of each time step in the time series constitutes a motion feature vector.
[0046] Step S103: dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods.
[0047] Exemplary exercise time periods include a warm-up period, an intensity training period, and a recovery period.
[0048] The motion feature sequence can be divided into motion time periods to obtain motion feature subsequences of at least two motion time periods, so that the motion volume detection model can more clearly and meticulously understand the motion features of each motion time period and the impact of the motion features of each motion time period on the overall motion performance, thereby being able to more accurately quantify the motion volume.
[0049] Step S104 , using an exercise volume detection model based on the Transformer architecture, performs exercise volume detection on the exercise feature subsequence of each exercise time period to obtain the user's exercise volume index.
[0050] Among them, the exercise volume detection model based on the Transformer architecture is obtained by pre-training a preset large language model. Exemplarily, the large language model can be a natural language processing (NLP) model that is good at processing complex time series data, such as a BERT model or a GPT series model (such as a GPT-2 model) based on the Transformer architecture. The exercise volume detection model has strong robustness, adaptability and generalization capabilities, which helps to improve its ability to cope with individual differences. Facing different users, it can perform effective and high-precision exercise volume detection and output a clear exercise volume index.
[0051] Based on this, the amount of exercise detection model can be used to detect the amount of exercise on the motion feature subsequence of each exercise time period, so that the amount of exercise detection model can effectively capture the timing information and mutual influence in the motion feature subsequences of different exercise time periods through the attention mechanism, and obtain an accurate amount of exercise index. Exemplarily, the amount of exercise index refers to a numerical value (such as 1-10 points) used to measure the intensity or effect of exercise.
[0052] In this way, through the motion detection model based on the Transformer architecture, in-depth analysis of motion feature subsequences in different motion time periods can improve the comprehensiveness and convenience of motion detection.
[0053] The above-mentioned embodiment provides a method for detecting the amount of exercise based on a wearable device, which collects the user's exercise data through a wearable device; performs feature extraction processing on the exercise data to obtain a motion feature sequence; performs motion time division processing on the motion feature sequence to obtain at least two motion feature subsequences of the motion time period; and performs motion amount detection on the motion feature subsequence of each motion time period through a motion amount detection model based on a Transformer architecture to obtain the user's exercise amount index. In this way, on the one hand, detailed exercise data can be collected very flexibly and conveniently using a wearable device, which provides a more comprehensive analysis basis for exercise amount detection; on the other hand, by classifying the motion feature sequence in the motion data into motion time periods, the motion amount detection model based on the Transformer architecture can more clearly and meticulously capture the long-term dependency and complex time series relationship in the motion features of different motion time periods, so as to better understand the contribution of the motion features of different motion time periods to the overall exercise amount, and realize more refined and faster automated exercise amount detection, thereby improving the accuracy and efficiency of exercise amount detection, and providing users with targeted high-precision exercise amount indexes.
[0054] In step S102 of some embodiments, the motion data may be cleaned to obtain clean motion data; the clean motion data may be subjected to time-frequency domain feature extraction to obtain a motion feature sequence, which includes a time series and a motion feature vector.
[0055] In order to ensure the reliability of the input of the motion detection model, the motion data may be cleaned to obtain clean motion data.
[0056] In order to facilitate the understanding of the motion detection model, the clean motion data can be processed for time-frequency domain feature extraction, so as to accurately extract important motion feature sequences that are more helpful for motion detection.
[0057] In some embodiments, the motion data is cleaned to obtain clean motion data, which may be to denoise the motion data to obtain denoised motion data; fill missing values on the denoised motion data to obtain filled motion data; correct outliers on the filled motion data to obtain corrected motion data; and standardize the corrected motion data to obtain clean motion data.
[0058] Exemplarily, the cleaning process mainly includes denoising, missing value filling, outlier correction and standardization.
[0059] Considering that the motion data is usually affected by the noise of the user's motion environment, the motion data may be denoised, for example, the motion data may be filtered to obtain denoised motion data.
[0060] The denoised motion data may also be processed to fill missing values, for example, by using mean value, median filling, or interpolation to fill missing values to obtain filled motion data.
[0061] The filled motion data may also be subjected to outlier correction processing, for example, outliers may be detected through box plots, standard deviations, etc., and the outliers may be adjusted to a normal range, or the outliers may be deleted to obtain corrected motion data.
[0062] The corrected motion data may also be subjected to standardization processing, for example, normalization processing may be performed on the corrected motion data to obtain clean motion data.
[0063] In this way, by performing a detailed cleaning process on the motion data, higher quality clean motion data can be provided.
[0064] See also Figure 2 In some embodiments, step S104 may include but is not limited to steps S201 to S204.
[0065] Step S201, inputting the motion feature subsequence of each motion time period into the motion amount detection model;
[0066] Step S202, encoding the motion feature subsequence of each motion time period to obtain a coding vector for each motion time period;
[0067] Step S203, using the attention mechanism, globally integrating the encoding vectors of each motion time period to obtain global temporal features;
[0068] Step S204, performing motion volume prediction processing on the global time series features to obtain a motion volume index.
[0069] Firstly, the motion feature subsequence of each motion time period is used as the input of the motion volume detection model; then, in the motion volume detection model, the motion feature subsequence of each motion time period is encoded to obtain the encoding vector of each motion time period, so as to help the motion volume detection model understand the temporal relationship of the motion feature subsequences of each motion time period; then, through the attention mechanism, the encoding vector of each motion time period is globally integrated to capture the importance of motion features of different motion time periods, and dynamically adjust the weights of different motion time periods according to the importance of motion features of different motion time periods, so as to effectively capture the long-term dependence characteristics of motion volume and obtain comprehensive global temporal features in different motion time period dimensions; finally, the global temporal features are processed for motion volume prediction to obtain a more accurate motion volume index.
[0070] In step S202 of some embodiments, the motion feature subsequence of each motion time period may be embedded to obtain an embedded vector of each motion time period; and the embedded vector of each motion time period may be position encoded to obtain an encoded vector of each motion time period.
[0071] The motion feature subsequence of each motion time period is encoded. Specifically, the motion feature subsequence of each motion time period is first embedded through the embedding layer of the motion amount detection model, so as to map the motion feature subsequence of a motion time period to a high-dimensional space and obtain the embedding vector of each motion time period; then the embedding vector of each motion time period is positionally encoded to obtain the encoding vector of each motion time period, so as to ensure that the motion amount detection model can recognize the temporal relationship of the motion feature subsequences of each motion time period.
[0072] In step S204 of some embodiments, the global timing features may be transformed to obtain deep-level global timing features; the deep-level global timing features may be pooled to obtain high-level global timing features; and the high-level global timing features may be fully connected to obtain a motion index.
[0073] The global time series features are processed for motion volume prediction. Specifically, the global time series features can be first transformed nonlinearly through the feed-forward neural network (FFN) of the motion volume detection model to obtain more complex deep-level global time series features; the deep-level global time series features are then pooled through the pooling layer of the motion volume detection model to obtain high-level global time series features that can represent the overall motion process; finally, the high-level global time series features are fully connected through the fully connected layer of the motion volume detection model to obtain the motion volume index for output, thereby ensuring the validity and accuracy of the motion volume index.
[0074] Before step S104 in some embodiments, the large language model may be pre-trained. Taking BERT as an example, the training process of the large language model includes: obtaining motion data samples and actual motion index of the motion data samples; performing feature extraction processing on the motion data samples to obtain motion feature sequence samples; performing motion time period division processing on the motion feature sequence samples to obtain motion feature subsequence samples of at least two motion time periods; inputting the motion feature subsequence samples of at least two motion time periods into the BERT model for iterative training to effectively learn the predicted motion index of the motion data samples; calculating the loss between the actual motion index and the predicted motion index, thereby calculating the loss function of the BERT model based on the loss, and then updating the parameters of the BERT model based on the loss function, until the number of iterations is greater than the preset number threshold, stopping the training of the BERT model, and obtaining a trained motion detection model for more refined and faster automated motion detection.
[0075] See also Figure 3 In some embodiments, after step S104, it may include but is not limited to steps S301 to S302.
[0076] Step S301, generating a user's exercise report, the exercise report including exercise volume index, exercise evaluation information and exercise suggestion information;
[0077] Step S302: Visually display the exercise report.
[0078] After the user's exercise volume index is detected by the exercise volume detection model, an exercise report for the user can be generated, wherein the exercise report includes the exercise volume index, and exercise evaluation information and exercise suggestion information generated for the exercise volume index in combination with exercise data.
[0079] For example, if the user's exercise index is 4 points, the exercise evaluation information may be such as "your exercise volume has obviously decreased", and the exercise suggestion information may be such as "try to stand up and stretch for 5 minutes every hour, you can easily increase your exercise volume".
[0080] The exercise report can be displayed visually, allowing users to intuitively view their exercise index, helping to enhance users' exercise awareness, promoting users to maintain long-term exercise habits, and providing users with appropriate and personalized exercise suggestions.
[0081] See also Figure 4 , Figure 4 It is a schematic block diagram of an exercise volume detection device based on a wearable device provided in an embodiment of the present application. The exercise volume detection device based on a wearable device can be configured in a computer device to execute the aforementioned exercise volume detection method based on a wearable device.
[0082] like Figure 4 As shown, the exercise amount detection device 400 based on a wearable device includes: a motion data acquisition module 401, a motion feature extraction module 402, a motion feature division module 403 and an exercise amount detection module 404.
[0083] The motion data collection module 401 is used to collect the user's motion data through a wearable device;
[0084] A motion feature extraction module 402 is used to perform feature extraction processing on the motion data to obtain a motion feature sequence;
[0085] A motion feature division module 403 is used to divide the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods;
[0086] The exercise volume detection module 404 is used to perform exercise volume detection on the exercise feature subsequence of each exercise time period through an exercise volume detection model based on the Transformer architecture to obtain the user's exercise volume index.
[0087] In one embodiment, the motion detection module 404 is further used to:
[0088] Inputting the motion feature subsequence of each of the motion time periods into the motion amount detection model;
[0089] Performing encoding processing on the motion feature subsequence of each motion time period to obtain an encoding vector for each motion time period;
[0090] Through the attention mechanism, the encoding vectors of each motion time period are globally integrated to obtain the global temporal features;
[0091] The global time series feature is subjected to motion volume prediction processing to obtain the motion volume index.
[0092] In one embodiment, the motion detection module 404 is further used to:
[0093] Embedding a motion feature subsequence of each motion time period to obtain an embedding vector of each motion time period;
[0094] Position encoding processing is performed on the embedded vector of each of the motion time periods to obtain the encoding vector of each of the motion time periods.
[0095] In one embodiment, the motion detection module 404 is further used to:
[0096] Transforming the global time series features to obtain deep-level global time series features;
[0097] Performing pooling processing on the deep-level global temporal features to obtain high-level global temporal features;
[0098] The high-level global time series features are subjected to full connection operation processing to obtain the movement volume index.
[0099] In one embodiment, the motion feature extraction module 402 is further used for:
[0100] Cleaning the motion data to obtain clean motion data;
[0101] The cleaning motion data is subjected to time-frequency domain feature extraction processing to obtain a motion feature sequence, wherein the motion feature sequence includes a time series and a motion feature vector.
[0102] In one embodiment, the motion feature extraction module 402 is further used for:
[0103] Performing denoising on the motion data to obtain denoised motion data;
[0104] Performing missing value filling processing on the denoised motion data to obtain filled motion data;
[0105] Performing outlier correction processing on the padded motion data to obtain corrected motion data;
[0106] The corrected motion data is standardized to obtain the clean motion data.
[0107] In one embodiment, the wearable device-based exercise quantity detection device 400 further includes an exercise report generation module and an exercise report display module.
[0108] The exercise report generating module is used to generate an exercise report of the user, wherein the exercise report includes an exercise volume index, exercise evaluation information and exercise suggestion information;
[0109] The exercise report display module is used to visually display the exercise report.
[0110] Among them, each module in the above-mentioned exercise amount detection device 400 based on wearable device corresponds to each step in the above-mentioned exercise amount detection method embodiment based on wearable device, and its functions and implementation processes are not repeated here one by one.
[0111] The exercise volume detection device 400 based on a wearable device can execute the exercise volume detection method based on a wearable device provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved by the exercise volume detection method based on a wearable device provided in the embodiment of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0112] The method and apparatus of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0113] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.
[0114] See also Figure 5 , Figure 5 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0115] See also Figure 5 The computer device includes a processor and a memory connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.
[0116] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0117] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any exercise amount detection method based on the wearable device.
[0118] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0119] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:
[0120] Collect user's sports data through wearable devices;
[0121] Performing feature extraction processing on the motion data to obtain a motion feature sequence;
[0122] Dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods;
[0123] The exercise volume detection model based on the Transformer architecture is used to detect the exercise volume of each exercise feature subsequence in the exercise time period to obtain the exercise volume index of the user.
[0124] In one embodiment, when the processor implements the exercise amount detection model based on the Transformer architecture to perform exercise amount detection on the exercise feature subsequence of each exercise time period to obtain the exercise amount index of the user, it is used to implement:
[0125] Inputting the motion feature subsequence of each of the motion time periods into the motion amount detection model;
[0126] Performing encoding processing on the motion feature subsequence of each motion time period to obtain an encoding vector for each motion time period;
[0127] Through the attention mechanism, the encoding vectors of each motion time period are globally integrated to obtain the global temporal features;
[0128] The global time series feature is subjected to motion volume prediction processing to obtain the motion volume index.
[0129] In one embodiment, when the processor implements encoding processing of the motion feature subsequence of each motion time period to obtain the encoding vector of each motion time period, it is used to implement:
[0130] Embedding a motion feature subsequence of each motion time period to obtain an embedding vector of each motion time period;
[0131] Position encoding processing is performed on the embedded vector of each of the motion time periods to obtain the encoding vector of each of the motion time periods.
[0132] In one embodiment, when the processor performs motion amount prediction processing on the global time series feature to obtain the motion amount index, it is used to implement:
[0133] Transforming the global time series features to obtain deep-level global time series features;
[0134] Performing pooling processing on the deep-level global temporal features to obtain high-level global temporal features;
[0135] The high-level global time series features are subjected to full connection operation processing to obtain the movement volume index.
[0136] In one embodiment, when the processor performs feature extraction processing on the motion data to obtain a motion feature sequence, the processor is used to implement:
[0137] Cleaning the motion data to obtain clean motion data;
[0138] The cleaning motion data is subjected to time-frequency domain feature extraction processing to obtain a motion feature sequence, wherein the motion feature sequence includes a time series and a motion feature vector.
[0139] In one embodiment, when the processor implements the cleaning process on the motion data to obtain clean motion data, it is used to implement:
[0140] Performing denoising on the motion data to obtain denoised motion data;
[0141] Performing missing value filling processing on the denoised motion data to obtain filled motion data;
[0142] Performing outlier correction processing on the padded motion data to obtain corrected motion data;
[0143] The corrected motion data is standardized to obtain the clean motion data.
[0144] In one embodiment, after implementing the motion detection model based on the Transformer architecture to perform motion detection on the motion feature subsequence to obtain the user's motion index, the processor is further configured to implement:
[0145] generating an exercise report of the user, wherein the exercise report includes an exercise volume index, exercise evaluation information, and exercise suggestion information;
[0146] The movement report is visually displayed.
[0147] The computer device can execute the exercise volume detection method based on the wearable device provided in the embodiment of the present application. Therefore, it can achieve the beneficial effects that can be achieved by the exercise volume detection method based on the wearable device provided in the embodiment of the present application. Please refer to the previous embodiment for details and will not be repeated here.
[0148] An embodiment of the present application also provides a computer-readable storage medium.
[0149] The computer-readable storage medium of the present application stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting the amount of exercise based on a wearable device are implemented.
[0150] Wherein, the computer-readable storage medium may be an internal storage unit of the wearable device-based motion detection device or computer device described in the aforementioned embodiment, such as a hard disk or memory of the wearable device-based motion detection device or computer device. The computer-readable storage medium may also be an external storage device of the wearable device-based motion detection device or computer device, such as a plug-in hard disk, smart memory card (Smart Media Card, SMC), secure digital card (Secure Digital Card, SD Card), flash card (Flash Card), etc., equipped on the wearable device-based motion detection device or computer device.
[0151] Since the computer program stored in the computer-readable storage medium can execute any one of the methods for detecting the amount of exercise based on a wearable device provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the methods for detecting the amount of exercise based on a wearable device provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.
[0152] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0153] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0154] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0155] The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the protection scope of the present application.
Claims
1. A method for detecting the amount of exercise based on a wearable device, characterized in that: The method comprises: Collect user's sports data through wearable devices; Performing feature extraction processing on the motion data to obtain a motion feature sequence; Dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods; The exercise volume detection model based on the Transformer architecture is used to detect the exercise volume of each exercise feature subsequence in the exercise time period to obtain the exercise volume index of the user.
2. The method according to claim 1, characterized in that The exercise amount detection model based on the Transformer architecture is used to perform exercise amount detection on the exercise feature subsequence of each exercise time period to obtain the exercise amount index of the user, including: Inputting the motion feature subsequence of each of the motion time periods into the motion amount detection model; Performing encoding processing on the motion feature subsequence of each motion time period to obtain an encoding vector for each motion time period; Through the attention mechanism, the encoding vectors of each motion time period are globally integrated to obtain the global temporal features; The global time series feature is subjected to motion volume prediction processing to obtain the motion volume index.
3. The method according to claim 2, characterized in that The encoding process is performed on the motion feature subsequence of each motion time period to obtain the encoding vector of each motion time period, including: Embedding a motion feature subsequence of each motion time period to obtain an embedding vector of each motion time period; Position encoding processing is performed on the embedded vector of each of the motion time periods to obtain the encoding vector of each of the motion time periods.
4. The method according to claim 2, characterized in that: The step of performing motion amount prediction processing on the global time series feature to obtain the motion amount index includes: Transforming the global time series features to obtain deep-level global time series features; Performing pooling processing on the deep-level global temporal features to obtain high-level global temporal features; The high-level global time series features are subjected to full connection operation processing to obtain the movement volume index.
5. The method according to claim 1, characterized in that: The step of performing feature extraction processing on the motion data to obtain a motion feature sequence includes: Cleaning the motion data to obtain clean motion data; The cleaning motion data is subjected to time-frequency domain feature extraction processing to obtain a motion feature sequence, wherein the motion feature sequence includes a time series and a motion feature vector.
6. The method according to claim 5, characterized in that The cleaning process of the motion data to obtain clean motion data includes: Performing denoising on the motion data to obtain denoised motion data; Performing missing value filling processing on the denoised motion data to obtain filled motion data; Performing outlier correction processing on the padded motion data to obtain corrected motion data; The corrected motion data is standardized to obtain the clean motion data.
7. The method according to any one of claims 1 to 6, characterized in that: After performing the motion detection on the motion feature subsequence by the motion detection model based on the Transformer architecture to obtain the user's motion index, the method further includes: generating an exercise report of the user, wherein the exercise report includes an exercise volume index, exercise evaluation information, and exercise suggestion information; The movement report is visually displayed.
8. An exercise quantity detection device based on a wearable device, characterized in that: The device comprises: A motion data collection module is used to collect the user's motion data through a wearable device; A motion feature extraction module, used for performing feature extraction processing on the motion data to obtain a motion feature sequence; A motion feature division module, used for dividing the motion feature sequence into motion time periods to obtain motion feature subsequences of at least two motion time periods; The exercise volume detection module is used to perform exercise volume detection on the exercise feature subsequence of each exercise time period through an exercise volume detection model based on the Transformer architecture to obtain the user's exercise volume index.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method for detecting the amount of exercise based on a wearable device as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for detecting the amount of exercise based on a wearable device according to any one of claims 1 to 7 is implemented.