Exercise plan generation method and device, computer equipment and readable storage medium
By acquiring user information and historical data, and using motion models to calculate reward and loss data to update exercise plans, the problem that existing tools cannot meet personalized needs is solved, and personalized exercise plans are generated.
Patent Information
- Application Number
- CN202511747580.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-06
AI Technical Summary
Existing exercise planning tools cannot meet the dynamic needs and personalized goals of individual users.
By acquiring users' basic information data, historical exercise plans, and historical exercise data, and using a pre-built exercise model to calculate comprehensive reward data and comprehensive loss data, the exercise model is updated to generate personalized target exercise plans.
It enables adjustments to exercise plans based on users' real-time needs, ensuring that the plans align with individual health and fitness goals and providing personalized, scientific exercise solutions.
Smart Images

Figure CN121617549A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of sports training technology, and in particular to a method, apparatus, computer device, and readable storage medium for generating exercise plans. Background Technology
[0002] With modern society placing greater emphasis on health and physical fitness, more and more people are beginning to pursue scientific and personalized exercise plans.
[0003] However, exercise planning tools in related technologies often fail to meet the dynamic needs and personalized goals of individual users. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer device, and readable storage medium for generating exercise plans that can meet the personalized needs of users, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for generating a workout plan, the method comprising:
[0006] Obtain user's basic information data, historical exercise plans, and historical exercise data of historical exercise plans;
[0007] Based on basic information data, historical exercise plans, historical exercise data, and pre-built exercise models, comprehensive reward data and comprehensive loss data are obtained; comprehensive reward data is used to indicate the prediction direction of the exercise model, and comprehensive loss data is used to indicate the historical prediction deviation of the exercise model.
[0008] Update the motion model based on historical motion data, comprehensive reward data, and comprehensive loss data;
[0009] Based on basic information data, historical exercise data, and the updated exercise model, a target exercise plan is obtained.
[0010] In one embodiment, based on basic information data, historical exercise plans, historical exercise data, and a pre-built exercise model, comprehensive reward data and comprehensive loss data are obtained, including:
[0011] Based on basic information data, historical motion data, motion models, and preset state prediction models, obtain comprehensive reward data;
[0012] Based on historical campaign plans, historical campaign data, and pre-stored loss weights, obtain comprehensive loss data.
[0013] In one embodiment, comprehensive reward data is obtained based on basic information data, historical motion data, a motion model, and a preset state prediction model, including:
[0014] Short-term reward data is obtained based on historical sports data and basic information data;
[0015] Long-term reward data is obtained based on historical motion data, motion models, and preset state prediction models.
[0016] Based on historical motion data, obtain emotional reward data;
[0017] Comprehensive reward data is obtained based on short-term reward data, long-term reward data, and emotional reward data.
[0018] In one embodiment, historical motion data includes objective physiological data and subjective evaluation data;
[0019] Based on historical exercise data and basic information data, short-term reward data is obtained, including:
[0020] Objective reward data is obtained based on objective physiological data and preset physiological data thresholds;
[0021] Subjective reward data is obtained based on subjective evaluation data;
[0022] Short-term reward data is obtained based on objective reward data, subjective reward data, preset objective reward weights, and preset subjective reward weights.
[0023] In one embodiment, long-term reward data is obtained based on historical motion data, a motion model, and a preset state prediction model, including:
[0024] Based on historical exercise data and exercise models, obtain at least one predictive exercise plan;
[0025] Based on the state prediction model, predictive physiological data and predictive evaluation data for each predicted exercise plan are obtained.
[0026] Long-term reward data is obtained based on various predicted physiological data and prediction evaluation data.
[0027] In one embodiment, historical motion data includes subjective evaluation data, which includes satisfaction data;
[0028] Based on historical motion data, obtain emotional reward data, including:
[0029] Emotional reward data is obtained based on satisfaction data and preset emotional reward weights.
[0030] In one embodiment, historical motion data includes objective physiological data and subjective evaluation data; the loss weights include health loss weights, emotional loss weights, and safety loss weights.
[0031] Based on historical campaign plans, historical campaign data, and pre-stored loss weights, obtain comprehensive loss data, including:
[0032] Health loss data is obtained based on objective physiological data and health loss weights;
[0033] Emotional loss data is obtained based on subjective evaluation data and emotional loss weights;
[0034] Obtain safety loss data based on historical campaign plans and safety loss weights;
[0035] Comprehensive loss data is obtained based on health loss data, emotional loss data, and safety loss data.
[0036] In one embodiment, the motion model is updated based on historical motion data, comprehensive reward data, and comprehensive loss data, including:
[0037] Based on comprehensive reward data, historical exercise data, and exercise models, obtain intermediate exercise plans, their predictive value, and target value.
[0038] The motion model is updated based on the target value and overall loss data.
[0039] In one embodiment, based on comprehensive reward data, historical exercise data, and an exercise model, intermediate exercise plans, their predicted value, and target value are obtained, including:
[0040] Based on historical motion data and motion models, obtain intermediate motion plans and their predictive value;
[0041] The target value is obtained based on comprehensive reward data and predicted value.
[0042] In one embodiment, the motion model includes a value network and a policy network;
[0043] Based on the target value and overall loss data, update the motion model, including:
[0044] Update the value network based on the predicted value and the target value;
[0045] Update the policy network based on the comprehensive loss data.
[0046] In one embodiment, the number of historical movement plans is multiple; the method further includes:
[0047] The loss weights are updated based on the historical movement plans and data.
[0048] Secondly, this application provides a motion plan generation device, the device comprising:
[0049] The first execution module is used to obtain the user's basic information data, historical exercise plans, and historical exercise data of the historical exercise plans;
[0050] The second execution module is used to obtain comprehensive reward data and comprehensive loss data based on basic information data, historical exercise plans, historical exercise data, and pre-built exercise models. The comprehensive reward data is used to indicate the prediction direction of the exercise model, and the comprehensive loss data is used to indicate the historical prediction deviation of the exercise model.
[0051] The third execution module is used to update the motion model based on historical motion data, comprehensive reward data, and comprehensive loss data;
[0052] The fourth execution module is used to obtain the target motion plan based on basic information data, historical motion data, and the updated motion model.
[0053] Thirdly, this application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.
[0054] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.
[0055] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0056] The aforementioned exercise plan generation method, apparatus, computer equipment, and readable storage medium include acquiring basic user information data, historical exercise plans, and historical exercise data corresponding to the historical exercise plans. Then, based on the basic information data, historical exercise plans, historical exercise data, and a pre-built exercise model, comprehensive reward data and comprehensive loss data related to the historical exercise plans are calculated. This allows the exercise model to be adjusted in real time based on historical prediction deviations and prediction directions, ensuring that the exercise model can output a target exercise plan that meets the user's real-time needs. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1This is a flowchart illustrating a method for generating a motion plan in one embodiment;
[0059] Figure 2 This is a flowchart illustrating step S102 in one embodiment;
[0060] Figure 3 This is a flowchart illustrating step S201 in one embodiment;
[0061] Figure 4 This is a flowchart illustrating step S301 in one embodiment;
[0062] Figure 5 This is a flowchart illustrating step S302 in one embodiment;
[0063] Figure 6 This is a flowchart illustrating step S202 in one embodiment;
[0064] Figure 7 This is a flowchart illustrating step S103 in one embodiment;
[0065] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0067] In some exemplary embodiments, such as Figure 1 As shown, this application provides a motion plan generation method. Taking the application of this method to a control terminal as an example, the motion plan generation method of this application includes steps S101 to S104.
[0068] S101: Obtain the user's basic information data, historical exercise plans, and historical exercise data of historical exercise plans.
[0069] The basic information data may include the user's age, gender, height, weight, health status (such as whether they have chronic diseases, past injury history, etc.), exercise habits, and personal exercise goals. Historical exercise plans may include information such as the type of exercise. Historical exercise data may include objective physiological data during the execution of the exercise plan and subjective evaluation data after the exercise plan is completed.
[0070] In the application, users can wear wearable devices while exercising according to a workout plan. These devices can collect objective physiological data in real time during exercise, such as heart rate, blood oxygen saturation, respiratory rate, and calorie consumption. After the workout, the devices collect subjective evaluation data from the user, which may include their mental state (e.g., fatigue level, energy level) and emotional state (e.g., satisfaction with the workout plan, mood swings). Once a workout plan is completed, the wearable device integrates the objective physiological data and subjective evaluation data and sends them to the control terminal.
[0071] S102: Based on basic information data, historical exercise plans, historical exercise data, and pre-built exercise models, obtain comprehensive reward data and comprehensive loss data; the comprehensive reward data is used to indicate the prediction direction of the exercise model, and the comprehensive loss data is used to indicate the historical prediction deviation of the exercise model.
[0072] In the application, if a user is undergoing exercise training for the first time, the control terminal can provide an exercise plan based on the user's input of basic information and other data, using a large language model. If the user is not undergoing exercise training for the first time, the control terminal can use a pre-built exercise model to output an exercise plan based on basic information, historical exercise plans, and historical exercise data. In one example, the exercise model in this application can be a reinforcement learning model built based on the PPO (Proximal Policy Optimization) algorithm.
[0073] After a user completes a workout session, the control terminal can mark the corresponding workout plan as a historical workout plan and the collected workout data as historical workout data. Then, the control terminal can calculate the rewards and losses related to the historical workout plan based on the basic information data, the historical workout plan, and the historical workout data.
[0074] S103: Update the motion model based on historical motion data, comprehensive reward data, and comprehensive loss data.
[0075] In reinforcement learning, reward is the core signal guiding how the model acts in its environment. Reward provides immediate feedback on the agent's behavior, evaluating the merits of an action in a given state, thus influencing future decisions. Through continuous trial and error and adjustment, the model learns to choose behavioral strategies that yield high rewards in different states. Loss measures the difference between the model's current prediction and a target value, used to penalize and constrain the model's decisions, preventing it from generating dangerous or undesirable plans.
[0076] After calculating the comprehensive reward data and comprehensive loss data, the control terminal can optimize the motion model, making the motion model predict motion plans in a direction of higher rewards and lower losses.
[0077] S104: Obtain the target exercise plan based on basic information data, historical exercise data, and the updated exercise model.
[0078] After the motion model is optimized, it can output the target exercise plan for the user's next exercise training session.
[0079] The above-mentioned exercise plan generation method includes obtaining the user's basic information data, historical exercise plans, and historical exercise data corresponding to the historical exercise plans. Then, based on the basic information data, historical exercise plans, historical exercise data, and pre-built exercise models, the comprehensive reward data and comprehensive loss data of the historical exercise plans are calculated. This allows the exercise model to be adjusted in real time according to the historical prediction deviation and prediction direction of the exercise model, ensuring that the exercise model can output a target exercise plan that meets the user's real-time needs.
[0080] In some exemplary embodiments, please refer to Figure 2 Step S102 involves obtaining comprehensive reward data and comprehensive loss data based on basic information data, historical exercise plans, historical exercise data, and a pre-built exercise model, including steps S201 and S202.
[0081] S201: Obtain comprehensive reward data based on basic information data, historical motion data, motion model, and preset state prediction model.
[0082] In this embodiment, after a user completes the t-th exercise training session, the application calculates a short-term reward based on the historical exercise data from that session. Simultaneously, to prevent the model from optimizing only short-term effects, the application introduces additional long-term rewards and emotional feedback rewards into the reward function, ensuring that the exercise model considers long-term health benefits while optimizing the user's current experience.
[0083] S202: Obtain comprehensive loss data based on historical movement plans, historical movement data, and pre-stored loss weights.
[0084] In order to handle complex motion planning requirements, this application designs a multi-objective policy optimization method based on the traditional policy loss function, and optimizes the policy by obtaining the loss of multiple sub-objectives through weighted combination.
[0085] In some exemplary embodiments, please refer to Figure 3Step S201: Based on basic information data, historical motion data, motion model and preset state prediction model, obtain comprehensive reward data, including steps S301 to S304.
[0086] S301: Obtain short-term reward data based on historical exercise data and basic information data.
[0087] In this application, short-term rewards focus only on the immediate effect of the t-th exercise plan, ensuring that each step of the exercise plan is reasonable and effective for the user. Historical exercise data can include physiological data such as the user's heart rate, blood oxygen saturation, respiratory rate, and calorie consumption, as well as evaluation data such as the user's fatigue level and satisfaction. When calculating short-term reward data, thresholds for the user's physiological data can be determined based on the user's basic information data. For example, a safe heart rate value can be determined based on the user's age. If the user's heart rate exceeds this safe value during exercise, it indicates that the exercise plan is too strenuous for the user, and there may be danger during training. In this case, a negative reward is given so that the exercise model can subsequently develop safer exercise plans for the user.
[0088] Meanwhile, this application can use a large language model to score users' subjective evaluation data and determine users' fatigue score and satisfaction score for historical exercise plans. For example, the lower the user's fatigue score and the higher the satisfaction score, the greater the reward, so that the exercise model can subsequently formulate a satisfactory exercise plan for the user.
[0089] S302: Obtain long-term reward data based on historical motion data, motion models, and preset state prediction models.
[0090] In this embodiment of the application, long-term rewards refer to considering the impact of the current strategy on a future period of time and ensuring that the existing plan contributes to the user's long-term health goals.
[0091] In one example, after a user completes the t-th exercise plan, the control terminal can use a preset state prediction model to predict the user's physiological and evaluation data after the user follows the t-th exercise plan for the next Q times, based on the user's basic information data, historical exercise data (the t-th exercise data or the historical T-th exercise data), and historical exercise plan (the t-th exercise plan). This is to predict the long-term impact of the user's long-term adherence to the historical exercise plan and calculate long-term reward data.
[0092] In another example, after a user completes the t-th exercise plan, the control terminal can use the unupdated exercise model to predict the exercise plans for the next Q times. It then uses the user's basic information data, historical exercise data (the t-th exercise data, or the historical T-th exercise data), and the exercise plans predicted by the exercise model for the next Q times to predict the user's physiological and evaluation data after each of the predicted exercise plans for the next Q times. This allows for the prediction of the impact of the user's long-term execution of the exercise plans output by the unupdated exercise model and the calculation of long-term reward data.
[0093] Among them, the state prediction model can be a world model. The world model is a core technical framework in the field of artificial intelligence used to simulate environmental dynamics and predict future states. For example, the state prediction model can be a prediction model built on LSTM (Long Short-Term Memory) neural networks.
[0094] S303: Obtain emotional reward data based on historical motion data.
[0095] In this embodiment, user sentiment analysis is also incorporated as part of the reward system based on user satisfaction. Specifically, subjective evaluation data includes the user's fatigue level and satisfaction with the t-th exercise plan, and the control terminal can also calculate sentiment reward data based on the user's satisfaction with the t-th exercise plan.
[0096] S304: Obtain comprehensive reward data based on short-term reward data, long-term reward data, and emotional reward data.
[0097] After obtaining the short-term reward data, long-term reward data, and emotional reward data, the three can be added together to obtain the comprehensive reward data. .
[0098] In some exemplary embodiments, historical motion data includes objective physiological data and subjective evaluation data. See also... Figure 4 Step S301: Obtain short-term reward data based on historical exercise data and basic information data, including steps S401 to S403.
[0099] S401: Obtain objective reward data based on objective physiological data and preset physiological data thresholds.
[0100] In this application, after acquiring historical exercise data, the control terminal can convert the historical exercise data into a state vector through encoding processing. Specifically, objective physiological data can be processed, with the time window being the total duration Tn1 of the exercise training session, preserving the sequential information of the time series; subjective evaluation data can be directly numerically encoded, and subjective evaluation data in text form provided by the user can be converted into a high-dimensional vector using an embedding model. For example, after the user completes the t-th exercise plan, the historical exercise data of the t-th session can be obtained. for ,in, Let be the state vector corresponding to the objective physiological data of the t-th exercise plan. Let be the state vector corresponding to the subjective evaluation data of the t-th exercise plan.
[0101] In one example, the formula for calculating objective reward data can be shown in formula (1):
[0102]
[0103] in, This can be the user's average heart rate during the t-th exercise plan execution, or... This can be the user's maximum heart rate during the t-th exercise plan execution; For physiological data thresholds, specifically The maximum safe heart rate for the user. , This represents the minimum safe value for the user's blood oxygen saturation. It can be 95%; This can be the user's average blood oxygen saturation during the t-th exercise plan execution, or... This can be the user's lowest blood oxygen saturation during the t-th exercise plan execution; These are preset coefficients. It can be seen that the higher the user's heart rate or the lower their blood oxygen saturation, the lower the reward.
[0104] S402: Obtain subjective reward data based on subjective evaluation data.
[0105] The formula for calculating subjective reward data can be shown in formula (2):
[0106]
[0107] in, It represents the user's fatigue level and can be used as a fatigue score given by a large language model after analyzing the user's subjective evaluation data about the t-th exercise plan; It represents user satisfaction and can be a satisfaction score given by a large language model after analyzing the subjective evaluation data of users about the t-th exercise plan; These are preset coefficients. It can be seen that the lower the user fatigue level and the higher the satisfaction level, the greater the reward.
[0108] S403: Obtain short-term reward data based on objective reward data, subjective reward data, preset objective reward weights, and preset subjective reward weights.
[0109] The formula for calculating short-term rewards is shown in formula (3):
[0110]
[0111] in, For the short-term reward data of the t-th exercise plan, For the objective reward data of the t-th exercise plan, For the subjective reward data of the t-th exercise plan, To ensure objective reward weighting, This refers to the subjective reward weight.
[0112] In some exemplary embodiments, please refer to Figure 5 Step S302: Obtain long-term reward data based on historical motion data, motion model and preset state prediction model, including steps S501 to S503.
[0113] S501: Based on historical exercise data and exercise models, obtain at least one predictive exercise plan.
[0114] Specifically, after a user completes the t-th exercise plan, they can use the unupdated exercise model, i.e., the updated exercise model after the user completes the (t-1)-th exercise plan, to obtain at least one predicted exercise plan.
[0115] S502: Based on the state prediction model, obtain the predicted physiological data and predicted evaluation data for each predicted exercise plan.
[0116] Next, the predicted exercise plans, the user's basic information data, and historical exercise data are input into the state prediction model, so that the state prediction model outputs the predicted physiological data and predicted evaluation data of each predicted exercise plan.
[0117] S503: Obtain long-term reward data based on various predicted physiological data and various predicted evaluation data.
[0118] In one example, the formula for calculating the long-term reward data in this application can be shown in formula (4):
[0119]
[0120] in, The objective reward data is calculated from the predicted physiological data of the next t+qth time based on the state prediction model. The subjective reward data is calculated from the predicted evaluation data of the next t+qth time based on the state prediction model. These are preset coefficients.
[0121] In some exemplary embodiments, historical motion data includes subjective evaluation data, which includes satisfaction data; step S303, obtaining emotional reward data based on historical motion data, including the step of obtaining emotional reward data based on satisfaction data and preset emotional reward weights.
[0122] Specifically, please refer to formula (5):
[0123]
[0124] in, Let be the satisfaction score for the t-th exercise plan. This satisfaction score can be derived from the analysis of the user's subjective evaluation data regarding the t-th exercise plan by a large language model. These are preset coefficients.
[0125] In some exemplary embodiments, historical exercise data includes objective physiological data and subjective evaluation data; loss weights include health loss weights, emotional loss weights, and safety loss weights. Please refer to [link to relevant documentation]. Figure 6 Step S202: Obtain comprehensive loss data based on historical exercise plans, historical exercise data, and pre-stored loss weights, including steps S601 to S604.
[0126] S601: Obtain health loss data based on objective physiological data and health loss weights.
[0127] Among them, health loss data ,in, The degree to which the user's physiological indicators deviate from the preset ideal range during the t-th exercise training session; the greater the deviation, the greater the loss. Let be the health loss weight for the t-th exercise plan.
[0128] S602: Obtain emotional loss data based on subjective evaluation data and emotional loss weights.
[0129] Emotional loss data ,in, The deviation of the user's fatigue, emotional score and satisfaction after the t-th exercise training session is considered. The higher the fatigue, the lower the emotional score and the lower the satisfaction, the greater the loss. Weighting for emotional loss.
[0130] S603: Obtain safety loss data based on historical campaign plans and safety loss weights.
[0131] Security loss data ,in, Let t be the probability of a high-risk action in the t-th movement plan, evaluated using a large language model. The higher the risk, the greater the loss. Weighting for safety losses.
[0132] S604: Obtain comprehensive loss data based on health loss data, emotional loss data, and safety loss data.
[0133] As shown in formula (6), by adding the health loss data, emotional loss data, and safety loss data, the comprehensive loss data of the t-th exercise plan can be obtained. :
[0134]
[0135] In some exemplary embodiments, there are multiple historical exercise plans; the exercise plan generation method of this application further includes the step of updating the loss weight based on each historical exercise plan and each historical exercise data.
[0136] In the application, after the user completes the t-th exercise plan, the control terminal not only updates the exercise model based on the t-th exercise plan and exercise data, but also updates the loss weight by combining the historical T exercise plans and exercise data.
[0137] Specifically, please refer to formula (7):
[0138]
[0139] Where T is the long-term time window and k is the short-term time window, T>k≥1; for , , any one of the following, i is any one of health, emotion, and safe; It is the short-term feedback memory coefficient, which indicates the importance of short-term feedback; It is the long-term feedback memory coefficient, representing the weight of long-term feedback.
[0140] In some exemplary embodiments, please refer to Figure 7 Step S103 involves updating the motion model based on historical motion data, comprehensive reward data, and comprehensive loss data, including steps S701 and S702.
[0141] S701: Based on comprehensive reward data, historical exercise data, and exercise models, obtain intermediate exercise plans, the predictive value of intermediate exercise plans, and the target value.
[0142] The motion model in this application includes a value network (Actor) and a policy network (Critic). Specifically, the value network (Actor) that has not been updated after the t-th training iteration (the value network that has been updated after the (t-1)-th training iteration) can be used to predict the motion plan for the (t+1)-th iteration, thus obtaining an intermediate motion plan. Then, the unupdated policy network (Critic) that has been updated after the (t-1)-th training iteration is used to evaluate the predictive value of the intermediate motion plan. The target value can then be obtained. γ is a preset discount factor.
[0143] S702: Update the motion model based on the target value and overall loss data.
[0144] Specifically, based on predicted value As a supervisory signal, by minimizing the predictive value Compared with model predictions The mean squared error between the values is used to update the parameters of the value network, improving the prediction accuracy of the value function for long-term cumulative rewards. This is done based on the comprehensive loss data. It is directly used as a monitoring signal to update the policy network.
[0145] By updating the value network (Actor) and policy network (Critic) using the above methods after each exercise training session, we can not only respond to the user's physiological state and subjective feedback in real time, but also continuously optimize the exercise plan through multiple iterations. This ensures that the plan can be constantly adjusted to meet the changing needs of users and provide more accurate and personalized services.
[0146] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0147] Based on the same inventive concept, this application also provides a motion plan generation apparatus for implementing the motion plan generation method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more motion plan generation apparatus embodiments provided below can be found in the limitations of the motion plan generation method described above, and will not be repeated here.
[0148] In one exemplary embodiment, a motion plan generation device is provided, comprising:
[0149] The first execution module is used to obtain the user's basic information data, historical exercise plans, and historical exercise data of the historical exercise plans;
[0150] The second execution module is used to obtain comprehensive reward data and comprehensive loss data based on basic information data, historical exercise plans, historical exercise data, and pre-built exercise models. The comprehensive reward data is used to indicate the prediction direction of the exercise model, and the comprehensive loss data is used to indicate the historical prediction deviation of the exercise model.
[0151] The third execution module is used to update the motion model based on historical motion data, comprehensive reward data, and comprehensive loss data;
[0152] The fourth execution module is used to obtain the target motion plan based on basic information data, historical motion data, and the updated motion model.
[0153] Each module in the aforementioned exercise plan generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0154] In one exemplary embodiment, this application provides a computer device including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.
[0155] This computer device can be a terminal, and its internal structure diagram can be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a motion plan generation method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0156] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0157] In one exemplary embodiment, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0158] In one exemplary embodiment, this application provides a computer program product including a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0160] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A motion plan generation method characterized by, The method comprises: acquiring basic information data of a user, a historical exercise plan, and historical exercise data of the historical exercise plan; acquiring comprehensive reward data and comprehensive loss data according to the basic information data, the historical exercise plan, the historical exercise data, and a pre-constructed exercise model; the comprehensive reward data is used to indicate a prediction direction of the exercise model, and the comprehensive loss data is used to indicate a historical prediction deviation of the exercise model; updating the exercise model according to the historical exercise data, the comprehensive reward data, and the comprehensive loss data; acquiring a target exercise plan according to the basic information data, the historical exercise data, and the updated exercise model.
2. The motion plan generation method of claim 1, wherein, The method comprises: acquiring the comprehensive reward data according to the basic information data, the historical exercise data, the exercise model, and a preset state prediction model; acquiring the comprehensive loss data according to the historical exercise plan, the historical exercise data, and a pre-stored loss weight.
3. The motion plan generation method of claim 2, wherein, The method comprises: acquiring short-term reward data according to the historical exercise data and the basic information data; acquiring long-term reward data according to the historical exercise data, the exercise model, and a preset state prediction model; acquiring emotional reward data according to the historical exercise data; acquiring comprehensive reward data according to the short-term reward data, the long-term reward data, and the emotional reward data.
4. The motion plan generation method according to claim 3, characterized by, The historical exercise data comprises objective physiological data and subjective evaluation data. The method comprises: acquiring objective reward data according to the objective physiological data and a preset physiological data threshold; acquiring subjective reward data according to the subjective evaluation data; acquiring the short-term reward data according to the objective reward data, the subjective reward data, a preset objective reward weight, and a preset subjective reward weight.
5. The motion plan generation method of claim 3, wherein, The method comprises: acquiring at least one predicted exercise plan according to the historical exercise data and the exercise model; acquiring prediction physiological data and prediction evaluation data of each of the predicted exercise plans according to the state prediction model; acquiring the long-term reward data according to the prediction physiological data and the prediction evaluation data.
6. The motion plan generation method of claim 3, wherein, The historical exercise data comprises subjective evaluation data, and the subjective evaluation data comprises satisfaction data. The method comprises: acquiring the emotional reward data according to the satisfaction data and a preset emotional reward weight.
7. The motion plan generation method of claim 2, wherein, The historical exercise data comprises objective physiological data and subjective evaluation data; and the loss weight comprises a health loss weight, an emotional loss weight, and a safety loss weight. The obtaining the comprehensive loss data according to the historical motion plan, the historical motion data and the pre-stored loss weight comprises: obtaining health loss data according to the objective physiological data and the health loss weight; obtaining emotion loss data according to the subjective evaluation data and the emotion loss weight; obtaining safety loss data according to the historical motion plan and the safety loss weight; obtaining comprehensive loss data according to the health loss data, the emotion loss data and the safety loss data.
8. The motion plan generation method of claim 1, wherein, The updating the motion model according to the historical motion data, the comprehensive reward data and the comprehensive loss data comprises: obtaining an intermediate motion plan, a predicted value of the intermediate motion plan and a target value according to the comprehensive reward data, the historical motion data and the motion model; updating the motion model according to the target value and the comprehensive loss data.
9. The motion plan generation method of claim 8, wherein, The obtaining an intermediate motion plan, a predicted value of the intermediate motion plan and a target value according to the comprehensive reward data, the historical motion data and the motion model comprises: obtaining an intermediate motion plan and a predicted value of the intermediate motion plan according to the historical motion data and the motion model; obtaining the target value according to the comprehensive reward data and the predicted value.
10. The motion plan generation method of claim 8, wherein, The motion model comprises a value network and a policy network; The updating the motion model according to the target value and the comprehensive loss data comprises: updating the value network according to the predicted value and the target value; updating the policy network according to the comprehensive loss data.
11. The motion plan generation method of claim 2, wherein, The number of the historical motion plans is multiple; the method further comprises: updating the loss weight according to each of the historical motion plan and each of the historical motion data.
12. A motion plan generation apparatus characterized by comprising: The device comprises: a first execution module for obtaining basic information data of a user, a historical motion plan and historical motion data of the historical motion plan; a second execution module for obtaining comprehensive reward data and comprehensive loss data according to the basic information data, the historical motion plan, the historical motion data and a pre-constructed motion model; the comprehensive reward data is used for indicating a predicted direction of the motion model, and the comprehensive loss data is used for indicating a historical prediction deviation of the motion model; a third execution module for updating the motion model according to the historical motion data, the comprehensive reward data and the comprehensive loss data; a fourth execution module for obtaining a target motion plan according to the basic information data, the historical motion data and the updated motion model.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to realize the steps of the method in any one of claims 1 to 11.
14. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 11.