Power vehicle training constant heart rate control method and system

By using PID control method and correction value calculation in the power vehicle training system, the power of the power vehicle is accurately adjusted, which solves the problem that the existing system cannot accurately adjust the training intensity, and improves the patient's heart rate stability and rehabilitation training quality.

CN120132312APending Publication Date: 2025-06-13HENAN BISTON MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510287214.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing power vehicle training system cannot accurately adjust the training intensity according to the patient's heart rate changes, resulting in large fluctuations in the heart rate and reducing the quality of rehabilitation training.

Method used

A constant heart rate control method for power vehicle training is adopted. By obtaining the patient's real-time heart rate, calculating and adjusting the load value based on the PID control equation, adjusting the power of the power vehicle, and determining the correction value based on the real-time characteristic value and exercise duration, accurately correcting the load value of the next adjustment is achieved.

Benefits of technology

It effectively reduces the patient's heart rate fluctuations during training, makes the heart rate more stable, and improves the quality of rehabilitation training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120132312A_ABST
    Figure CN120132312A_ABST
Patent Text Reader

Abstract

The invention relates to a power vehicle training constant heart rate control method and system, and relates to the field of PID control, and the method comprises the steps: obtaining a first real-time heart rate of a patient, calculating an adjustment load value of a power vehicle according to a preset PID control equation based on the first real-time heart rate and a preset heart rate threshold value, and adjusting the power of the power vehicle according to the adjustment load value, and obtaining a second real-time heart rate within the adjusted preset time period and the rotating speed of the power vehicle, determining a real-time characteristic value of the patient based on the second real-time heart rate and the rotating speed, obtaining the current movement time length of the patient, and determining a correction value for calculating and adjusting the load value next time according to the real-time characteristic value and the current movement time length. After the adjustment load value of the power vehicle is determined next time, the correction value is combined to obtain the final adjustment load value of the next time. The method has the advantages that the center rate of the patient in the training process is more stable, and large fluctuation is not prone to occurring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of PID control, and particularly to a method and system for controlling a constant heart rate during power bike training. Background Art

[0002] Cardiac rehabilitation training has become one of the important means for the treatment and recovery of heart diseases. When performing cardiac rehabilitation training, a power bike is usually required. As a way of cardiac rehabilitation training, power bike training has the advantage of improving the patient's heart function by adjusting the load intensity (i.e., adjusting the power of the power bike). However, most of the existing power bike training systems are of fixed intensity or simple load adjustment methods, and cannot accurately adjust the training intensity according to the patient's heart rate changes, which easily leads to large heart rate fluctuations, thus reducing the quality of rehabilitation training. Summary of the Invention

[0003] In order to make the heart rate of the patient more stable during the training process and not prone to large fluctuations, the present application provides a method and system for controlling a constant heart rate during power bike training.

[0004] In the first aspect, the present application provides a method for controlling a constant heart rate during power bike training, adopting the following technical solution:

[0005] A method for controlling a constant heart rate during power bike training includes:

[0006] Obtaining the first real-time heart rate of the patient;

[0007] Calculating the adjusted load value of the power bike according to a preset PID control equation based on the first real-time heart rate and a preset heart rate threshold;

[0008] Adjusting the power of the power bike according to the adjusted load value, and obtaining the second real-time heart rate and the rotation speed of the power bike within a preset time period after adjustment;

[0009] Determining the real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed;

[0010] Obtaining the current exercise duration of the patient, and determining a correction value for calculating the adjusted load value next time according to the real-time characteristic value and the current exercise duration, so that after determining the adjusted load value of the power bike next time, the correction value is combined to obtain the final adjusted load value next time.

[0011] By adopting the above technical solution, the first real-time heart rate of the patient is obtained, which facilitates subsequent adjustment of the power of the exercise bike according to the heart rate change. According to the first real-time heart rate and the preset heart rate threshold, the adjustment load value of the power of the exercise bike is calculated according to the PID control equation. Then, the power of the exercise bike is adjusted according to the adjustment load value. The second real-time heart rate and the rotation speed of the exercise bike within a preset time period after adjustment are obtained. The second real-time heart rate represents the heart rate change of the patient after power adjustment, and the rotation speed represents the actual reaction of the patient during the exercise bike training after power adjustment. Therefore, according to the second real-time heart rate and the rotation speed, the real-time characteristic value of the patient after power adjustment can be accurately determined. The current exercise duration of the patient is obtained. The longer the exercise duration, the greater the physical consumption of the patient. The current exercise duration represents the current physical condition of the patient. Therefore, according to the real-time characteristic value of the patient and the current exercise duration, the correction value for calculating the adjustment load value next time can be accurately determined, so that the final adjustment load value of the exercise bike determined next time combined with the correction value is more adapted to the current situation of the patient, reducing the heart rate fluctuation and making the heart rate of the patient more stable during the training process.

[0012] In another possible implementation manner, calculating the adjustment load value of the exercise bike according to the preset PID control equation based on the real-time heart rate, the preset heart rate threshold, and the real-time power includes:

[0013] Subtract the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference;

[0014] Input the heart rate difference into the preset PID control equation for calculation to obtain the adjustment load value. The preset PID control equation is:

[0015]

[0016] where e(t) is the heart rate difference, u(t) is the adjustment load value, K p is the proportionality coefficient, K i is the integral coefficient, and K d is the differential coefficient.

[0017] In another possible implementation manner, determining the real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed includes:

[0018] Determine a heart rate change line graph based on the second real-time heart rate;

[0019] Determine a first heart rate change rate and a first average heart rate from the heart rate change line graph, and obtain a second heart rate change rate and a second average heart rate. The second heart rate change rate is the heart rate change rate from after the last adjustment of the power of the ergometer to the current adjustment of the power of the ergometer according to the adjusted load value. The second average heart rate is the average heart rate from after the last adjustment of the power of the ergometer to the current adjustment of the power of the ergometer according to the adjusted load value;

[0020] Determine the rate difference between the first heart rate change rate and the second heart rate change rate;

[0021] Calculate a first difference between the first average heart rate and a preset heart rate threshold, and a second difference between the second average heart rate and the preset heart rate threshold;

[0022] Based on the first average heart rate and the preset heart rate threshold, determine a calculation rule for calculating the next final adjusted load value of the ergometer according to the correction value for the next determined adjusted load value of the ergometer;

[0023] Based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed, determine the real-time characteristic value.

[0024] In another possible implementation manner, the determining the real-time characteristic value based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed includes:

[0025] Determine a first ratio of the first average heart rate to the rotational speed, and a second ratio of the rate difference to the rotational speed;

[0026] If the first average heart rate is not greater than the preset heart rate threshold, determine the first difference as a negative value. If the first average heart rate is greater than the preset heart rate threshold, determine the first difference as a positive value;

[0027] If the second average heart rate is not greater than the preset heart rate threshold, determine the second difference as a negative value. If the second average heart rate is greater than the preset heart rate threshold, determine the second difference as a positive value;

[0028] Take the absolute value of the difference between the first difference and the second difference to obtain a difference change value;

[0029] Multiply the difference change value by the first ratio and the second ratio respectively to obtain a first characteristic value and a second characteristic value. The first characteristic value and the second characteristic value are the real-time characteristic values.

[0030] In another possible implementation manner, the determining the correction value for calculating the adjusted load value next time according to the real-time characteristic value and the current exercise duration includes:

[0031] Input the real-time eigenvalue and the current exercise duration into the trained network model to calculate the correction value, and obtain the correction value for adjusting the load value in the next calculation.

[0032] In another possible implementation, the calculation rule for determining the final adjusted load value for the next time of the power bike based on the correction value according to the first average heart rate and the preset heart rate threshold includes:

[0033] If the first average heart rate is greater than the preset heart rate threshold, the calculation rule is to add the correction value to the adjusted load value determined next time;

[0034] If the first average heart rate is not greater than the preset heart rate threshold, the calculation rule is to subtract the correction value from the adjusted load value determined next time.

[0035] In another possible implementation, the method further includes:

[0036] When it is detected that the patient ends the training, generate an overall heart rate change graph based on the heart rate of the patient during the entire training process;

[0037] Determine the overall heart rate average value, variance and range from the overall heart rate change graph;

[0038] Calculate the third difference between the overall heart rate average value and the preset heart rate threshold;

[0039] Determine the quality of the patient's current training based on the third difference, variance, range and their respective coefficients.

[0040] In a second aspect, the present application provides a constant heart rate control system for power bike training, adopting the following technical solution:

[0041] A constant heart rate control system for power bike training includes:

[0042] A heart rate acquisition module for acquiring the first real-time heart rate of the patient;

[0043] A load value calculation module for calculating the adjusted load value of the power bike according to the preset PID control equation based on the first real-time heart rate and the preset heart rate threshold;

[0044] A data acquisition module for adjusting the power of the power bike according to the adjusted load value, and acquiring the second real-time heart rate and the rotation speed of the power bike within a preset time period after adjustment;

[0045] A feature value determination module for determining the real-time eigenvalue of the patient based on the second real-time heart rate and the rotation speed;

[0046] A correction value calculation module, configured to obtain the current exercise duration of the patient, and determine a correction value for calculating the adjusted load value next time according to the real-time eigenvalue and the current exercise duration, so that after determining the adjusted load value of the power bike next time, the correction value is combined to obtain the final adjusted load value next time.

[0047] By adopting the above technical solution, the heart rate acquisition module acquires the first real-time heart rate of the patient, which facilitates subsequent adjustment of the power of the power bike according to the heart rate change. The load value calculation module calculates the adjusted load value of the power of the power bike according to the first real-time heart rate and the preset heart rate threshold according to the PID control equation. Then, the data acquisition module adjusts the power of the power bike according to the adjusted load value, and acquires the second real-time heart rate and the rotation speed of the power bike within a preset time period after adjustment. The second real-time heart rate represents the heart rate change of the patient after power adjustment, and the rotation speed represents the actual reaction of the patient during power bike training after power adjustment. Therefore, the eigenvalue determination module can accurately determine the real-time eigenvalue of the patient after power adjustment according to the second real-time heart rate and the rotation speed, and obtain the current exercise duration of the patient. The longer the exercise duration, the greater the physical consumption of the patient. The current exercise duration represents the current physical condition of the patient. Therefore, the correction value calculation module can accurately determine the correction value for calculating the adjusted load value next time according to the real-time eigenvalue and the current exercise duration of the patient, so that the adjusted load value of the power bike determined next time is combined with the correction value to obtain a final adjusted load value that better adapts to the current situation of the patient, reducing heart rate fluctuations and making the heart rate of the patient more stable during training.

[0048] In another possible implementation manner, when calculating the adjusted load value of the power bike according to the preset PID control equation based on the real-time heart rate, the preset heart rate threshold, and the real-time power, the load value calculation module is specifically configured to:

[0049] Subtract the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference;

[0050] Input the heart rate difference into the preset PID control equation for calculation to obtain the adjusted load value. The preset PID control equation is:

[0051]

[0052] where e(t) is the heart rate difference, u(t) is the adjusted load value, K p is the proportionality coefficient, K i is the integral coefficient, K d is the differential coefficient.

[0053] In another possible implementation manner, when determining the real-time eigenvalue of the patient based on the second real-time heart rate and the rotation speed, the eigenvalue determination module is specifically configured to:

[0054] Determine a heart rate change line graph based on the second real-time heart rate;

[0055] Determine a first heart rate change rate and a first average heart rate from the heart rate change line graph, and obtain a second heart rate change rate and a second average heart rate. The second heart rate change rate is the heart rate change rate between the time after the power of the ergometer was last adjusted and the time when the power of the ergometer is adjusted according to the adjusted load value this time. The second average heart rate is the average heart rate between the time after the power of the ergometer was last adjusted and the time when the power of the ergometer is adjusted according to the adjusted load value this time;

[0056] Determine the rate difference between the first heart rate change rate and the second heart rate change rate;

[0057] Calculate a first difference between the first average heart rate and a preset heart rate threshold, and a second difference between the second average heart rate and the preset heart rate threshold;

[0058] Determine a calculation rule for calculating a next final adjusted load value of the ergometer according to the correction value based on the first average heart rate and the preset heart rate threshold;

[0059] Determine the real-time characteristic value based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotation speed.

[0060] In another possible implementation manner, when determining the real-time characteristic value based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotation speed, the characteristic value determination module is specifically configured to:

[0061] Determine a first ratio of the first average heart rate to the rotation speed, and a second ratio of the rate difference to the rotation speed;

[0062] If the first average heart rate is not greater than the preset heart rate threshold, determine the first difference as a negative value. If the first average heart rate is greater than the preset heart rate threshold, determine the first difference as a positive value;

[0063] If the second average heart rate is not greater than the preset heart rate threshold, determine the second difference as a negative value. If the second average heart rate is greater than the preset heart rate threshold, determine the second difference as a positive value;

[0064] Take the absolute value of the difference between the first difference and the second difference to obtain a difference change value;

[0065] Multiply the difference change value by the first ratio and the second ratio respectively to obtain a first eigenvalue and a second eigenvalue, and the first eigenvalue and the second eigenvalue are the real-time eigenvalues.

[0066] In another possible implementation manner, when the correction value calculation module determines the correction value for adjusting the load value in the next calculation according to the real-time eigenvalue and the current exercise duration, it is specifically configured to:

[0067] Input the real-time eigenvalue and the current exercise duration into a trained network model for correction value calculation to obtain the correction value for adjusting the load value in the next calculation.

[0068] In another possible implementation manner, when the eigenvalue determination module determines the calculation rule for calculating the final adjusted load value of the exercise bike in the next time according to the correction value based on the first average heart rate and the preset heart rate threshold, it is specifically configured to:

[0069] If the first average heart rate is greater than the preset heart rate threshold, the calculation rule is to add the correction value to the adjusted load value determined next time;

[0070] If the first average heart rate is not greater than the preset heart rate threshold, the calculation rule is to subtract the correction value from the adjusted load value determined next time.

[0071] In another possible implementation manner, an exercise bike training constant heart rate control system further includes:

[0072] A generation module, configured to generate an overall heart rate change graph based on the heart rate of the patient during the entire training process when it is detected that the patient ends the training;

[0073] A data determination module, configured to determine the overall heart rate average value, variance, and range from the overall heart rate change graph;

[0074] A difference calculation module, configured to calculate a third difference between the overall heart rate average value and the preset heart rate threshold;

[0075] A quality determination module, configured to determine the quality of the patient's current training based on the third difference, variance, range, and their respective coefficients.

[0076] In a third aspect, the present application provides an electronic device, adopting the following technical solution:

[0077] An electronic device, the electronic device includes:

[0078] At least one processor;

[0079] A memory;

[0080] At least one application program, where the at least one application program is stored in a memory and configured to be executed by at least one processor, and the at least one configuration is for: executing a constant heart rate control method for power bike training shown in any possible implementation manner of the first aspect.

[0081] In a fourth aspect, the present application provides a computer-readable storage medium, adopting the following technical solution:

[0082] A computer-readable storage medium, when the computer program is executed in a computer, causes the computer to execute a constant heart rate control method for power bike training described in any item of the first aspect.

[0083] In summary, the present application includes at least one of the following beneficial technical effects:

[0084] Obtain the first real-time heart rate of the patient to facilitate subsequent adjustment of the power of the power bike according to the heart rate change. Calculate the adjustment load value of the power of the power bike according to the first real-time heart rate and the preset heart rate threshold according to the PID control equation, and then adjust the power of the power bike according to the adjustment load value. Obtain the second real-time heart rate and the rotation speed of the power bike within a preset time period after the adjustment. The second real-time heart rate represents the heart rate change of the patient after the power adjustment, and the rotation speed represents the actual reaction of the patient during the power bike training after the power adjustment. Therefore, according to the second real-time heart rate and the rotation speed, the real-time characteristic value of the patient after the power adjustment can be accurately determined. Obtain the current exercise duration of the patient. The longer the exercise duration, the greater the physical exertion of the patient. The current exercise duration represents the current physical condition of the patient. Therefore, according to the real-time characteristic value of the patient and the current exercise duration, the correction value for calculating the adjustment load value next time can be accurately determined, so that the final adjustment load value of the power bike determined next time combined with the correction value is more adapted to the current situation of the patient, reducing the heart rate fluctuation and making the heart rate of the patient more stable during the training process. Description of the Drawings

[0085] Figure 1 is a schematic flowchart of a constant heart rate control method for power bike training according to an embodiment of the present application.

[0086] Figure 2 is a schematic structural diagram of a constant heart rate control system for power bike training according to an embodiment of the present application.

[0087] Figure 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Detailed Embodiments

[0088] The following further describes the present application in detail with reference to the drawings.

[0089] After reading this specification, those skilled in the art may make modifications to this embodiment that do not contribute creatively as needed, but as long as they are within the scope of the claims of this application, they are protected by the patent law.

[0090] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without making creative efforts fall within the scope of protection of this application.

[0091] In addition, the term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.

[0092] The embodiments of this application will be further described in detail below in conjunction with the accompanying drawings of the specification.

[0093] The embodiments of this application provide a method for controlling a constant heart rate during power bike training, which is executed by an electronic device. The electronic device can be a server or a terminal device. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication methods. The embodiments of this application do not limit this here, as Figure 1 shown, the method includes step S101, step S102, step S103, step S104, and step S105, where

[0094] S101, obtain the first real-time heart rate of the patient.

[0095] For the embodiments of this application, the staff can place a heart rate monitor on the patient's body (at the heart). The heart rate monitor is connected to the electronic device through a wire, so that the electronic device can obtain the heart rate change graph of the patient during the rehabilitation training on the power bike. The power bike is an exercise device that looks like a bicycle, mainly aimed at evaluating cardiopulmonary function and capable of changing resistance for training.

[0096] S102, calculate the adjusted load value of the power bike according to the preset PID control equation based on the first real-time heart rate and the preset heart rate threshold.

[0097] For the embodiments of the present application, the preset heart rate threshold is the heart rate value when the patient reaches a better rehabilitation training level, usually represented by an interval. For example, the interval of 120 - 140 beats per minute. This interval is set by the staff according to the patient's own situation. In the embodiments of the present application, the preset heart rate threshold can be the middle value of the above heart rate interval, such as 130 beats per minute, and this heart rate threshold is used to represent the heart rate value when the patient reaches a better rehabilitation training level.

[0098] PID control is proportional-integral-derivative control, which can flexibly adjust the load according to the amplitude, rate, and cumulative deviation of the heart rate change. After the electronic device determines the first real-time heart rate, it inputs the first real-time heart rate and the preset heart rate threshold into the preset PID control equation to calculate the adjusted load value of the power bike, and the adjusted load value is the adjustment amount of the power of the power bike.

[0099] S103, Adjust the power of the power bike according to the adjusted load value, and obtain the second real-time heart rate and the rotation speed of the power bike within the preset time period after adjustment.

[0100] For the embodiments of the present application, the electronic device is connected to the power bike through a wire. After the electronic device determines the adjusted load value, it transmits the adjusted load value to the power bike, so that the power bike adjusts its own power after receiving the adjusted load value. The preset time period can be 10 seconds (s), 15 s, etc. after adjustment. The electronic device obtains the second real-time heart rate of the patient within the preset time period after adjustment. A rotation speed sensor is provided at the rotating shaft of the power bike, and the rotation speed sensor is connected to the electronic device through a wire, so that the electronic device can obtain the rotation speed of the power bike collected by the rotation speed sensor within the preset time period after adjustment.

[0101] S104, Determine the real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed.

[0102] For the embodiments of the present application, the second real-time heart rate represents the heart rate condition of the patient after power adjustment, and the rotation speed represents the actual reaction of the patient during exercise training on the power bike after power adjustment. Therefore, the electronic device can accurately determine the real-time characteristic value of the patient after power adjustment according to the second real-time heart rate and the rotation speed, and it is more accurate to represent the situation of the patient after power adjustment with the real-time characteristic value.

[0103] S105, Obtain the current exercise duration of the patient, and determine the correction value for calculating the adjusted load value next time according to the real-time characteristic value and the current exercise duration, so that the final adjusted load value next time can be obtained by combining the correction value after determining the adjusted load value of the power bike next time.

[0104] For the embodiments of the present application, when the patient starts exercising on the ergometer, the ergometer triggers a signal. After receiving this signal, the electronic device starts timing, thereby recording the patient's exercise duration. Therefore, the electronic device can obtain the patient's current exercise duration. The longer the exercise duration, the greater the degree of physical decline of the patient, which is instructive for determining the correction value of the adjusted load value subsequently. The longer the exercise duration, the greater the degree of physical decline, and the corresponding correction value should not be too large, so as to make the power adjustment smoother. Therefore, the electronic device determines the correction value for calculating the adjusted load value next time according to the current exercise duration and the real-time characteristic value. This correction value is determined according to the patient's current exercise duration and the heart rate performance after the last power adjustment, etc. Therefore, the next adjusted load value is compensated and calculated according to the correction value, that is, the next final adjusted load value is calculated by combining the adjusted load value and the correction value, so that the power output of the ergometer more conforms to the specific situation of the patient's heart rate change, and thus makes the patient's heart rate more stable during the training process. After determining the final adjusted load value next time, the electronic device continues to calculate the load adjustment value of the ergometer according to the patient's heart rate and the preset heart rate after the next adjustment in the manner described in step S102. Then, the second real-time heart rate of the patient within the preset time period after the next adjustment and the rotation speed of the ergometer are obtained. The real-time characteristic value is determined according to the second real-time heart rate and the rotation speed of the ergometer within the preset time period after the next adjustment. Then, the correction value is calculated according to the determined real-time characteristic value. Finally, the load adjustment value of the ergometer is calculated according to the correction value and the patient's heart rate and the preset heart rate after the next adjustment to obtain the next final adjusted load value. The electronic device executes the above loop steps until the training ends.

[0105] A possible implementation manner of the embodiments of the present application is that in step S102, the adjusted load value of the ergometer is calculated according to the real-time heart rate, the preset heart rate threshold, and the real-time power according to the preset PID control equation, which specifically includes step S1021 (not shown in the figure) and step S1022 (not shown in the figure), where

[0106] S1021, subtract the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference.

[0107] For the embodiments of the present application, the electronic device subtracts the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference. The heart rate difference is the gap between the patient's current heart rate and the heart rate value when reaching a better rehabilitation training level. Determining the heart rate difference is convenient for subsequently determining the adjusted load value.

[0108] S1022, input the heart rate difference into the preset PID control equation for calculation to obtain the adjusted load value.

[0109] Among them, the preset PID control equation is:

[0110]

[0111] Among them, e(t) is the heart rate difference, u(t) is the adjusted load value, and K p is the proportionality coefficient, and K i is the integral coefficient, and K d is the differential coefficient.

[0112] For the embodiments of the present application, the electronic device inputs the heart rate difference into the above PID control equation for calculation to obtain the adjusted load value, and the proportionality coefficient, integral coefficient, and differential coefficient therein are all optimal coefficients obtained by relevant personnel based on multiple tests and calculations.

[0113] A possible implementation manner of the embodiments of the present application is that in step S104, the real-time eigenvalue of the patient is determined based on the second real-time heart rate and the rotation speed, specifically including step S1041 (not shown in the figure), step S1042 (not shown in the figure), step S1043 (not shown in the figure), step S1044 (not shown in the figure), step S1045 (not shown in the figure), and step S1046 (not shown in the figure), where

[0114] S1041, determine a heart rate change line graph based on the second real-time heart rate.

[0115] For the embodiments of the present application, after the electronic device obtains the second real-time heart rate, it maps the second real-time heart rate into a preset coordinate system, where the preset coordinate system is a coordinate system in which the heart rate changes with time, and the electronic device connects the points in the mapped preset coordinate system in sequence to obtain a heart rate change line graph.

[0116] S1042, determine a first heart rate change rate and a first average heart rate from the heart rate change line graph, and obtain a second heart rate change rate and a second average heart rate.

[0117] Among them, the second heart rate change rate is the heart rate change rate between the last adjustment of the power of the ergometer and the current adjustment of the power of the ergometer according to the adjusted load value, and the second average heart rate is the average heart rate between the last adjustment of the power of the ergometer and the current adjustment of the power of the ergometer according to the adjusted load value.

[0118] For the embodiments of this application, the electronic device linearly fits the heart rate change line graph through the origin software plug-in to obtain a linear function, and then the electronic device calculates the slope of the linear function, which is the first heart rate change rate. Then, the electronic device calculates the first average heart rate by calculating the coordinate points in the heart rate change line graph through the average value calculation formula. The first heart rate change rate characterizes the speed at which the heart rate decreases or increases after power adjustment, and characterizes the quality of power adjustment. The first average heart rate characterizes the overall heart rate level of the patient after power adjustment. Each time the power bike adjusts the power, it records the time of power adjustment and sends it to the electronic device. Therefore, the electronic device can obtain the second heart rate change rate and the second average heart rate between these two time points based on the time point of the last adjustment and the time point of the current adjustment.

[0119] S1043. Determine the rate difference between the first heart rate change rate and the second heart rate change rate.

[0120] For the embodiments of this application, the electronic device subtracts the first heart rate change rate from the second heart rate change rate to obtain the rate difference. The rate difference characterizes the gap between the heart rate change speeds after two power adjustments. The smaller the rate difference, the closer the heart rate change speeds after two power adjustments, and the smaller the heart rate fluctuation of the patient. Therefore, the rate difference can be used as a key factor to reflect the patient's heart rate condition.

[0121] S1044. Calculate the first difference between the first average heart rate and the preset heart rate threshold, and the second difference between the second average heart rate and the preset heart rate threshold.

[0122] For the embodiments of this application, the electronic device subtracts the preset heart rate threshold from the first average heart rate to obtain the first difference. The first difference characterizes the gap between the overall heart rate of the patient after this power adjustment and the heart rate value when reaching a better rehabilitation training level. The smaller the first difference, the better the effect of this power adjustment, and vice versa. The electronic device subtracts the preset heart rate threshold from the second average heart rate to obtain the second difference. The second difference characterizes the gap between the overall heart rate of the patient after the last power adjustment and the heart rate value when reaching a better rehabilitation training level. The smaller the second difference, the better the effect of the last power adjustment, and vice versa. In summary, both the first difference and the second difference are key factors to reflect the patient's heart rate condition.

[0123] S1045. Based on the first average heart rate and the preset heart rate threshold, determine the calculation rule for calculating the next final adjustment load value of the power bike by using the correction value for the next determined adjustment load value.

[0124] For the embodiments of the present application, the relationship between the first average heart rate and the preset heart rate threshold affects the calculation rules for the final correction value and the next determined adjustment load value. For example, adding the correction value to the adjustment load value, subtracting the correction value from the adjustment load value, etc. Therefore, the electronic device can determine the calculation rules between the next adjustment load value and the correction value based on the first average heart rate and the preset heart rate threshold.

[0125] S1046. Determine a real-time eigenvalue based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed.

[0126] For the embodiments of the present application, in summary, the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed are all key factors affecting the patient's own heart rate condition. Therefore, the electronic device comprehensively determines a more accurate real-time eigenvalue based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed.

[0127] In a possible implementation manner of the embodiments of the present application, in step S1046, determining the real-time eigenvalue based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotational speed specifically includes step Sa (not shown in the figure), step Sb (not shown in the figure), step Sc (not shown in the figure), step Sd (not shown in the figure), and step Se (not shown in the figure), where

[0128] Sa. Determine a first ratio of the first average heart rate to the rotational speed, and a second ratio of the rate difference to the rotational speed.

[0129] For the embodiments of the present application, the electronic device divides the value of the first average heart rate by the value of the rotational speed to obtain the first ratio, and divides the value of the rate difference by the rotational speed to obtain the second ratio. Since the first average heart rate, the rotational speed, and the rate difference are all reflected by the patient's own heart rate condition and exercise performance on the ergometer, the first ratio and the second ratio are both eigenvalues unique to the patient.

[0130] Sb. If the first average heart rate is not greater than the preset heart rate threshold, determine the first difference as a negative value; if the first average heart rate is greater than the preset heart rate threshold, determine the first difference as a positive value.

[0131] For the embodiments of the present application, the electronic device compares the first average heart rate with the preset heart rate threshold. If the first average heart rate is not greater than the preset heart rate threshold, it means that the heart rate after this adjustment is below the heart rate value at a better rehabilitation training level. To facilitate subsequent calculation of the gap between the first difference and the second difference, the electronic device determines the first difference as a negative value. Conversely, if the first average heart rate is greater than the preset heart rate threshold, the electronic device determines the first difference as a positive value.

[0132] For Sc, if the second average heart rate is not greater than the preset heart rate threshold, the second difference is determined to be negative; if the second average heart rate is greater than the preset heart rate threshold, the second difference is determined to be positive.

[0133] For the embodiments of the present application, the electronic device compares and contrasts the second average heart rate with the preset heart rate threshold. If the second average heart rate is not greater than the preset heart rate threshold, it indicates that the heart rate after the last adjustment is below the heart rate value at a better rehabilitation training level. To facilitate subsequent calculation of the gap between the first difference and the second difference, the electronic device determines the second difference as negative. Conversely, if the second average heart rate is greater than the preset heart rate threshold, the electronic device determines the second difference as positive.

[0134] For Sd, the difference between the first difference and the second difference is calculated and the absolute value is taken to obtain the difference change value.

[0135] For the embodiments of the present application, after the electronic device determines the positive and negative values of the first difference and the second difference according to the size relationship between the first difference and the second difference and the preset heart rate threshold respectively, the electronic device directly calculates the difference between the first difference and the second difference and then takes the absolute value to obtain the gap between the first difference and the second difference, that is, the difference change value. The difference change value characterizes the change and fluctuation degree of the patient's overall heart rate after the last power adjustment and this power adjustment, and further characterizes the quality of the two power adjustments. The larger the difference change value, the greater the fluctuation degree of the patient's heart rate after the two power adjustments, indicating that the quality of the power adjustment is lower. On the contrary, the smaller the fluctuation degree, the higher the quality of the power adjustment.

[0136] For Se, the difference change value is multiplied by the first ratio and the second ratio respectively to obtain the first characteristic value and the second characteristic value.

[0137] Among them, the first characteristic value and the second characteristic value are real-time characteristic values.

[0138] For the embodiments of the present application, the electronic device multiplies the difference change value characterizing the adjustment quality of the two power adjustments by the first ratio and the second ratio respectively to obtain the first characteristic value and the second characteristic value. The first characteristic value and the second characteristic value combined after the operation of the difference change value are more in line with the heart rate performance of the patient after the two power adjustments. The first characteristic value and the second characteristic value are both real-time characteristic values.

[0139] In a possible implementation manner of the embodiments of the present application, in step S105, the correction value for calculating the adjustment load value next time is determined according to the real-time characteristic value and the current exercise duration, which specifically includes step S1051 (not shown in the figure), where

[0140] S1051, input the real-time characteristic value and the current exercise duration into the trained network model for correction value calculation to obtain the correction value for calculating the adjustment load value next time.

[0141] For the embodiments of the present application, relevant personnel collect a large number of training samples in advance. For example, the adjusted load value, the rotation speed of the ergometer, the first real-time heart rate, the second real-time heart rate, etc. calculated when normal people exercise on the ergometer are collected. Then, the adjusted load value, the rotation speed of the ergometer, the first real-time heart rate, and the second real-time heart rate are mapped with the correction value calculated when normal people exercise on the ergometer to determine the correlation relationship and obtain the training samples. Another example is the adjusted load value, the rotation speed of the ergometer, the first real-time heart rate, the second real-time heart rate, etc. of the people who need to perform cardiopulmonary rehabilitation training. Then, the adjusted load value, the rotation speed of the ergometer, the first real-time heart rate, and the second real-time heart rate are mapped with the correction value calculated when the people who need to perform cardiopulmonary rehabilitation training exercise on the ergometer to determine the correlation relationship and obtain the training samples. Then, the training sample set is input into the initial network model for supervised training to obtain a trained network model. Then, the electronic device inputs the real-time characteristic values of the patient into the trained network model to calculate the correction value, so as to obtain an accurate correction value for calculating the adjusted load value next time. Specifically, the network model can be a convolutional neural network model, a recurrent neural network model, or other types of network models, which are not limited herein.

[0142] In a possible implementation manner of the embodiments of the present application, the calculation rule for calculating the next final adjusted load value of the ergometer according to the correction value based on the first average heart rate and the preset heart rate threshold in step S1045 specifically includes step S1 (not shown in the figure) and step S2 (not shown in the figure), where

[0143] S1, if the first average heart rate is not less than the preset heart rate threshold, the calculation rule is that the adjusted load value determined next time is added with the correction value.

[0144] For the embodiments of the present application, the electronic device compares the first average heart rate with the preset heart rate threshold. If the first average heart rate is not less than the preset heart rate threshold, it means that the overall heart rate of the patient after the current power adjustment is still higher than or just reaches the preset heart rate threshold, that is, the power of the ergometer is still relatively high and the load is relatively large for the patient. It is necessary to approach the preset heart rate threshold so that the heart rate of the patient is not easily exceeded. When adjusting the power of the ergometer next time, the power of the ergometer is still reduced. Therefore, the determined calculation rule is addition, that is, after the adjusted load value is determined next time, the adjusted load value is added with the correction value to obtain the final adjusted load value, so as to reduce the power of the ergometer according to a larger final adjusted load value, and further make the power of the ergometer more suitable for the heart rate performance of the patient, and the heart rate of the patient is more easily close to the preset heart rate threshold.

[0145] S2, if the first average heart rate is less than the preset heart rate threshold, the calculation rule is that the adjusted load value determined next time is subtracted by the correction value.

[0146] For the embodiments of the present application, the electronic device compares the first average heart rate with a preset heart rate threshold. If the first average heart rate is less than the preset heart rate threshold, it indicates that the overall heart rate of the patient still has not reached the preset heart rate threshold after this power adjustment, that is, the power of the exercise bike is still relatively low and the load is small for the patient, and it is necessary to approach the preset heart rate threshold. When adjusting the power of the exercise bike next time, the power of the exercise bike is increased. Therefore, the determined calculation rule is subtraction, that is, after determining the adjusted load value next time, the corrected value is subtracted from the adjusted load value to obtain the final adjusted load value, so as to increase the power of the exercise bike according to a smaller final adjusted load value, thereby making the power of the exercise bike more adaptable to the heart rate performance of the patient, making it easier for the patient's heart rate to approach the preset heart rate threshold, and reducing the possibility of the patient's heart rate being too high.

[0147] A possible implementation manner of the embodiments of the present application further includes step S106 (not shown in the figure), step S107 (not shown in the figure), step S108 (not shown in the figure), and step S109 (not shown in the figure) after step S105, where

[0148] S106, when it is detected that the patient ends the training, generate an overall heart rate change graph based on the heart rate of the patient during the entire training process.

[0149] For the embodiments of the present application, the electronic device obtains the heart rate of the patient during the entire training process collected by the heart rate monitor on the patient, and then maps the heart rate into a preset coordinate system in which the heart rate changes with time to obtain the overall heart rate change graph.

[0150] S107, determine the overall heart rate average value, variance, and range from the overall heart rate change graph.

[0151] For the embodiments of the present application, the electronic device calculates the overall heart rate average value of the heart rate on the overall heart rate change graph through the average value calculation formula, and it is more accurate to use the overall heart rate average value to characterize the heart rate level of the patient during the entire training process. The electronic device calculates the variance of the heart rate on the overall heart rate change graph through the variance calculation formula. The variance characterizes the heart rate fluctuation situation of the patient during the entire training process. The larger the variance, the greater the heart rate fluctuation and the more unstable the patient is, and the better the training effect. On the contrary, it indicates that the training effect is worse. The electronic device determines the maximum heart rate and the minimum heart rate from the overall heart rate change graph, and then uses the range calculation formula, that is, subtracts the minimum heart rate from the maximum heart rate to obtain the range. The range also characterizes the fluctuation situation of the patient during the training process to a certain extent. The larger the range, the greater the heart rate fluctuation and the more unstable the patient is, and the worse the training effect. On the contrary, it indicates that the training effect is better.

[0152] S108, calculate the third difference between the overall heart rate average value and the preset heart rate threshold.

[0153] For the embodiments of the present application, after the electronic device determines the overall heart rate average value, it subtracts the preset heart rate threshold value from the overall heart rate average value to obtain a third difference. The smaller the third difference, the closer the overall heart rate of the patient is to the heart rate at a better rehabilitation training level during the training process, indicating a better training effect. On the contrary, the farther away from the heart rate at a better rehabilitation training level, the worse the training effect.

[0154] S109. Determine the quality of the patient's current training based on the third difference, variance, range, and their respective corresponding coefficients.

[0155] For the embodiments of the present application, in summary, the third difference, variance, and extreme value are all key factors affecting the quality of the patient's current training, and their influencing degrees on the training quality are different. Therefore, the staff can set their respective corresponding coefficients for the third difference, variance, and range and store them in the local storage medium in the electronic device. The larger the third difference, the lower the training quality, and the third difference is inversely proportional to the training quality; the larger the variance, the lower the training quality, and the variance is inversely proportional to the training quality; the larger the range, the lower the training quality, and the range is inversely proportional to the training quality. Therefore, for the convenience of calculation and to make the calculation more logical, the electronic device takes the reciprocals of the third difference, variance, and extreme value, multiplies their respective reciprocals by their respective corresponding coefficients for weighted calculation to obtain a score, and this score can represent the quality of the patient's current training. The quality of the current training calculated by the electronic device through comprehensive analysis and combination of the third difference, variance, and extreme value is more accurate. It should be noted that the respective corresponding coefficients of the third difference, variance, and range can be adaptively adjusted according to requirements and actual situations.

[0156] The above embodiments introduce a constant heart rate control method for ergometer training from the perspective of the method flow. The following embodiments introduce an ergometer training constant heart rate control system from the perspective of virtual modules or virtual units. For details, see the following embodiments.

[0157] Embodiments of the present application provide an ergometer training constant heart rate control system 20, as Figure 2 shown. The ergometer training constant heart rate control system 20 may specifically include:

[0158] A heart rate acquisition module 201, configured to acquire the first real-time heart rate of the patient;

[0159] A load value calculation module 202, configured to calculate the adjusted load value of the ergometer based on the first real-time heart rate and the preset heart rate threshold according to a preset PID control equation;

[0160] A data acquisition module 203, configured to adjust the power of the ergometer according to the adjusted load value, and acquire the second real-time heart rate and the rotation speed of the ergometer within a preset time period after adjustment;

[0161] An eigenvalue determination module 204, configured to determine a real-time eigenvalue of a patient based on a second real-time heart rate and a rotation speed;

[0162] A correction value calculation module 205, configured to obtain the current exercise duration of the patient, and determine a correction value for adjusting the load value in the next calculation according to the real-time eigenvalue and the current exercise duration, so that after determining the adjusted load value of the ergometer next time, the correction value is combined to obtain the final adjusted load value for the next time.

[0163] An embodiment of the present application discloses an ergometer training constant heart rate control system 20. Among them, a heart rate acquisition module 201 acquires the first real-time heart rate of a patient, so as to facilitate subsequent adjustment of the power of the ergometer according to the heart rate change. A load value calculation module 202 calculates the adjusted load value of the ergometer power according to the first real-time heart rate and a preset heart rate threshold according to the PID control equation. Then, a data acquisition module 203 adjusts the power of the ergometer according to the adjusted load value, and acquires the second real-time heart rate within a preset time period after the adjustment and the rotation speed of the ergometer. The second real-time heart rate represents the heart rate change of the patient after the power adjustment, and the rotation speed represents the actual reaction of the patient during the ergometer training after the power adjustment. Therefore, the eigenvalue determination module 204 can accurately determine the real-time eigenvalue of the patient after the power adjustment according to the second real-time heart rate and the rotation speed, and acquire the current exercise duration of the patient. The longer the exercise duration, the greater the physical consumption of the patient. The current exercise duration represents the current physical condition of the patient. Therefore, the correction value calculation module 205 can accurately determine the correction value for adjusting the load value in the next calculation according to the real-time eigenvalue and the current exercise duration of the patient, so that the adjusted load value of the ergometer determined next time is combined with the correction value to obtain a final adjusted load value that better adapts to the current situation of the patient, reducing the heart rate fluctuation and making the heart rate of the patient more stable during the training process.

[0164] In a possible implementation manner of the embodiment of the present application, when the load value calculation module 202 calculates the adjusted load value of the ergometer according to the real-time heart rate, the preset heart rate threshold, and the real-time power according to the preset PID control equation, it is specifically configured to:

[0165] Subtract the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference;

[0166] Input the heart rate difference into the preset PID control equation for calculation to obtain the adjusted load value. The preset PID control equation is:

[0167]

[0168] where e(t) is the heart rate difference, u(t) is the adjusted load value, K p is the proportionality coefficient, K i is the integral coefficient, K d is the differential coefficient.

[0169] In a possible implementation of the embodiment of the present application, when the eigenvalue determination module 204 determines the real-time eigenvalue of the patient based on the second real-time heart rate and the rotation speed, it specifically is used for:

[0170] Determine a heart rate change line graph based on the second real-time heart rate;

[0171] Determine a first heart rate change rate and a first average heart rate from the heart rate change line graph, and obtain a second heart rate change rate and a second average heart rate. The second heart rate change rate is the heart rate change rate between the last time the power of the ergometer was adjusted and this time when the power of the ergometer is adjusted according to the adjusted load value, and the second average heart rate is the average heart rate between the last time the power of the ergometer was adjusted and this time when the power of the ergometer is adjusted according to the adjusted load value;

[0172] Determine the rate difference between the first heart rate change rate and the second heart rate change rate;

[0173] Calculate a first difference between the first average heart rate and a preset heart rate threshold, and a second difference between the second average heart rate and the preset heart rate threshold;

[0174] Determine a calculation rule for calculating the next final adjusted load value of the ergometer according to the correction value based on the first average heart rate and the preset heart rate threshold;

[0175] Determine the real-time eigenvalue based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotation speed.

[0176] In a possible implementation of the embodiment of the present application, when the eigenvalue determination module 204 determines the real-time eigenvalue based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotation speed, it specifically is used for:

[0177] Determine a first ratio of the first average heart rate to the rotation speed, and a second ratio of the rate difference to the rotation speed;

[0178] If the first average heart rate is not greater than the preset heart rate threshold, determine the first difference as a negative value. If the first average heart rate is greater than the preset heart rate threshold, determine the first difference as a positive value;

[0179] If the second average heart rate is not greater than the preset heart rate threshold, determine the second difference as a negative value. If the second average heart rate is greater than the preset heart rate threshold, determine the second difference as a positive value;

[0180] Take the absolute value of the difference between the first difference and the second difference to obtain a difference change value;

[0181] Multiply the difference change values by the first ratio and the second ratio respectively to obtain a first eigenvalue and a second eigenvalue, and the first eigenvalue and the second eigenvalue are real-time eigenvalues.

[0182] In a possible implementation manner of the embodiment of the present application, when the correction value calculation module 205 determines the correction value for adjusting the load value in the next calculation according to the real-time eigenvalue and the current exercise duration, it is specifically used for:

[0183] Input the real-time eigenvalue and the current exercise duration into the trained network model for correction value calculation to obtain the correction value for adjusting the load value in the next calculation.

[0184] In a possible implementation manner of the embodiment of the present application, when the eigenvalue determination module 204 determines the calculation rule for calculating the final adjusted load value of the power bike in the next time according to the correction value based on the first average heart rate and the preset heart rate threshold, it is specifically used for:

[0185] If the first average heart rate is greater than the preset heart rate threshold, the calculation rule is that the adjusted load value determined next time plus the correction value;

[0186] If the first average heart rate is not greater than the preset heart rate threshold, the calculation rule is that the adjusted load value determined next time minus the correction value.

[0187] In a possible implementation manner of the embodiment of the present application, a power bike training constant heart rate control system 20 further includes:

[0188] A generation module, configured to generate an overall heart rate change graph based on the heart rate of the patient during the entire training process when it is detected that the patient ends the training;

[0189] A data determination module, configured to determine the overall heart rate average value, variance, and range from the overall heart rate change graph;

[0190] A difference calculation module, configured to calculate a third difference between the overall heart rate average value and the preset heart rate threshold;

[0191] A quality determination module, configured to determine the quality of the patient's current training based on the third difference, variance, range, and their respective coefficients.

[0192] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described power bike training constant heart rate control system 20 can refer to the corresponding process in the foregoing method embodiment, and will not be elaborated herein.

[0193] An electronic device is provided in the embodiment of the present application, as Figure 3 shown Figure 3The electronic device 30 shown includes: a processor 301 and a memory 303. Among them, the processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 30 may further include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one, and the structure of the electronic device 30 does not constitute a limitation to the embodiments of the present application.

[0194] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0195] The bus 302 may include a path for transmitting information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0196] The memory 303 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0197] The memory 303 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 for execution. The processor 301 is used to execute the application program code stored in the memory 303 to implement the content shown in the foregoing method embodiments.

[0198] Among them, the electronic device includes but is not limited to: mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 3 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0199] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When it runs on a computer, the computer can execute the corresponding content in the foregoing method embodiment. Compared with the related art, in the embodiment of the present application, the first real-time heart rate of the patient is obtained to facilitate subsequent adjustment of the power of the exercise bike according to the heart rate change. The adjustment load value of the power of the exercise bike is calculated according to the first real-time heart rate and the preset heart rate threshold according to the PID control equation, and then the power of the exercise bike is adjusted according to the adjustment load value. The second real-time heart rate and the rotation speed of the exercise bike within a preset time period after the adjustment are obtained. The second real-time heart rate represents the heart rate change of the patient after the power adjustment, and the rotation speed represents the actual reaction of the patient during the exercise bike training after the power adjustment. Therefore, the real-time characteristic value of the patient after the power adjustment can be accurately determined according to the second real-time heart rate and the rotation speed. The current exercise duration of the patient is obtained. The longer the exercise duration, the greater the physical consumption of the patient. The current exercise duration represents the current physical condition of the patient. Therefore, the correction value for calculating the adjustment load value next time can be accurately determined according to the real-time characteristic value and the current exercise duration of the patient, so that the final adjustment load value of the exercise bike determined next time combined with the correction value is more adapted to the current situation of the patient, reducing the heart rate fluctuation and making the heart rate of the patient more stable during the training process.

[0200] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least some of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times, and their execution order does not necessarily have to be sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0201] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for controlling a constant heart rate during power bike training, characterized in that: include: Get the patient's first real-time heart rate; Calculating an adjusted load value of the power vehicle according to a preset PID control equation based on the first real-time heart rate and a preset heart rate threshold; Adjusting the power of the power bike according to the adjusted load value, and obtaining a second real-time heart rate and a rotation speed of the power bike within a preset time period after the adjustment; determining a real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed; The current exercise duration of the patient is obtained, and a correction value for calculating the adjustment load value for the next time is determined according to the real-time characteristic value and the current exercise duration, so that the adjustment load value of the power vehicle is determined next time and then the correction value is combined to obtain the final adjustment load value for the next time.

2. A method for controlling a constant heart rate during power bike training according to claim 1, characterized in that: The calculating the adjusted load value of the power vehicle according to a preset PID control equation based on the real-time heart rate, the preset heart rate threshold and the real-time power includes: Subtracting the preset heart rate threshold from the real-time heart rate to obtain a heart rate difference; The heart rate difference is input into a preset PID control equation to calculate the adjusted load value. The preset PID control equation is: Wherein, e(t) is the heart rate difference, u(t) is the adjustment load value, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient.

3. A method for controlling a constant heart rate during power bike training according to claim 1, characterized in that: The determining the real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed includes: Determine a heart rate variation line graph based on the second real-time heart rate; Determine a first heart rate change rate and a first average heart rate from the heart rate change line graph, and obtain a second heart rate change rate and a second average heart rate, wherein the second heart rate change rate is the heart rate change rate between the last time the power of the power vehicle was adjusted and the current time the power of the power vehicle was adjusted according to the adjusted load value, and the second average heart rate is the average heart rate between the last time the power of the power vehicle was adjusted and the current time the power of the power vehicle was adjusted according to the adjusted load value; determining a rate difference between the first heart rate change rate and the second heart rate change rate; Calculating a first difference between the first average heart rate and a preset heart rate threshold, and a second difference between the second average heart rate and a preset heart rate threshold; Based on the first average heart rate and the preset heart rate threshold, a calculation rule is determined to calculate the next final adjusted load value by calculating the adjusted load value of the power vehicle determined next time according to the correction value; The real-time characteristic value is determined based on the rate difference, the first difference, the second difference, the first average heart rate, and the rotation speed.

4. A method for controlling a constant heart rate during power bike training according to claim 3, characterized in that: The determining the real-time characteristic value based on the rate difference, the first difference, the second difference, the first average heart rate and the rotation speed includes: Determining a first ratio of the first average heart rate to the rotation speed, and a second ratio of the rate difference to the rotation speed; If the first average heart rate is not greater than the preset heart rate threshold, the first difference is determined as a negative value; if the first average heart rate is greater than the preset heart rate threshold, the first difference is determined as a positive value; If the second average heart rate is not greater than the preset heart rate threshold, the second difference is determined as a negative value; if the second average heart rate is greater than the preset heart rate threshold, the second difference is determined as a positive value; Subtracting the first difference from the second difference and taking the absolute value to obtain a difference change value; The first and second eigenvalues ​​are obtained by multiplying the difference change value by the first ratio and the second ratio, respectively. The first and second eigenvalues ​​are the real-time eigenvalues.

5. A method for controlling a constant heart rate during power bike training according to claim 1, characterized in that: The method of determining a correction value for calculating and adjusting the load value for the next time according to the real-time characteristic value and the current exercise duration includes: The real-time characteristic value and the current exercise duration are input into the trained network model to calculate the correction value, so as to obtain the correction value for the next calculation to adjust the load value.

6. A method for controlling a constant heart rate during power bike training according to claim 3, characterized in that: The calculation rule for calculating the next final adjusted load value of the power vehicle to be determined based on the first average heart rate and the preset heart rate threshold according to the correction value to obtain the next final adjusted load value includes: If the first average heart rate is greater than the preset heart rate threshold, the calculation rule is to add the correction value to the adjustment load value determined next time; If the first average heart rate is not greater than the preset heart rate threshold, the calculation rule is to subtract the correction value from the adjustment load value determined next time.

7. A method for controlling a constant heart rate during power bike training according to claim 1, characterized in that: The method further comprises: When it is detected that the patient has finished training, an overall heart rate variation graph is generated based on the patient's heart rate during the entire training process; Determine the overall heart rate mean, variance and range from the overall heart rate variation graph; Calculating a third difference between the overall heart rate average value and a preset heart rate threshold; The quality of the patient's training is determined based on the third difference, variance, range and their corresponding coefficients.

8. A constant heart rate control system for power bike training, characterized in that: include: A heart rate acquisition module, used to acquire the patient's first real-time heart rate; A load value calculation module, configured to calculate an adjusted load value of the power vehicle according to a preset PID control equation based on the first real-time heart rate and a preset heart rate threshold; A data acquisition module, used for adjusting the power of the power vehicle according to the adjusted load value, and acquiring a second real-time heart rate and a rotation speed of the power vehicle within a preset time period after the adjustment; a characteristic value determination module, configured to determine a real-time characteristic value of the patient based on the second real-time heart rate and the rotation speed; The correction value calculation module is used to obtain the current exercise duration of the patient, and determine the correction value for the next calculation of the adjusted load value based on the real-time characteristic value and the current exercise duration, so that the next time the adjusted load value of the power vehicle is determined, the final adjusted load value for the next time is obtained in combination with the correction value.

9. An electronic device, characterized in that: It includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in the memory and configured to be executed by the at least one processor, and the at least one application is used to execute a constant heart rate control method for power bike training according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method for controlling a constant heart rate during power bike training as claimed in any one of claims 1 to 7.