A cycling advice power calculation method and apparatus

CN122828336APending Publication Date: 2026-09-29QINGDAO MAGENE INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611008606.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

对能力较强的用户而言,该配速可能过于轻松,无法达到预期的训练强度;而对能力较弱的用户,则可能负荷过重,导致过早疲劳甚至运动损伤

Benefits of technology

[0026]由上述技术方案可以看出,本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122828336A_ABST
    Figure CN122828336A_ABST
Patent Text Reader

Abstract

This application relates to a method for calculating suggested cycling power, belonging to the field of cycling guidance technology. The method includes: dividing the route into segments according to the user-set start and end points; obtaining the user's physiological data, route gradient, and length; calculating the initial power of each segment using a mapping model based on the route gradient and cycling intensity, and estimating the cycling speed and time accordingly; calculating the deviation value using a loss function by combining cycling intensity, physiological data, cycling time, and initial power; if the deviation value does not exceed a threshold, outputting the initial power as the final power; if it exceeds the threshold, adjusting the mapping model parameters and repeating the calculation until the output conditions are met. This invention achieves personalized adjustment of cycling guidance by introducing user physiological data and combining it with route characteristics for dynamic power allocation, effectively avoiding uneven load caused by uniform pace, and improving the scientific nature and universality of cycling guidance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of cycling instruction, and more particularly to a method for calculating recommended cycling power. Background Technology

[0002] In the field of cycling, cycling guidance suggestions are typically provided to enhance the user's cycling experience and training results. Traditional cycling guidance programs often use pace as the core recommendation indicator, aiming to help users maintain a relatively stable cycling rhythm.

[0003] Current pace-based guidance methods have limitations, as they fail to adequately account for individual differences in athletic ability among users. For example, the physiological load (such as heart rate and power output) required to maintain the same pace for two cyclists with different abilities is drastically different. For a more capable user, the pace may be too easy to achieve the desired training intensity; while for a less capable user, it may be too strenuous, leading to premature fatigue or even injury.

[0004] This results in existing cycling suggestion programs being unable to be personalized based on users' individual physiological data and desired exercise intensity, leading to poor universality and difficulty in meeting the diverse needs of cycling enthusiasts. Summary of the Invention

[0005] This application addresses, to at least some extent, one of the technical problems in the related art.

[0006] Therefore, this application aims to provide a method and device for calculating cycling power recommendations, which calculates cycling power based on the user's physiological data and the exercise intensity set by the user, fully taking into account individual differences, providing users with more accurate cycling power recommendations, and improving the versatility of the method.

[0007] To achieve the above objectives, this application provides a method for calculating recommended cycling power, comprising the following steps: S100. Based on the starting point and ending point set by the user, divide the route passing through the starting point and ending point into multiple segments, obtain the user's physiological data information, and obtain the route slope and route length of each segment. S200 uses the route gradient and the user-set riding intensity to calculate the initial power required for each route segment through a mapping model; S300: Calculate the riding speed of the corresponding route based on the initial power of each segment, and calculate the riding time of the corresponding route based on the riding speed of each segment and the route length of each segment. S400 calculates the deviation value using a loss function based on cycling intensity, user physiological data, cycling time for each route, and initial power for each route. S500: When the deviation value does not exceed the deviation threshold, the initial power of this operation will be used as the final power for output. When the deviation value exceeds the deviation threshold, change the parameters of the mapping model in S200, repeat steps S200 to S500 until the output conditions are met, and output the initial power as the final power.

[0008] The technical solution incorporates user physiological data as a benchmark and dynamically allocates power based on route characteristics, enabling the guidance plan to be personalized according to individual abilities. This improves the scientific nature and universality of cycling guidance and avoids uneven exercise load or poor training results caused by uniform pace.

[0009] In some embodiments of this application, in step S400, the user physiological information used is functional threshold power and / or lactate threshold power.

[0010] In the technical solution, functional threshold power or lactate threshold power is used as user physiological information. These two indicators can accurately reflect the user's aerobic exercise capacity and endurance level, providing a scientific and individualized benchmark for power allocation. Compared with indicators such as heart rate or subjective feelings, threshold power can more directly reflect the user's actual exercise capacity, enabling power recommendations to accurately match the user's physiological limits and training goals, improving the scientific nature and safety of training, and avoiding excessively high or low exercise loads due to improper benchmark selection.

[0011] In some embodiments of this application, in step S200, the slope of each route segment is first determined, and when the slope of the route is lower than the slope threshold, the initial power value of this route segment is set to 0. When the gradient of the route is not lower than the gradient threshold, the initial power of this route is calculated using a mapping model.

[0012] The technical solution leverages the physical characteristic of downhill sections where gravitational potential energy can be converted into kinetic energy, avoiding unreasonable power allocation in areas where active power output is unnecessary. By identifying and addressing negative or gentle slopes, power distribution is made more aligned with the energy conversion patterns in actual cycling, reducing unnecessary power output suggestions, improving the rationality and energy efficiency of the guidance plan, and preventing users from being misguided and wasting energy on coasting sections.

[0013] In some embodiments of this application, step S300 further includes: after calculating the cycling speed, when the calculated cycling speed of a certain segment of the route exceeds the speed threshold, updating the parameters of the mapping model in step S200, and repeating step S200 to calculate the initial power of each segment of the route through the mapping model.

[0014] In the technical solution, when the speed exceeds the reasonable range, the mapping model parameters are updated and recalculated. This can effectively prevent speed prediction anomalies caused by unreasonable model parameters. By verifying the reasonableness of the speed and adjusting the model parameters when anomalies occur, it ensures that the power allocation result will not deviate from the actual riding ability due to speed estimation deviation, thereby improving the stability of the algorithm and the reliability of the output results, and avoiding power suggestion distortion caused by speed prediction errors.

[0015] In some embodiments of this application, when the calculated cycling speed of a certain route exceeds the speed threshold before step S500 is performed, the parameters of the mapping model are randomly initialized, and step S200 is repeated to calculate the initial power of each route through the mapping model.

[0016] In the technical solution, the mapping model is given the opportunity to re-explore the parameter space, avoiding the calculation from getting stuck in local optima or continuous anomalies due to improper initial parameter settings. By randomly resetting the parameters, the mapping model can be re-optimized and iterated from a new starting point, improving the algorithm's self-correction ability under abnormal conditions, enhancing the system's adaptability to different routes and user conditions, and ensuring that the power calculation can jump out of the wrong path and reconverge to a reasonable result.

[0017] In some embodiments of this application, in step S500, the parameters in the mapping model are changed by adjusting the function.

[0018] The technical solution achieves dynamic optimization and adaptive adjustment of model parameters. The adjustment function can make directional corrections to the parameters based on deviation feedback, so that the mapping model gradually approaches the optimal parameter combination during the iteration process, improving the accuracy and convergence speed of power allocation. Compared with fixed parameters or manual parameter adjustment, this method can automatically adapt to different user and route characteristics, making the power suggestions more in line with actual riding needs, and improving the personalization level and computational efficiency of the guidance scheme.

[0019] In some embodiments of this application, when the cycling speed is calculated again in S300 after step S500 and the cycling speed exceeds the speed threshold, the parameter value of the current mapping model is made equal to the parameter value of the mapping model before the change in S500, the parameter value of the adjustment function is initialized, and the process re-enters step S200 to calculate the initial power of each route segment through the mapping model.

[0020] In the technical solution, when the speed anomaly recurs after parameter adjustment, the system reverts to the parameters before adjustment and reinitializes the adjustment function. This forms a dual protection mechanism to prevent the result from deteriorating due to overcorrection or incorrect direction during parameter adjustment. By reverting and resetting, the algorithm is prevented from continuously iterating in the wrong direction and deviating from the correct solution. This ensures the stability and controllability of the parameter optimization process, improves the system's fault tolerance under complex conditions, and guarantees that the power calculation can recover to a reliable state and be effectively optimized again under abnormal conditions.

[0021] In some embodiments of this application, the output condition in S500 is: the deviation value does not exceed the deviation threshold or the number of times the riding time is calculated by S300 exceeds the number threshold.

[0022] The technical solution provides a clear termination criterion for the algorithm to avoid the waste of computing resources or non-convergence of results caused by infinite iteration. Through dual condition control, it ensures that the results are output in a timely manner when the accuracy requirements are met, and prevents the calculation from stalling due to the inability to converge due to deviation. It can balance the calculation accuracy and efficiency, and ensure that the algorithm can output usable results within a reasonable time, thereby improving the practicality and response speed of the system and meeting the requirements of computational timeliness in practical applications.

[0023] In some embodiments of this application, in step S300, the cycling speed for each segment also needs to be calculated based on the user's weight, the vehicle's weight, gravitational acceleration, rolling resistance coefficient, route gradient, air density, and windward surface area.

[0024] The technical solution comprehensively considers the main physical factors affecting cycling, making speed estimation closer to the actual cycling environment. By taking into account energy losses such as gravity, rolling resistance, and air resistance, the accuracy of speed prediction is improved, thereby enhancing the rationality of power distribution. Compared with simplified models that only consider power and gradient, this method can more realistically reflect cycling performance under different user, vehicle, and environmental conditions, making the guidance solution more practical and reliable.

[0025] Furthermore, this application also proposes a cycling power recommendation device, which calculates the recommended cycling power according to the aforementioned cycling power recommendation calculation method. The cycling power recommendation device includes a display screen, which has a built-in processor. The processor calculates the recommended cycling power according to the aforementioned cycling power recommendation calculation method and displays the final power on the display screen. In this technical solution, complex power calculations can be completed in real time on mobile devices through hardware integration, providing users with instant cycling guidance. The introduction of a display screen allows users to intuitively obtain power suggestions, improving the usability and convenience of the guidance solution. This device transforms algorithms into actual products, which can meet cyclists' needs for personalized guidance in actual exercise, and promote the practicality and popularization of cycling guidance technology.

[0026] As can be seen from the above technical solutions, additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0027] Figure 1 This is a partial flowchart of the cycling power recommendation calculation method according to the embodiments of this application; Figure 2 This is a schematic diagram of the calculation process of the mapping model in step S200 of the cycling power recommendation calculation method according to the embodiments of this application; Figure 3 This is a flowchart of the cycling power recommendation calculation method according to the embodiments of this application. Detailed Implementation

[0028] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc., indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0029] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between components; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0030] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0031] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0032] The present application will now be described in detail through exemplary embodiments. However, it should be understood that, without further description, elements, structures, and features in one embodiment may be advantageously incorporated into other embodiments.

[0033] In the following, embodiments of this application will be described in detail with reference to the accompanying drawings.

[0034] As attached Figure 1 As shown in an illustrative embodiment of the cycling power recommendation calculation method of this application, the steps of the cycling power recommendation calculation method include: S100. Based on the starting point and ending point set by the user, divide the route passing through the starting point and ending point into multiple segments, obtain the user's physiological data information, and obtain the route slope and route length of each segment.

[0035] The S200 uses a mapping model to calculate the initial power required for each segment of the route based on the route gradient and the user-set riding intensity.

[0036] In current technology, cycling instruction typically employs fixed pace recommendations or power estimations based on simple physics formulas. This model assumes a linear and universal relationship between power output and cycling intensity for all cyclists facing the same incline, completely ignoring individual differences. For example, the same 5% incline translates to drastically different physiological loads for professional cyclists and amateur cyclists. This rigid approach either makes the training too easy for users, hindering their achievement, or overloads them, leading to premature fatigue or even injury.

[0037] In step S200, a multi-layer neural network is used as a mapping model, taking the route gradient and the user-set cycling intensity as inputs to calculate the initial power for each segment of the road. During cycling, the relationship between gradient and required power is not a simple linear one and varies from person to person. The mapping model can accurately simulate this complex relationship.

[0038] S300 calculates the riding speed of the corresponding route based on the initial power of each segment, and calculates the riding time of the corresponding route based on the riding speed and the length of each segment.

[0039] In step S300, the user's riding is analyzed, and the riding speed and riding time are calculated based on the initial power allocated for each segment in step S200, providing data support for the calculation of subsequent steps.

[0040] The S400 calculates the deviation value using a loss function, based on cycling intensity, the user's physiological data, the cycling time for each route, and the initial power for each route.

[0041] In existing technologies, traditional cycling instruction does not take into account the user's physiological data and cannot be personalized according to the differences in individual user abilities. In contrast, this solution calculates the deviation value of the initial power by using cycling intensity and the user's physiological data, and adjusts the initial power based on the deviation value. This results in a final power that is close to the user's desired cycling intensity. It can be adjusted according to the user's physical condition, making the method more adaptable and the calculated results more in line with the user's expectations.

[0042] In step S400, by introducing user physiological data as a benchmark and combining it with route characteristics to dynamically allocate power, the guidance plan can be personalized according to individual ability, improving the scientific nature and universality of cycling guidance, and avoiding uneven exercise load or poor training effect caused by uniform pace.

[0043] S500: When the deviation value does not exceed the deviation threshold, the initial power of this operation will be used as the final power for output.

[0044] When the deviation value exceeds the deviation threshold, change the parameters of the mapping model in S200, repeat steps S200 to S500 until the output conditions are met, and output the initial power as the final power.

[0045] The parameters of the mapping model in step S200 are not fixed; their internal weights and bias parameters will be iteratively optimized in subsequent steps using gradient descent. This means the model can automatically adjust its parameters based on the feedback from each calculation's deviation, gradually learning and adapting to the optimal power output mode for different users under different gradients. The initial power calculated in this way aligns with the user's current capabilities and training objectives, laying the foundation for more refined iterative optimization in the future.

[0046] In step S500, the initial power output is judged by the deviation value. Only the initial power that meets the output conditions will be output as the final power. The judgment makes the output result more in line with the user's needs. At the same time, the parameters of the mapping model are adjusted to different degrees according to the magnitude of the deviation value. Then, the adjusted parameters are used to iterate through the mapping model to make the initial power that does not meet the output conditions move closer and closer to the data direction that the user wants to obtain until the output conditions are met.

[0047] Deviation thresholds can be set via user settings, factory settings, or cloud settings.

[0048] Furthermore, in step S400, the loss function is used to calculate the degree of deviation between the initial power and the intensity set by the user, i.e., the deviation value. The larger the deviation value, the greater the difference between the initial power obtained this time and the power that the user wants to obtain, and vice versa.

[0049] The loss function calculates the average power of the entire route using time as a weight, and then takes the difference between the average power and the power the user wants to achieve as the output deviation value. If only the average value of each route segment is used as the average power, it may cause the user to exert too much effort in some segments and too little effort in others, making it impossible for the user to achieve a relatively stable exercise, affecting the exercise effect and user experience. However, this application uses time as a weight, and the calculated result will pay more attention to the time-consuming and laborious segments, making the calculated deviation value more in line with the needs of human exercise, laying the foundation for subsequent adjustment of the initial power based on the deviation value.

[0050] The steps for calculating the loss function are as follows: First, add up all the cycling times to get the total cycling time. Divide the cycling time of each segment by the total cycling time to get the time percentage of each segment. Multiply the initial power of each segment by the corresponding time percentage and add them together to get the weighted power. Then, calculate the target power by multiplying the cycling intensity by the user's physiological data. Take the absolute value of the difference between the weighted power and the target power as the deviation value.

[0051] In this embodiment, the formula for the loss function is as follows:

[0052] Where f_lost represents the loss function, k represents the user-set cycling intensity, LT represents the user's physiological data, N represents the number of road segments, and i and n are count variables for accumulation calculation, with no special meaning. t represents the cycling time, and power_temp(i) represents the initial power of the i-th road segment.

[0053] The cycling intensity set by the user represents a macro-level requirement for the entire route. The formula above ensures that regardless of the route's undulations, the calculated average power output remains strictly within the user's target value. Using cycling time as a weighting factor emphasizes longer stretches of the route. This aligns with the principles of human motion; long-term power output deviations have a greater impact on fatigue than short-term deviations. This makes the formula more consistent with human motion patterns, ensuring the final power output better meets the user's exercise needs.

[0054] Preferably, the cycling intensity set by the user is a percentage value, representing the percentage of average power the user wants to achieve during this ride relative to their physiological data. Different percentage ranges of physiological data correspond to different physiological stimuli and training effects. By setting a specific percentage, the user is essentially selecting a precise training goal for this ride. This allows the method to plan the power distribution throughout the ride around that goal, ensuring the scientific nature and effectiveness of the training.

[0055] In one embodiment of this application, preferably, in step S400, the user's physiological information used is functional threshold power. Functional threshold power refers to the highest average power that a user can stably maintain within 1 hour. The product of functional threshold power and cycling intensity is used as the user's desired target power, thereby calculating the deviation value. Using functional threshold power can better reflect the user's exercise needs, giving the user a clear reference standard, while avoiding physical injury caused by over-exercising.

[0056] In another embodiment of this application, in step S400, the user's physiological information used is the lactate threshold power, which is the power output value corresponding to the sudden and sharp rise in blood lactate concentration (i.e., the appearance of an inflection point). The product of the lactate threshold power and the cycling intensity is used as the user's desired target power, thereby calculating the deviation value. Since the human body produces lactate after exercise, excessive exercise will cause muscle soreness. The lactate threshold power can provide the user with a clear reference, allowing the user to cycle according to their own situation.

[0057] In another embodiment of this application, in step S400, the user's physiological information used is lactate threshold power and functional threshold power. First, the average value of lactate threshold power and functional threshold power is calculated. The product of the average value and the cycling intensity is used as the user's desired target power, thereby calculating the deviation value.

[0058] Using functional threshold power or lactate threshold power as user physiological information, these two indicators can accurately reflect the user's aerobic exercise capacity and endurance level, providing a scientific and individualized benchmark for power allocation. Compared with indicators such as heart rate or subjective feelings, threshold power can more directly reflect the user's actual exercise capacity, enabling power recommendations to accurately match the user's physiological limits and training goals, improving the scientific nature and safety of training, and avoiding excessively high or low exercise loads due to improper benchmark selection.

[0059] In some embodiments, during the initial execution of step S200, the parameters of the mapping model are randomly initialized, and the obtained parameters are then input into the mapping model to calculate the initial power. If the parameters of the mapping model are set to fixed values, these fixed values ​​may introduce a bias. If this bias is undesirable, it may lead the algorithm into a suboptimal solution region. Random initialization can avoid this predetermined bias.

[0060] In some embodiments, in step S200, the slope of each route is first determined. When the slope of the route is lower than the slope threshold, the initial power of this route is set to 0. Setting the initial power to 0 indicates that the user does not need to do any work when riding downhill on this route. Under the current slope, the user can slide by the weight of themselves and the vehicle.

[0061] When the gradient of the route is not lower than the gradient threshold, the initial power of this route is calculated through the mapping model. The initial power is an intermediate quantity in the calculation of this application. By continuously correcting the initial power, it is continuously moved closer to the power direction required by the user, and finally the final power is obtained to provide the user with cycling guidance.

[0062] By employing the methods described above, we can leverage the physical characteristic that gravitational potential energy can be converted into kinetic energy on downhill sections, avoiding the unreasonable allocation of power in areas where active power output is unnecessary. By identifying and addressing negative or gentle slopes, power distribution becomes more aligned with the energy conversion patterns observed in actual cycling, reducing unnecessary power output suggestions, improving the rationality and energy efficiency of guidance schemes, and preventing users from being misguided and wasting energy on coasting sections.

[0063] Understandably, this application uses positive numbers to represent uphill slopes and negative numbers to represent downhill slopes. The slope threshold is usually set to a negative number. The slope threshold represents the maximum allowable downhill slope. If the slope of a certain section of road is lower than the slope threshold, it means that the downhill slope of that section of road is steeper than the slope threshold is set.

[0064] Furthermore, the slope threshold can be set through user settings, factory settings, or cloud settings.

[0065] In one embodiment of this application, in step S100, the slope of the route is used as a reference to divide the route into multiple segments, so that routes with similar slopes are grouped into segments. This ensures that the slope variation within each segment is small. This results in less error when using an average slope value to represent the slope characteristics of the entire route in subsequent steps.

[0066] In another embodiment of this application, the route is divided into multiple segments by its length, so that each segment is of the same length. Dividing the route into segments of equal length provides a unified and regular computing unit for the algorithm, simplifies data processing and weighted averaging operations in subsequent iterative calculations, and makes the entire power allocation and optimization logic clearer, more stable and more efficient.

[0067] It is understood that the route can be divided into multiple segments in other ways in step S100, which will not be listed in this application.

[0068] In some embodiments, given a user-defined cycling intensity, additional power is required to overcome the increase in gravitational potential energy when cycling uphill; conversely, when cycling downhill, gravitational potential energy is converted into kinetic energy, reducing power output accordingly, and even eliminating the need for power output when the route has a steep gradient. Therefore, the mapping relationship between route gradient and power exhibits non-linear characteristics, and the model parameters vary from person to person. Thus, to make this model applicable to a wider range of users, this application uses a mapping model to fit the aforementioned non-linear model.

[0069] The mapping model is a computational model that takes route gradient and cycling intensity as input and initial power as output. In the method, the mapping model is mainly used to calculate the initial power, and the parameter values ​​of the mapping function are changed by subsequent methods to continuously iterate the initial power so that the initial power continuously approaches the final power.

[0070] The mapping model uses a neural network function to perform multi-layered calculations on the input route gradient and cycling intensity. By adjusting the cycling intensity, weight vector, and bias term, the route gradient value is continuously changed, moving it closer to the initial power level. Finally, the initial power is calculated using the route gradient and cycling intensity. This establishes a model relationship between route gradient, cycling intensity, and initial power, allowing this application to obtain initial power by inputting route gradient and cycling intensity into the mapping model, providing data support for subsequent calculations.

[0071] In this embodiment, the calculation process of the mapping model is as follows: First, the route slope is judged. If the route slope is lower than the slope threshold, the initial power of the output calculation is 0. If the route slope is not lower than the slope threshold, the route slope and cycling intensity are input into the neural network function of the mapping model. The neural network function consists of multiple layers of neurons. Data is passed layer by layer between neurons in the neural network function. Each layer of neurons receives the output from all neurons in the previous layer. The neuron that performs the calculation for the first time performs nonlinear activation by multiplying the route slope by the weight vector and adding a bias term. The activation value is used as the output result. Subsequent neurons multiply the previous output result by the weight vector and add a bias term as the output result. After all neurons have completed the calculation, the final result is processed by the activation function, and the processed result is used as the initial power for output.

[0072] In this embodiment, the activation function used is the ReLU function (Rectified Linear Activation Function). The ReLU function is a widely used activation function in artificial neural networks. Its main operation is to set negative input values ​​to 0, while keeping positive values ​​unchanged. The ReLU function is highly efficient, requiring only one comparison operation and one multiplication operation. This simple calculation method gives the ReLU function a significant advantage when processing large-scale data. Therefore, this embodiment uses this calculation method. It is understood that other activation functions can also be used for calculation; this application only uses the ReLU function as an example.

[0073] The calculation process for the above mapping model is shown in the appendix. Figure 2 As shown, circles represent neurons in the neural network function. The connections between neurons are just an example; in reality, each neuron is connected to neurons in the previous layer. The expression for the mapping function is as follows:

[0074] Where slope(i) represents the slope of the i-th road segment, slop_thresholds represents the slope threshold, f(k,slope(i)) is the neural network function, a and b represent the weight vector and bias term of the neurons in the network, respectively, and their subscripts correspond to the network layer number. output represents the output of the corresponding layer of the network, and its subscript also refers to the layer number; σ(x) is the activation function, which is actually defined as taking the larger value between x and 0 (here x is just an example of function parameters and has no special meaning). Changing the parameters of the mapping model in step S500 means changing the values ​​of a and b in the above formula.

[0075] Because users differ in weight, vehicle type, cycling skills, and physical condition, the same gradient can present different cycling challenges for different individuals. This application introduces a multi-layer neural network to give the mapping model powerful non-linear fitting capabilities. The mapping model can iteratively learn and continuously adjust its internal parameters to calculate scientific and personalized initial power recommendations for different users on different gradient sections, making the guidance more realistic.

[0076] In some embodiments, step S300 further includes: after calculating the cycling speed, when the calculated cycling speed of a certain route exceeds the speed threshold, updating the parameters of the mapping model in step S200, and repeating step S200 to calculate the initial power of each route through the mapping model.

[0077] When the speed exceeds a reasonable range, the mapping model parameters are updated and recalculated. This effectively prevents speed prediction anomalies caused by unreasonable model parameters. By verifying the reasonableness of the speed and adjusting the model parameters when anomalies occur, it ensures that the power allocation result will not deviate from the actual riding ability due to speed estimation deviation. This improves the stability of the algorithm and the reliability of the output results, avoids power suggestion distortion caused by speed prediction errors, and prevents users from riding too fast due to excessively high suggested power, which could lead to danger.

[0078] In some embodiments, when step S500 is not performed, if the calculated cycling speed of a certain route exceeds the speed threshold, the parameters of the mapping model are randomly initialized, and step S200 is repeated to calculate the initial power of each route through the mapping model.

[0079] It is understood that the cycling power calculation method in this application formats or clears existing data each time it starts or ends. Therefore, step S500 from the previous run will not be recorded to avoid misjudgment during the current run.

[0080] Randomly initializing the parameters of the mapping model can provide the model with an opportunity to re-explore the parameter space, avoiding the calculation from getting stuck in local optima or continuous anomalies due to improper initial parameter settings. By randomly resetting the parameters, the mapping model can be re-optimized and iterated from a new starting point, improving the algorithm's self-correction ability under abnormal conditions, enhancing the system's adaptability to different routes and user conditions, and ensuring that power calculation can escape the wrong path and reconverge to a reasonable result.

[0081] If the calculated cycling speed exceeds the speed threshold before step S500, it means that the parameters of the current mapping model are not suitable. Continuing to perform subsequent iterative optimization may not be able to obtain the required data. Directly initializing the parameters of the mapping model randomly can allow the method to break out of the limitations of the current parameters, find more suitable parameters for calculation, and increase the efficiency of calculation.

[0082] In some embodiments, in step S500, the parameters in the mapping model are changed by an adjustment function. The adjustment function enables dynamic optimization and adaptive adjustment of the model parameters. It can adjust the parameters to different degrees based on the magnitude of the deviation, allowing the mapping model to gradually approach the optimal parameter combination during iteration. This improves the accuracy and convergence speed of power allocation. Compared to fixed parameters or manual parameter tuning, this method can automatically adapt to different user and route characteristics, making power recommendations more aligned with actual riding needs and improving the personalization and computational efficiency of the guidance scheme.

[0083] The adjustment function is mainly used to adjust the weight vector and bias term in the mapping model. The degree of adjustment is controlled according to the magnitude of the deviation, thereby reducing the deviation of the initial power calculated by the mapping model, bringing the initial power closer to the desired power. Furthermore, the larger the deviation, the greater the adjustment to the weight vector and bias term, and vice versa. This allows the initial power to quickly transform into the final power, reducing the number of adjustments and improving calculation speed.

[0084] In this embodiment, the calculation steps of the adjustment function are mainly as follows: the current learning rate is equal to 0.99 raised to the power of x multiplied by the previous learning rate, where x is the floor value of the ratio of the number of iterations to 50. The adjustment momentum of the current weight vector is the current learning rate multiplied by the partial derivative of the loss function with respect to the weight vector, plus the momentum decay rate multiplied by the previous weight vector adjustment momentum. The adjustment momentum of the current bias term is the current learning rate multiplied by the partial derivative of the loss function with respect to the bias term, plus the momentum decay rate multiplied by the previous bias term adjustment momentum. The current weight vector is the previous weight vector minus the current weight vector adjustment momentum. The current bias term is the previous bias term minus the current bias term adjustment momentum. Finally, the current weight vector and the current bias term are output as the output results.

[0085] In this embodiment, the initial value of the learning rate is 0.02, and the momentum decay rate is set to a decimal between 0 and 0.5. It can be understood that the values ​​of the learning rate and momentum decay rate can be set according to the actual situation. This embodiment only uses the above values ​​as an example.

[0086] The formula for the above adjustment function is as follows:

[0087] In this equation, the first and second expressions represent the partial derivatives of the loss function with respect to a and b, respectively; learningRate(epoch) represents the learning rate in the epoch-th iteration; floor() function represents the floor operation; momentum_a and momentum_b represent the adjustment momentum of a and b, respectively, used to adaptively adjust the tuning speed of a and b; β represents the momentum decay rate, which is usually set to a decimal between 0 and 0.5.

[0088] In the early stages of iteration, using a large learning rate allows the parameters to explore the solution space with large steps and quickly approach the optimal solution region. As the number of iterations increases, gradually decreasing the learning rate through methods such as rounding down allows the algorithm to make more precise adjustments when approaching the optimal solution. This avoids the initial power value from oscillating around the optimal solution due to excessive adjustments, thereby improving the accuracy of the final solution.

[0089] It is understandable that the epoch-th iteration refers to the calculation of the riding time after epoch steps S300. That is, each time the riding time is calculated after step S300 is counted as one iteration.

[0090] As attached Figure 3 As shown, in some embodiments, when the cycling speed is calculated again in S300 after step S500 and the cycling speed exceeds the speed threshold, the parameter value of the current mapping model is made equal to the parameter value of the mapping model before the change in S500, the parameter value of the adjustment function is initialized, and the process re-enters step S200 to calculate the initial power of each route segment through the mapping model.

[0091] If the calculated cycling speed exceeds the speed threshold after adjusting the mapping function in step S500, it means that the adjustment in step S500 was inappropriate. The parameter value of the mapping function is then returned to its previous value. The parameters of the adjustment function are then changed again, and the parameters of the mapping function are readjusted. This backtracking method can prevent the result from deteriorating due to overcorrection or incorrect direction in the parameter adjustment process. By backtracking and resetting, the algorithm is prevented from continuously iterating in the wrong direction and deviating from the correct solution. This ensures the stability and controllability of the parameter optimization process, improves the fault tolerance of the system under complex conditions, and ensures that the power calculation can be restored to a reliable state and effectively optimized again under abnormal conditions.

[0092] In this embodiment, the parameter values ​​of the initialization function are set to 0 for the adjustment momentum of a and b, and 0.002 for the learning rate. It is understood that the parameter values ​​of the initialization function can be other values, or other parameter values ​​of the adjustment function can be changed. This embodiment only demonstrates the adjustment of the values ​​of a, b, and the learning rate.

[0093] In this embodiment, the formula for assigning the above parameters is as follows:

[0094] Here, v_threshold represents the speed threshold, and v represents the riding speed. The speed threshold can be set by the user, by factory settings, or by cloud settings.

[0095] The above formula improves the stability of the algorithm. When the model predicts speed loss, the algorithm will not blindly stick to the current optimized path, but will decisively "roll back the state, clear inertia, and reduce the step size." This ensures that when facing complex and ever-changing riding environments, the algorithm can quickly break free from erroneous calculation paths and find a reasonable power distribution scheme, thereby ensuring that users always receive safe and scientific riding guidance.

[0096] In some embodiments, the output condition in S500 is: the deviation value does not exceed the deviation threshold or the number of times the riding time is calculated by S300 exceeds the number threshold.

[0097] Deviation thresholds and frequency thresholds can be set by user settings, factory settings, or cloud settings.

[0098] By setting output conditions to provide a clear termination criterion for the algorithm, the waste of computing resources or non-convergence of results caused by infinite iteration is avoided. Through dual condition control, the results are output in a timely manner when the accuracy requirements are met, while preventing the calculation from stalling due to the inability to converge due to deviation. This balances the calculation accuracy and efficiency, and ensures that the algorithm can output usable results within a reasonable time, thereby improving the practicality and response speed of the system and meeting the requirements of computational timeliness in practical applications.

[0099] In some embodiments, in step S300, the cycling speed for each segment also needs to be calculated based on the user's weight, the vehicle's weight, gravitational acceleration, rolling resistance coefficient, route gradient, air density, and windward surface area.

[0100] This application comprehensively considers the main physical factors affecting cycling, making speed estimation closer to the actual cycling environment. By comprehensively considering energy losses such as gravity, rolling resistance, and air resistance, it improves the accuracy of speed prediction and thus enhances the rationality of power distribution. Compared with simplified models that only consider power and gradient, this method can more realistically reflect the cycling performance of different users, vehicles, and environmental conditions, making the guidance scheme more practical and reliable.

[0101] Furthermore, based on the principle of physics that power equals the product of force and velocity, when a user is riding, the power output by the user is mainly used to overcome the resistance applied to the bicycle by the outside world. Therefore, the total power is equal to the sum of the power generated by all resistances, that is, the sum of the power done to overcome gravity, the power done to overcome rolling resistance, and the power done to overcome air resistance is equal to the initial power. Through the above equation, the equation between power and riding speed can be written, and the value of riding speed can be solved, providing data support for subsequent steps.

[0102] Specifically, the above equations can be expressed as follows: the power exerted against gravity equals the total weight of the user and vehicle multiplied by the gravitational acceleration multiplied by the road gradient multiplied by the riding speed; the power exerted against rolling resistance equals the total weight of the user and vehicle multiplied by the rolling resistance coefficient multiplied by the riding speed; and the power exerted against air resistance equals half the product of the frontal surface area multiplied by the air density multiplied by the cube of the riding speed. The equations are as follows:

[0103] Where M represents the total weight of the user and vehicle, g is the acceleration due to gravity, Crr is the rolling resistance coefficient, ρ is the air density, S is the windward surface area, v(i) represents the cycling speed of the i-th segment, and slope(i) represents the gradient of the i-th segment. Except for v(i), all other parameters are known. Therefore, v(i) can be solved by solving a cubic equation or using the gradient descent method. This yields the cycling speed for each segment of the route.

[0104] When cycling, power is primarily used to overcome three types of resistance: gravity, rolling resistance, and air resistance. The formula above precisely quantifies these three factors. The formula fully considers individual differences. For example, a lighter user and a heavier user will inevitably have different speeds climbing the same hill, even if they output the same power. By more accurately predicting speed, the algorithm can more precisely calculate the cycling time for each segment of the route, and then use time as a weight to assess whether the average power of the entire route meets the user's set intensity target. This makes the iterative optimization process of the entire power distribution model more solid, and the final power guidance scheme is more scientific and more closely matches the actual cycling experience.

[0105] Understandably, "vehicles" refers to bicycles, electric bicycles, and other vehicles that require the user as a power source.

[0106] Furthermore, after calculating the cycling speed, the cycling time can be obtained by dividing the length of each route segment by the cycling speed. The formula for calculating cycling time is:

[0107] Where t(i) represents the cycling time of the i-th segment, and distance(i) represents the route length of the i-th segment.

[0108] The above formula can be used to calculate the riding time for each segment of the road, providing a weighting basis for subsequent weighted average power calculations, and ensuring that the cumulative effect of the power guidance scheme in the time dimension is consistent with the user's preset intensity target.

[0109] In some embodiments, step S300 also obtains the wind speed and wind direction during use, calculates air resistance using the wind speed and wind direction, and calculates the riding speed for each segment of the road based on the wind resistance.

[0110] Cycling speed is not solely determined by the rider's power and gradient; air resistance is also a major source of energy loss during high-speed cycling. Relative wind speed is a vector composite of the rider's speed and the actual wind speed and direction. Introducing wind speed and direction data allows for the quantification of this crucial environmental variable, which can then be incorporated into the speed calculation model. Cycling speed calculated using a more comprehensive physical model more accurately reflects the user's performance in specific environments. The initial power derived from this cycling speed is also more realistic, preventing situations where insufficient initial power is allocated in headwinds, resulting in speeds far below expectations, or excessive initial power is allocated in tailwinds, leading to wasted energy.

[0111] Furthermore, this application also proposes a cycling power recommendation device, which calculates the recommended cycling power according to the aforementioned cycling power recommendation calculation method. The cycling power recommendation device includes a display screen, which has a built-in processor. The processor calculates the recommended cycling power according to the aforementioned cycling power recommendation calculation method and displays the final power on the display screen. By integrating computational methods with hardware, complex power calculations can be completed in real time on mobile devices, providing users with instant cycling guidance. The introduction of a display screen allows users to intuitively obtain power suggestions, improving the usability and convenience of the guidance program. This device transforms algorithms into practical products, meeting cyclists' needs for personalized guidance in actual exercise and promoting the practicality and popularization of cycling guidance technology.

[0112] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for calculating recommended cycling power, characterized in that, It includes the following steps: S100. Based on the starting point and ending point set by the user, divide the route passing through the starting point and ending point into multiple segments, obtain the user's physiological data information, and obtain the route slope and route length of each segment. S200 uses the route gradient and the user-set riding intensity to calculate the initial power required for each route segment through a mapping model; S300: Calculate the riding speed of the corresponding route based on the initial power of each segment, and calculate the riding time of the corresponding route based on the riding speed of each segment and the route length of each segment. S400 calculates the deviation value using a loss function based on cycling intensity, user physiological data, cycling time for each route, and initial power for each route. S500: When the deviation value does not exceed the deviation threshold, the initial power of this operation will be used as the final power for output. When the deviation value exceeds the deviation threshold, change the parameters of the mapping model in S200, repeat steps S200 to S500 until the output conditions are met, and output the initial power as the final power.

2. The method for calculating recommended cycling power according to claim 1, characterized in that, In step S400, the user physiological information used is functional threshold power and / or lactate threshold power.

3. The method for calculating recommended cycling power according to claim 1, characterized in that, In step S200, the slope of each route segment is first determined. When the slope of the route is lower than the slope threshold, the initial power value of this route segment is set to 0. When the gradient of the route is not lower than the gradient threshold, the initial power of this route is calculated using a mapping model.

4. The method for calculating recommended cycling power according to claim 1, characterized in that, Step S300 further includes: after calculating the cycling speed, when the calculated cycling speed of a certain route exceeds the speed threshold, updating the parameters of the mapping model in step S200, and repeating step S200 to calculate the initial power of each route through the mapping model.

5. The method for calculating recommended cycling power according to claim 4, characterized in that, If the calculated cycling speed for a certain route exceeds the speed threshold before step S500 is performed, the parameters of the mapping model are randomly initialized, and step S200 is repeated to calculate the initial power of each route using the mapping model.

6. The method for calculating recommended cycling power according to claim 4, characterized in that, In step S500, the parameters in the mapping model are changed by adjusting the function.

7. The method for calculating recommended cycling power according to claim 6, characterized in that, After step S500, if the cycling speed is calculated again in S300 and the cycling speed exceeds the speed threshold, the parameter values ​​of the current mapping model are made equal to the parameter values ​​of the mapping model before the change in S500. The parameter values ​​of the adjustment function are initialized, and step S200 is re-entered to calculate the initial power of each route segment through the mapping model.

8. The method for calculating recommended cycling power according to any one of claims 1 to 7, characterized in that, The output conditions in S500 are: the deviation value does not exceed the deviation threshold or the number of times the riding time is calculated by S300 exceeds the number threshold.

9. The method for calculating recommended cycling power according to any one of claims 1 to 7, characterized in that, In step S300, the cycling speed for each segment also needs to be calculated based on the user's weight, the vehicle's weight, gravitational acceleration, rolling resistance coefficient, route gradient, air density, and windward surface area.

10. A cycling power recommendation device, characterized in that, The method for calculating the recommended cycling power according to any one of claims 1-9 calculates the recommended cycling power. The recommended cycling power device includes a display screen with a built-in processor. The processor calculates the recommended cycling power according to the method for calculating the recommended cycling power and displays the final power on the display screen.