Multi-scene ebike battery energy optimization allocation control method and electronic equipment

By constructing a three-dimensional feature matrix and a fuzzy control closed-loop feedback module, the energy distribution of the Ebike battery is dynamically adjusted, solving the problem of poor scenario adaptability in existing technologies, realizing optimized energy distribution in multiple scenarios, and improving range and battery life.

CN121697502BActive Publication Date: 2026-05-29SHENZHEN WEILE HI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN WEILE HI TECH CO LTD
Filing Date
2026-02-13
Publication Date
2026-05-29

Smart Images

  • Figure CN121697502B_ABST
    Figure CN121697502B_ABST
Patent Text Reader

Abstract

The application provides a multi-scene Ebike battery energy optimization distribution control method and an electronic device. The method comprises the following steps: acquiring battery state parameters, power load parameters and environmental road condition parameters of an Ebike, and constructing a "road condition-load-battery" three-dimensional feature matrix; calculating an energy consumption prediction value of a future preset time period based on the "road condition-load-battery" three-dimensional feature matrix; determining a current scene type through multi-dimensional threshold value according to real-time working condition parameters in the "road condition-load-battery" three-dimensional feature matrix and the energy consumption prediction value, calling a layered energy distribution strategy of a corresponding scene, and generating a matched initial energy distribution scheme; starting a fuzzy control closed-loop feedback sub-module based on the initial energy distribution scheme, dynamically adjusting a charging and discharging threshold value and an equalization energy supplement current through input variable fuzzification, rule reasoning and de-fuzzing operation, and generating an energy distribution control instruction to perform dynamic optimization distribution of battery energy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy control technology for electric-assisted bicycles, and more specifically, to a multi-scenario Ebike battery energy optimization distribution control method, as well as a computer-readable storage medium and electronic device. Background Technology

[0002] With the popularization of the concept of green travel, Ebikes, with their advantages of convenience and environmental friendliness, are widely used in various scenarios such as urban commuting, mountain biking, and long-distance travel. The road conditions and load requirements in different scenarios vary significantly, which places higher demands on the adaptability of battery energy distribution, requiring a balance between range, power output, and battery life.

[0003] In existing technologies, a typical Ebike battery energy distribution scheme collects battery SOC parameters and uses fixed power distribution logic to achieve energy output. This scheme first collects the battery's state of charge through the BMS, then controls the motor output according to a preset power threshold, and activates a fixed-intensity energy recovery mode when going downhill to recharge the battery pack.

[0004] However, this approach has significant technical flaws: it relies solely on a single battery parameter for energy distribution, failing to consider multi-dimensional operating conditions such as road conditions and load, resulting in poor scenario adaptability. For example, it may lead to excess energy waste on flat roads, insufficient power output when climbing hills, and low energy recovery efficiency when going downhill, failing to meet the differentiated needs of various scenarios. This is the core problem that existing solutions urgently need to address. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides a multi-scenario Ebike battery energy optimization distribution control method and electronic device, which can at least alleviate the aforementioned technical problems.

[0006] The technical solutions provided in this application are as follows:

[0007] A multi-scenario Ebike battery energy optimization and distribution control method includes:

[0008] Step 1: Obtain the battery status parameters, power load parameters, and environmental road condition parameters of Ebike, and construct a three-dimensional feature matrix of "road condition-load-battery";

[0009] Step 2: Based on the three-dimensional feature matrix of "road condition-load-battery", call the energy consumption prediction model to calculate the predicted energy consumption value for the future preset period.

[0010] Step 3: Based on the real-time operating parameters and energy consumption prediction values ​​in the three-dimensional feature matrix of "road condition-load-battery", the current scene type is determined by the multi-dimensional threshold of the dynamic scene recognition module, and the corresponding scene's hierarchical energy allocation strategy is called to generate an initial energy allocation scheme that matches the current scene type.

[0011] Step 4: Based on the initial energy allocation scheme, start the fuzzy control closed-loop feedback submodule. Through input variable fuzzification, rule reasoning and defuzzification calculation, dynamically adjust the charging and discharging threshold and equalization replenishment current, and generate energy allocation control commands to perform dynamic optimization allocation of battery energy.

[0012] A computer-readable storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the multi-scenario Ebike battery energy optimization distribution control method as described in any of the preceding claims.

[0013] An electronic device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the multi-scenario Ebike battery energy optimization distribution control method as described above.

[0014] A computer program product comprising computer instructions that, when executed by a processor, implement the multi-scenario Ebike battery energy optimization distribution control method as described above.

[0015] The multi-scenario Ebike battery energy optimization and distribution control method provided in this application has the following specific technical advantages:

[0016] In terms of data acquisition and feature construction, existing technologies only collect the single parameter of battery SOC, which cannot reflect the energy consumption correlation factors under actual operating conditions. This solution acquires three types of parameters—battery state, power load, and environmental road conditions—to construct a three-dimensional feature matrix of "road conditions-load-battery," achieving the integration and correlation of multi-source heterogeneous data. This multi-dimensional feature modeling approach can comprehensively capture the energy consumption influencing factors under different scenarios, providing more comprehensive data support for subsequent scenario identification and energy allocation, and solving the problem of insufficient scenario adaptability caused by the single data dimension of traditional solutions.

[0017] In the energy consumption prediction stage, existing technologies do not consider the impact of battery degradation on energy consumption, resulting in low accuracy in predicting energy consumption at different usage stages. This solution uses a three-dimensional feature matrix to call an energy consumption prediction model, and through feature encoding, scene-adaptive weighting, and time-series fusion, outputs predicted energy consumption values ​​in conjunction with the battery degradation coefficient. This prediction method fully integrates scene characteristics and battery status, making energy consumption predictions more closely aligned with actual usage conditions. This provides a reliable basis for formulating scene-based energy allocation strategies and avoids the blindness of traditional fixed strategies.

[0018] In terms of scene recognition and hierarchical energy allocation, existing technologies employ fixed power allocation logic, which cannot adapt to the differentiated needs of different scenarios. This solution accurately identifies the current scene type through multi-dimensional threshold determination and matching with a scene type library, and then invokes a dedicated hierarchical energy allocation strategy. For example, dynamic power following for flat road scenarios, dual power supply for climbing scenarios, and recycling-balancing coordination for downhill scenarios, etc., achieve deep adaptation of energy allocation to scene characteristics, effectively solving the traditional problems of energy waste on flat roads, insufficient power for climbing, and inefficient recycling on downhill.

[0019] In terms of control optimization, existing technologies lack dynamic adjustment mechanisms, making it difficult to balance range and battery life. This solution uses a fuzzy control closed-loop feedback submodule, taking battery degradation coefficient, cell voltage difference, and energy consumption prediction as inputs, to dynamically adjust the charging and discharging thresholds and equalization charging current. This control method can optimize energy distribution in real time according to changes in battery state and operating conditions, ensuring power output and range under different scenarios while reducing battery degradation, improving cell consistency, and achieving a dynamic balance between range and lifespan. Attached Figure Description

[0020] Figure 1 This application provides a method for optimizing and controlling the battery energy distribution of Ebikes in multiple scenarios.

[0021] Figure 2 This is an electronic device according to an embodiment of the present application. Detailed Implementation

[0022] like Figure 1 As shown in the figure, this application provides a multi-scenario Ebike battery energy optimization and distribution control method, including:

[0023] Step 1: Obtain the battery status parameters, power load parameters, and environmental road condition parameters of the Ebike to construct a three-dimensional feature matrix of "road condition-load-battery"; Step 2: Based on the three-dimensional feature matrix of "road condition-load-battery", call the energy consumption prediction model to calculate the predicted energy consumption value for the future preset period; Step 3: According to the real-time operating condition parameters and energy consumption prediction value in the three-dimensional feature matrix of "road condition-load-battery", determine the current scene type through the multi-dimensional threshold of the dynamic scene recognition module, and call the corresponding scene's hierarchical energy allocation strategy to generate an initial energy allocation scheme matching the current scene type; Step 4: Based on the initial energy allocation scheme, start the fuzzy control closed-loop feedback submodule, dynamically adjust the charging and discharging thresholds and equalization replenishment current through input variable fuzzification, rule reasoning, and defuzzification calculation, and generate energy allocation control commands to perform dynamic optimization allocation of battery energy.

[0024] Optionally, step 1 includes: Step 11, collecting battery SOC, battery terminal voltage, and charging / discharging current to form battery state parameters, combining the battery cycle number to fit the capacity decay curve to calculate the battery decay coefficient, and integrating the features to generate a battery state feature profile; Step 12, collecting motor load power, motor speed, and user cadence to form power load parameters, and generating a power load feature profile through load feature correlation calculation; Step 13, collecting road slope and ambient wind speed to form environmental road condition parameters, and generating an environmental road condition feature profile through road condition parameter standardization processing; Step 14, fusing the battery state feature profile, power load feature profile, and environmental road condition feature profile to construct a three-dimensional feature matrix of "road condition-load-battery".

[0025] Preferably, the technical essence of step 12 is to construct a structured feature representation that can accurately reflect the dynamic characteristics of Ebike riding load through the collaborative correlation calculation of multi-source load parameters, which is different from the traditional method of directly using a single parameter. The specific implementation process is as follows. Preferably, in the specific technical implementation of step 12, the Hall sensor built into the motor controller and the pedal frequency sensor integrated into the pedal are deployed first to simultaneously collect two types of core load parameters: The Hall sensor collects the motor speed (physical meaning is the number of revolutions of the motor rotor per minute, denoted as N_m), motor operating voltage (denoted as U_m), and operating current (denoted as I_m) at a set sampling frequency (the general sampling frequency range is 5-20Hz, and 10Hz is used as an example). Based on the motor electrical characteristics, the motor load power (physical meaning is the power consumed by the motor to output power, denoted as P_m, and the calculation logic is the product of the motor operating voltage and operating current) is obtained through power calculation logic; The pedal frequency sensor collects the user's pedal frequency (physical meaning is the number of times the user pedals per minute, denoted as F_p) at the same sampling frequency. During the collection process, the signal noise is corrected through the sensor data calibration mechanism to ensure the accuracy of the parameters.

[0026] Preferably, in one scenario, when step 12 is specifically implemented, the collected motor load power P_m, motor speed N_m, and user cadence F_p are subjected to load parameter standardization processing. The parameters are mapped to a unified interval according to their physical value range (the general interval is [0,1], which is used in this example) to generate standardized motor load power P_m_norm, standardized motor speed N_m_norm, and standardized user cadence F_p_norm, thereby eliminating the influence of differences in the magnitude of different parameters on the correlation calculation. Then, load feature correlation calculation is performed. First, a load parameter correlation matrix is ​​constructed. The rows of the matrix represent different load parameter types (standardized motor load power, standardized motor speed, and standardized user cadence, respectively), and the columns represent continuous sampling times (the general number of sampling times is 5-10, and 8 are used in this example). The elements at the intersection of the matrix are the standardized load parameter values ​​of the corresponding sampling times. Based on this correlation matrix, the dynamic correlation coefficient between different parameters is calculated (the physical meaning is the degree of synchronization between the two parameters as they change over time, and the value range is [-1,1]). For example, the correlation coefficient K1 between motor load power and user cadence, and the correlation coefficient K2 between motor speed and user cadence. The calculation of the correlation coefficient is based on the consistency analysis of the changing trends of the two parameters under continuous sampling times.

[0027] Preferably, in the specific technical implementation of step 12, the load parameter correlation matrix and dynamic correlation coefficients are fused to generate a load feature fusion vector. The elements of this vector include each standardized load parameter and its corresponding correlation coefficient. The vector length is the sum of the number of standardized parameters and the number of correlation coefficients (for example, 3 parameters + 2 correlation coefficients, with a vector length of 5). The load feature fusion vector is then subjected to dimensional restructuring and information enhancement processing, sorted according to the influence weight of Ebike riding load (the general weight sorting logic is motor load power > user cadence > motor speed > correlation coefficient, and this sorting is used in this example). After restructuring, the load change characteristics strongly related to energy consumption are highlighted, ultimately generating a power load feature configuration. This power load feature configuration is a structured set of load information that can comprehensively reflect the dynamic correlation characteristics and change patterns of load parameters under different riding scenarios (such as stable load during flat road cruising and high load during uphill climbing). It provides accurate and comprehensive load dimension support for the subsequent construction of the "road condition-load-battery" three-dimensional feature matrix, ensuring that energy distribution strategies can accurately adapt to load requirements in multiple scenarios.

[0028] The technical essence of step 13 is to construct a structured feature representation that reflects the dynamic changes of the Ebike riding environment by accurately collecting and multi-dimensionally correlated road condition parameters in a scenario-based manner. This differs from the traditional method of simply collecting slope or wind speed, and enables in-depth mining of the correlation between environmental factors and energy consumption. Preferably, the specific implementation process of step 13 is as follows: First, deploy the collection equipment adapted to the Ebike riding scenario. The GPS positioning module (supporting altitude data output, with a general sampling interval of 0.5-2s, 1s is used as an example) is installed in an unobstructed position in the middle of the frame to obtain continuous location and altitude information. The handlebar miniature wind speed sensor (with a general accuracy of ±0.1-0.3m / s, ±0.2m / s is used as an example) is installed facing forward to collect ambient wind speed. Both types of devices transmit data synchronously with other collection modules via a CAN bus. The general synchronization frequency is 5-20Hz, 10Hz is used as an example to ensure the time consistency of road condition parameters with battery and load parameters.

[0029] Preferably, in the specific technical implementation of step 13, the GPS positioning module continuously collects location data from two adjacent sampling times. Each location data includes an altitude value (denoted as H, which physically represents the ground height of the sampling point, in meters) and horizontal coordinates (denoted as X and Y, in meters). The altitude difference between the two sampling points (ΔH = altitude value at the later time - altitude value at the previous time) and the horizontal distance (ΔL = straight-line distance calculated based on the horizontal coordinates, the general calculation method being the formula for horizontal distance between two points, for example...) are then calculated. The slope is calculated by converting the elevation difference and the horizontal distance into arctangent values. When ΔH is positive, it indicates an uphill slope; when it is negative, it indicates a downhill slope; and when it is zero, it indicates a flat road. The general slope calculation range is [-15°, 15°]. This range is used in this example.

[0030] Preferably, in one scenario, when step 13 is specifically implemented, the handlebar miniature wind speed sensor collects the ambient wind speed (denoted as W, which physically means the airflow speed encountered during riding, in meters per second), and combines it with the Ebike's riding speed collected by the GPS positioning module (denoted as V, which physically means the Ebike's horizontal movement speed, in meters per second) to calculate the relative wind speed (denoted as W_rel, which physically means the Ebike's actual wind speed relative to the air). When the Ebike is moving forward and the wind direction is the same as the riding direction, the relative wind speed is the difference between the riding speed and the ambient wind speed. When the wind direction is opposite to the riding direction, the relative wind speed is the sum of the riding speed and the ambient wind speed. This corrects the deviation of simply considering the ambient wind speed without taking into account the riding state, making the wind speed parameter more consistent with the actual riding energy consumption.

[0031] Preferably, in the specific technical implementation of step 13, the calculated road condition slope S and relative wind speed W_rel are subjected to road condition parameter standardization processing, and mapped to a general unified interval (for example, [0,1]) according to the physical value range of the two types of parameters. The standardization logic of road condition slope S is to uniformly map the entire range of negative slope (downhill), zero slope (flat road), and positive slope (uphill) to this interval. The standardization logic of relative wind speed W_rel is to scale it proportionally based on its general actual value range (for example, [0,20m / s]) to generate standardized slope S_norm and standardized relative wind speed W_rel_norm. Subsequently, a road condition parameter correlation vector is constructed, whose elements are standardized gradient S_norm and standardized relative wind speed W_rel_norm, with a vector length of 2. Then, by analyzing the dynamic correlation patterns of these two types of parameters (such as the superimposed effect of relative wind speed on energy consumption when going uphill and the offsetting effect of relative wind speed on energy consumption when going downhill), the road condition parameter correlation vector is augmented to highlight road condition characteristics strongly correlated with Ebike energy consumption, ultimately generating an environmental road condition feature construct. This environmental road condition feature construct is a structured set of environmental information that can accurately reflect the dynamic characteristics of road conditions in different cycling scenarios (such as continuous steep slopes in mountain biking, alternating flat roads and gentle slopes in urban commuting, and switching between headwinds and tailwinds in long-distance cycling). It provides precise road condition dimension support for the construction of the "road condition-load-battery" three-dimensional feature matrix, ensuring that energy distribution strategies can adapt to environmental changes in multiple scenarios.

[0032] Optionally, step 11 includes: step 111, collecting battery terminal voltage and charging / discharging current, calculating battery SOC in real time, and forming a basic battery parameter set; step 112, recording the number of battery cycles, fitting the capacity decay curve, calculating the battery decay coefficient, and updating it according to a set period; step 113, mapping the basic battery parameter set and the battery decay coefficient to feature dimensions to generate a battery state feature profile, wherein the parameter dimensions of the battery state feature profile are adapted to the battery dimension of the "road condition-load-battery" three-dimensional feature matrix.

[0033] The essence of step 11 is to construct a feature representation that can truly reflect the current performance and usage status of the battery by accurately collecting the core parameters of the battery, dynamically quantifying the degradation status throughout the entire life cycle, and structurally integrating multi-dimensional parameters. This is different from the traditional method of only collecting basic electrical parameters or statically calculating degradation, and achieves deep adaptation of battery status to energy consumption requirements in multiple scenarios.

[0034] Preferably, the specific implementation process of step 111 is as follows: First, deploy the high-precision voltage sensor and current sensor built into the Battery Management System (BMS). The voltage sensor (general accuracy is ±0.01-0.05V, for example ±0.01V) collects the total terminal voltage of the battery pack (denoted as U_b, which physically means the potential difference between the positive and negative terminals of the battery pack, in volts). The current sensor (general accuracy is ±0.1-0.5A, for example ±0.1A) collects the battery charging and discharging current (denoted as I_b, which physically means the amount of charge flowing per unit time during the charging and discharging process of the battery, in amperes, taking a positive value during discharging and a negative value during charging). The two types of sensors collect data synchronously at a general sampling frequency (5-20Hz, for example 10Hz) to ensure parameter time consistency. Based on the collected battery terminal voltage U_b and charging / discharging current I_b, a designed dynamic battery SOC calculation algorithm is adopted. This algorithm integrates the core logic of the open-circuit voltage method and the ampere-hour integration method. First, the initial SOC value is estimated using the battery terminal voltage U_b. Then, the SOC value is corrected by integrating the charging / discharging current I_b (the integration time is consistent with the sampling period). At the same time, a temperature compensation factor (based on the battery temperature collected by the BMS built-in temperature sensor, denoted as T_b, in degrees Celsius) is introduced to offset the influence of temperature on the relationship between voltage and capacity. The battery SOC (State of Charge, which is the ratio of the current remaining capacity of the battery to the rated capacity, in percentage) is calculated in real time. The battery terminal voltage U_b, charging / discharging current I_b, and SOC value are integrated to form a basic battery parameter set, which can reflect the real-time electrical state of the battery.

[0035] Preferably, in the specific technical implementation of step 112, the BMS automatically records the number of complete charge-discharge cycles of the battery (denoted as N_c, which physically means the number of complete cycles from full charge to cutoff voltage and then back to full charge, in units of cycles). Each time the battery SOC drops from ≥95% to ≤5% and is subsequently charged to ≥95%, it is determined as a complete cycle, and the number of cycles N_c is automatically accumulated. Based on the recorded number of cycles N_c and the actual capacity data under the corresponding cycle (the actual discharge capacity is obtained by integrating the charge-discharge current I_b during each discharge stage, denoted as C_act, in ampere-hours), a battery capacity decay curve is fitted. This curve uses the number of cycles N_c as the abscissa and the actual capacity C_act as the ordinate, and adopts a designed decay curve fitting model. This model considers the nonlinear decay characteristics of the battery under multiple usage scenarios, and establishes the correlation between the number of cycles N_c and the actual capacity C_act through polynomial fitting logic (the general polynomial order is 3-5, and 3rd order is used in this example). The battery degradation coefficient (denoted as K_dec, which is the ratio of the battery's current actual capacity to its initial rated capacity, has no unit, and ranges from 0 to 1) is calculated using this capacity degradation curve. The calculation logic is the ratio of the actual capacity C_act corresponding to the current cycle number to the battery's initial rated capacity C_rated (the rated capacity marked at the battery's factory, in ampere-hours). The battery degradation coefficient K_dec is updated according to a general set cycle (5-20 cycles, 10 cycles for example) to ensure that the degradation coefficient can dynamically reflect the battery's performance changes throughout its entire life cycle.

[0036] Preferably, in a scenario, when step 113 is specifically implemented, the battery SOC value, battery terminal voltage U_b, and charging / discharging current I_b from the basic battery parameter set are extracted and mapped to the latest calculated battery degradation coefficient K_dec using feature dimensions. The mapping process is based on the battery dimension requirements of the "road condition-load-battery" three-dimensional feature matrix. The four types of parameters are converted into feature dimension vectors according to a unified data format. Each element of the vector corresponds to the standardized value of a parameter (the standardization logic is to map each parameter's physical value range to a general interval [0,1], which is used as an example). A battery state feature vector is generated. The length of this vector is 4, and the elements are, in order, the standardized SOC value (SOC_norm), the standardized battery terminal voltage (U_b_norm), the standardized charging / discharging current (I_b_norm), and the standardized battery degradation coefficient (K_dec_norm). Feature enhancement processing is performed on the battery state feature vector. By analyzing the correlation between different parameters (such as the synergistic effect of the battery degradation coefficient K_dec and the SOC value, and the dynamic correlation between the charging and discharging current I_b and the terminal voltage U_b), battery state features strongly correlated with energy consumption in multiple scenarios are highlighted, ultimately generating a battery state feature profile. The parameter dimension of this battery state feature profile is fully adapted to the battery dimension of the "road condition-load-battery" three-dimensional feature matrix, which can accurately reflect the actual performance of the battery in different degradation states and different charging and discharging stages. This provides comprehensive and accurate battery dimension support for the construction of the three-dimensional feature matrix, ensuring that energy allocation strategies in multiple scenarios can fit the actual battery state.

[0037] Optionally, step 14 includes: Step 141, extracting battery SOC, battery terminal voltage, charging / discharging current, and battery degradation coefficient from the battery state feature configuration, motor load power and user cadence from the power load feature configuration, and road condition slope and ambient wind speed from the environmental road condition feature configuration, and determining the dimensional parameters of the "road condition-load-battery" three-dimensional feature matrix, where the road condition dimension includes slope and wind speed, the load dimension includes motor load power and user cadence, and the battery dimension includes SOC, battery terminal voltage, charging / discharging current, and battery degradation coefficient; Step 142, performing normalization processing on each dimensional parameter in the battery state feature configuration, power load feature configuration, and environmental road condition feature configuration, mapping each parameter to a preset unified interval according to its physical value range, and generating corresponding standardized dimensional parameters; Step 143, performing dimensional splicing on the standardized dimensional parameters corresponding to the battery state feature configuration, power load feature configuration, and environmental road condition feature configuration in the order of "road condition-load-battery" to form a "road condition-load-battery" three-dimensional feature matrix.

[0038] Preferably, the specific implementation process of step 141 is as follows: First, four types of core parameters are extracted from the battery state feature configuration: SOC (State of...) Charge (State of Charge, physically meaning the ratio of the battery's current remaining capacity to its rated capacity, denoted as S_c), battery terminal voltage (denoted as U_b, physically meaning the potential difference between the positive and negative terminals of the battery pack), charging and discharging current (denoted as I_b, physically meaning the amount of charge flowing through the battery per unit time during charging and discharging, positive for discharging and negative for charging), and battery degradation coefficient (denoted as K_dec, physically meaning the ratio of the battery's current actual capacity to its initial rated capacity). Two core parameters are extracted from the power load characteristic profile: motor load power (denoted as P_m, physically meaning the power consumed by the motor to output power) and user cadence (denoted as F_p, physically meaning the number of times the user pedals per minute). Two core parameters are extracted from the environmental road condition characteristic profile: road gradient (denoted as S, physically meaning the inclination angle of the cycling path, positive for uphill and negative for downhill) and environmental wind speed (denoted as W, physically meaning the airflow speed in the cycling environment). Based on Ebike's multi-scenario energy distribution needs, the dimensional parameters of the "road condition-load-battery" three-dimensional feature matrix are determined. The road condition dimension includes two parameters: slope S and wind speed W. The load dimension includes two parameters: motor load power P_m and user cadence F_p. The battery dimension includes four parameters: SOCS_c, battery terminal voltage U_b, charging and discharging current I_b, and battery degradation coefficient K_dec. This forms a core matrix structure of "3 dimensions - 8 parameters" to ensure that the matrix can comprehensively cover the key factors affecting energy consumption.

[0039] Preferably, in the specific technical implementation of step 142, the eight dimensional parameters in the battery state feature configuration, power load feature configuration, and environmental road condition feature configuration are respectively subjected to scenario-based normalization processing. The designed normalization algorithm establishes independent mapping rules for the physical characteristics of each parameter and the value range of the actual use scenario of Ebike, so as to avoid the scene feature distortion caused by traditional unified normalization. For the slope S in the road condition dimension, its general practical range is [-15°, 15°] (this range is used in the example). The normalization logic is to uniformly map the entire range of negative slope (downhill), zero slope (flat road), and positive slope (uphill) to a preset unified interval (the general interval is [0,1], this interval is used in the example). The core logic of the mapping formula is (the absolute value of the current slope value + the absolute value of the minimum slope value) / (the maximum slope value - the minimum slope value), ensuring that the characteristic differences of different slope intervals are preserved. For the wind speed W, its general practical range is [0, 20m / s] (this range is used in the example). It is converted to a unified interval according to the linear mapping logic, highlighting the different weights of headwind and tailwind on energy consumption. For the motor load power P_m at the load dimension, the general practical range is [0, 200W] (this range is used in the example), and the user cadence F_p has a general practical range of [30, 120 times / minute] (this range is used in the example). Both are linearly mapped to a unified range while retaining the distinguishability between high load, high cadence and low load, low cadence. For the battery SOCS_c at the battery dimension, the value range is [0%, 100%], directly mapped to a unified range proportionally; the battery terminal voltage U_b has a general practical range of [36V, 48V] (this range is used in the example), the charging and discharging current I_b has a general practical range of [-10A, 10A] (this range is used in the example, negative for charging, positive for discharging), and the battery degradation coefficient K_dec has a value range of [0, 1]. All three are designed with dedicated mapping rules based on their respective physical value ranges to ensure that subtle changes in battery state are reflected in standardized parameters. Through the above scenario-based normalization process, eight standardized dimensional parameters are generated, namely standardized slope S_norm, standardized wind speed W_norm, standardized motor load power P_m_norm, standardized user cadence F_p_norm, standardized SOCS_c_norm, standardized terminal voltage U_b_norm, standardized charging and discharging current I_b_norm, and standardized battery degradation coefficient K_dec_norm.

[0040] Preferably, in one scenario, when implementing step 143, the eight standardized dimensional parameters are structurally concatenated in a preset order of "road condition-load-battery" to construct a three-dimensional feature matrix. The rows of this matrix represent the dimension types (road condition dimension, load dimension, and battery dimension in that order), and the columns represent the standardized parameters for each dimension (road condition dimension: column 1 is S_norm, column 2 is W_norm; load dimension: column 1 is P_m_norm, column 2 is F_p_norm; battery dimension: column 1 is S_c_norm, column 2 is U_b_norm, column 3 is I_b_norm, column 4 is K_dec_norm). The elements at the matrix intersections are the standardized values ​​of the corresponding dimensions and parameters, ultimately forming a 3x8 three-dimensional feature matrix of "road condition-load-battery". During the concatenation process, dimensional alignment ensures the synchronization of parameters in the time dimension. Based on the parameter timestamps transmitted via the CAN bus, standardized parameters at the same sampling time are grouped into the same matrix instance, avoiding distortion of associated information caused by mixing parameters at different times. This three-dimensional feature matrix can structurally present the synergistic relationship between three types of factors: road conditions, load, and battery. For example, in the climbing scenario, it shows the correlation between "increased standardized slope S_norm" and "increased standardized motor load power P_m_norm", and in the descending scenario, it shows the synergistic effect between "decreased standardized slope S_norm" and "standardized wind speed W_norm". This provides high-quality input for the feature extraction of the subsequent energy consumption prediction model and the weight allocation of the attention layer for scenario adaptation, ensuring that the energy allocation strategy for multiple scenarios can be formulated based on comprehensive and accurate correlation features.

[0041] Optionally, the energy consumption prediction model includes a feature encoding layer, a scene adaptation attention layer, a temporal feature fusion layer, and a prediction output layer. Step 2 includes: Step 21, the feature encoding layer performs feature dimension compression and key information extraction on the three-dimensional feature matrix of "road condition-load-battery" based on the energy consumption correlation characteristics of multiple scenarios, and selects the core features that are strongly correlated with the energy consumption of flat road, uphill, and downhill scenarios to generate encoded feature vectors; Step 22, the scene adaptation attention layer combines the dominant energy consumption factors of different scenarios and performs scene adaptation weighted operations on the encoded feature vectors, including strengthening the slope and... The motor load power feature weights are used to strengthen the cadence and SOC feature weights in flat road scenarios and strengthen the wind speed and recycling efficiency feature weights in downhill scenarios to generate a weighted feature vector. Step 23: The time-series feature fusion layer fuses the weighted feature vector with the battery degradation coefficient in a time-series correlation to highlight the energy consumption change pattern of the battery in different scenarios under different degradation states and generate a scenario-degradation fusion feature tensor. Step 24: The prediction output layer performs multi-scenario energy consumption time-series modeling on the scenario-degradation fusion feature tensor, performs time-series prediction calculations, and outputs the predicted energy consumption value for the future preset time period.

[0042] Preferably, the specific implementation process of step 21 is as follows: First, obtain the three-dimensional feature matrix of "road condition-load-battery" constructed in step 14 (denoted as M_3d, which physically means a structured integrated set of multi-dimensional parameters of road condition, load, and battery). This matrix is ​​a structured data of 3 rows and 8 columns. The rows correspond to the road condition dimension, load dimension, and battery dimension, respectively, and the columns correspond to the specific parameters under each dimension (road condition dimension: standardized slope S_norm, standardized wind speed W_norm; load dimension: standardized motor load power P_m_norm, standardized user cadence F_p_norm; battery dimension: standardized SOCS_c_norm, standardized terminal voltage U_b_norm, standardized charging and discharging current I_b_norm, standardized battery attenuation coefficient K_dec_norm). Based on the energy consumption correlation characteristics of Ebike in multiple scenarios, a scenario-feature correlation weight table is constructed. This table pre-determines the correlation weights between each parameter and energy consumption in three core scenarios: flat road, climbing, and downhill (the general weight range is 0-1, for example: user cadence weight 0.9, SOC weight 0.85 in flat road scenario; slope weight 0.92, motor load power weight 0.88 in climbing scenario; wind speed weight 0.86, charging and discharging current weight 0.8 in downhill scenario). The weight values ​​are obtained based on the correlation analysis of historical energy consumption data in multiple scenarios, ensuring that key influencing parameters in core scenarios are given higher weights.

[0043] Preferably, in the specific technical implementation of step 21, feature filtering is performed on the three-dimensional feature matrix M_3d of "road condition-load-battery" based on the scene-feature association weight table. The filtering logic is to retain parameters whose association weights in each scene are higher than a preset threshold (the general threshold is 0.7-0.8, and 0.75 is used as an example) to form a core feature subset of the scene. For flat road scenes, standardized user cadence F_p_norm, standardized SOCS_c_norm, and standardized motor load power P_m_norm are filtered out; for uphill scenes, standardized slope S_norm, standardized motor load power P_m_norm, and standardized battery attenuation coefficient K_dec_norm are filtered out; for downhill scenes, standardized wind speed W_norm, standardized charging and discharging current I_b_norm, and standardized SOCS_c_norm are filtered out. The core feature subsets of the three types of scenes each contain 3-4 key parameters, which avoids feature redundancy and ensures that scene energy consumption association information is not lost. Structured compression processing is performed on the core feature subsets of each scenario. Through feature correlation fusion logic, highly correlated features in the same dimension (such as the standardized terminal voltage U_b_norm and standardized SOCS_c_norm in the battery dimension) are fused to generate fused feature values. The fusion logic is a weighted summation based on correlation weights. Finally, the core feature subsets of each scenario are compressed to a fixed dimension (generally 3-5 dimensions, 3 dimensions are used as an example) to form the core feature vector of the scenario.

[0044] Preferably, in a given scenario, step 21 involves extracting the core feature vector corresponding to the currently predicted scenario type (obtained through preprocessing by the scenario adaptation attention layer). This vector undergoes secondary optimization using feature standardization to ensure that the value range of each element is uniformly [0,1], while highlighting the differentiation of core features. Subsequently, the optimized core feature vector is dimensionally reorganized, and each core feature is concatenated in the dimensional order of "road condition-load-battery" to generate an encoded feature vector (denoted as V_enc, which physically represents the set of scenario-specific core energy consumption features after filtering and compression). The dimension of the encoded feature vector is consistent with the dimension of the compressed core feature subset of the scene (e.g., 3-dimensional). For example, the elements of the encoded feature vector for a flat road scene are the fused "pedal frequency-SOC" feature, motor load power feature, and wind speed auxiliary feature, respectively. The elements of the encoded feature vector for a climbing scene are the slope feature, the fused "motor load power-attenuation coefficient" feature, and SOC auxiliary feature, respectively. This ensures that the encoded feature vector can accurately match the energy consumption dominant factors of the current scene, providing a focused and efficient input basis for the weighted calculation of the attention layer for subsequent scene adaptation, so that energy consumption prediction can better meet the actual needs of different scenarios.

[0045] Preferably, the specific implementation process of step 23 is as follows: First, obtain the weighted feature vector output by the scene adaptation attention layer and the battery attenuation coefficient calculated in step 11. The length of the weighted feature vector (denoted as V_w, which physically means the set of multi-dimensional energy consumption related features after scene adaptation weighting) is consistent with the total number of parameters of the "road condition-load-battery" three-dimensional feature matrix (i.e., 8 dimensions, corresponding to the weighted results of standardized slope, standardized wind speed, standardized motor load power, standardized user cadence, standardized SOC, standardized terminal voltage, standardized charging and discharging current, and standardized battery attenuation coefficient); the battery attenuation coefficient (denoted as K_dec, which physically means the ratio of the current actual capacity of the battery to the initial rated capacity, with a value range of 0-1) is a single-dimensional parameter, which is mapped to the [0,1] interval according to the same standardization rule as the weighted feature vector to generate the standardized battery attenuation coefficient (denoted as K_dec_norm). Based on the temporal characteristics of Ebike energy consumption changes, weighted feature vectors from multiple consecutive sampling times are extracted to form a temporal weighted feature sequence. The temporal length is set according to the time window requirements of energy consumption prediction (the general length is 3-10 sampling times, and 5 sampling times are used as an example). Each sampling time corresponds to an 8-dimensional weighted feature vector, and finally a two-dimensional temporal feature matrix of "temporal length-feature dimension" is formed (a 5×8 matrix is ​​used as an example). The rows of the matrix represent consecutive sampling times, the columns represent the weighted features of each dimension, and the elements at the intersection are the feature values ​​of the corresponding times, ensuring that the temporal change information is completely preserved.

[0046] Preferably, in the specific technical implementation of step 23, the standardized battery degradation coefficient K_dec_norm is subjected to time-series extension processing. Based on the time-series length of the time-series weighted feature sequence, a degradation coefficient time-series vector (denoted as V_dec, which physically represents the battery degradation state at each sampling time) with the same length as the sequence is generated. Each element of the vector is the standardized battery degradation coefficient K_dec_norm at the current time. Since the battery degradation coefficient is updated according to a set period (the general period is 5-20 cycles, and 10 cycles are used for example), the degradation state remains stable within a short time-series window. The extended degradation coefficient time-series vector can reflect the energy consumption correlation effect at each time under the current degradation state. To address the multi-scenario characteristics of Ebike, a triple correlation logic is established between weighted features, time-series information, and attenuation status. First, the difference between the feature vectors of adjacent time steps in the time-series weighted feature matrix is ​​calculated to obtain the time-series change feature vector (denoted as V_t, which physically represents the magnitude and trend of energy consumption correlation features between adjacent time steps). Its length is consistent with the weighted feature vector, and its elements are the difference between the feature values ​​of the next time step and the feature values ​​of the previous time step, highlighting the dynamic change law of energy consumption features. Subsequently, the time-series weighted feature matrix, the time-series change feature vector, and the attenuation coefficient time-series vector are dimensionally fused. The fusion logic is to add an attenuation status dimension to the feature dimension, forming a three-dimensional feature structure of "time-series length - feature dimension - attenuation dimension". The attenuation dimension includes the standardized battery attenuation coefficient K_dec_norm and the attenuation-feature correlation coefficient (denoted as C_kf, which physically represents the correlation strength between the battery attenuation coefficient and each dimension feature, with a value range of 0-1). The correlation coefficient is obtained by analyzing the influence weight of each feature on energy consumption under different attenuation states in historical data. For example, the correlation coefficient between the battery attenuation coefficient and the charge / discharge current feature is higher under high attenuation states.

[0047] Preferably, in a scenario, when step 23 is specifically implemented, feature information enhancement processing is performed on the three-dimensional feature structure. The scene attenuation adaptation logic highlights the energy consumption change pattern of each scenario under different attenuation states. For example, in the climbing scenario, when the attenuation state is low (K_dec_norm≥0.9), the temporal correlation information between the motor load power and the slope feature is enhanced, and when the attenuation state is high (K_dec_norm≤0.7), the correlation information between the battery attenuation coefficient and the charging and discharging current feature is enhanced, so as to ensure that the fused features can accurately reflect the impact of the attenuation state on the scene's energy consumption. The final generated scenario-degradation fusion feature tensor has the dimension of "time series length × feature dimension × degradation dimension" (for example, a tensor of 5×8×2). The time series length corresponds to the continuous sampling time, the feature dimension corresponds to the 8 energy consumption related features, and the degradation dimension corresponds to the battery degradation state and correlation coefficient. Each element in the tensor represents a standardized value at a certain time, for a certain feature, and for a certain degradation related state. This provides a comprehensive, dynamic, and battery-appropriate input basis for the subsequent multi-scenario energy consumption time series modeling of the prediction output layer, ensuring that the energy consumption prediction can adapt to the needs of different scenarios at different degradation stages.

[0048] The technical essence of step 24 is to accurately output the predicted energy consumption value for future periods by fusing scene-attenuation adaptation time-series modeling and multi-scale prediction. This is different from the traditional prediction method that uses a single model or ignores the interaction between scene and attenuation. It achieves accurate prediction of energy consumption for multiple scenarios and the entire battery life cycle, providing reliable data support for subsequent scene identification and energy allocation strategies.

[0049] Preferably, the specific implementation process of step 24 is as follows: First, the scene-attenuation fusion feature tensor (denoted as T_sa, which physically means a three-dimensional data set integrating scene features, time-series changes, and battery attenuation state) output by the time-series feature fusion layer is received. The tensor dimension is "time-series length × feature dimension × attenuation dimension" (general time-series length is 3-10 sampling times, feature dimension is 8 dimensions, attenuation dimension is 2 dimensions, and a 5×8×2 tensor is used as an example). Each element in the tensor represents a standardized value under a specific time, specific feature, and specific attenuation correlation state. A multi-scene time-series modeling network is designed. This network includes a scene adaptation time-series layer, an attenuation correction layer, and a prediction fusion layer. The three-layer structure works together to achieve energy consumption prediction. The scene adaptation time-series layer is designed for the energy consumption time-series patterns of three core scenarios: flat road, climbing slope, and downhill slope. It has built-in differentiated modeling logic. For flat road scenarios, the time-series correlation modeling of cadence and power is strengthened. For climbing slope scenarios, the collaborative modeling of slope, load power, and attenuation coefficient is strengthened. For downhill slope scenarios, the time-series modeling of wind speed and recovery power is strengthened.

[0050] Preferably, in the specific technical implementation of step 24, the scene adaptation temporal layer receives the scene-attenuation fusion feature tensor T_sa. First, based on the predicted current scene type (output by the scene adaptation attention layer), the modeling logic of the corresponding scene is activated. For example, when the current scene is a climbing scene, the slope feature, motor load power feature and attenuation dimension are extracted first. The short-term change trend of energy consumption in the scene is captured by temporal convolution operation, and a scene temporal feature vector (denoted as V_st, the dimension corresponds to the prediction duration, the general prediction duration is 3-10 seconds, the example uses 5 seconds, and the vector length is 5) is generated. The attenuation correction layer corrects the attenuation state of the scene temporal feature vector V_st. Based on the battery attenuation dimension data in the tensor (normalized battery attenuation coefficient K_dec_norm and attenuation-feature correlation coefficient C_kf), an attenuation correction factor (denoted as F_corr, which physically means the correction coefficient of battery attenuation on energy consumption prediction, with a value range of 0.8-1.2) is constructed. The correction logic is that each element of the scene temporal feature vector V_st is multiplied by the attenuation correction factor F_corr at the corresponding time to generate the attenuation-corrected temporal feature vector (denoted as V_stc), ensuring that the prediction result is adapted to the current battery attenuation state and avoiding the prediction bias caused by the traditional model ignoring attenuation.

[0051] Preferably, in one scenario, when step 24 is specifically implemented, the predicted fusion layer receives the attenuation-corrected temporal feature vector V_stc, combines it with historical energy consumption prediction error feedback data (the general feedback period is 10-30 sampling times, and 20 sampling times are used as an example), performs multi-scale fusion operation on the vector elements, and generates the final energy consumption prediction sequence (denoted as P_pred, which physically means the predicted energy consumption value at each time within a preset future period, in watt-hours per kilometer) by weighted fusion of short-term trend (features of the first 2 time moments) and long-term trend (features of all 5 time moments). The length of the energy consumption prediction sequence is consistent with the preset prediction duration (for example, 5 elements, corresponding to the energy consumption prediction value for the next 5 seconds). Finally, through the output normalization inverse operation, the standardized values ​​in the prediction sequence are mapped back to the actual energy consumption value range (the general actual energy consumption range is 10-50Wh / km, and this range is used in the example). The energy consumption prediction value for the preset period in the future is output, which provides the energy consumption correlation basis for the dynamic scene identification in step 3, and at the same time provides accurate data support for the parameter adjustment of the hierarchical energy allocation strategy, ensuring that the energy allocation can adapt to the energy consumption requirements of future operating conditions in advance.

[0052] Optionally, step 22 includes: Step 221, using the scene adaptation attention layer's built-in scene-energy consumption feature weight mapping rules to extract real-time operating parameters including road slope, motor load power, user cadence, battery SOC, and ambient wind speed from the "road condition-load-battery" three-dimensional feature matrix, and predicting the current scene type; Step 222, for the differentiated energy distribution needs of multiple scenes, pre-setting weight priority rules for the core related features of each scene, setting user cadence and SOC features as the core features with the highest weight priority in flat road scenes to enhance the adaptability of the power following strategy; setting slope and motor load power features as the core features with the highest weight priority in climbing scenes to ensure the stability of peak power output; setting wind speed and recovery efficiency related features as the core features with the highest weight priority in downhill scenes to improve the accuracy of energy recovery; Step 223, based on the matching of weight priority rules and the current scene type, performing a dimension-wise weighted operation on the encoded feature vector to generate a weighted feature vector.

[0053] The technical essence of step 221 is to achieve accurate prediction of scene type through dynamic association rules of scene-energy consumption features and multi-parameter collaborative verification. This is different from the traditional identification method of single threshold judgment or ignoring parameter correlation. It ensures that scene recognition is highly consistent with the actual riding conditions of Ebike, and provides an accurate basis for subsequent differentiated weight allocation.

[0054] Preferably, the specific implementation process of step 221 is as follows: the scene-energy consumption feature weight mapping rule built into the scene adaptation attention layer is a set of structured rules constructed based on historical multi-scene energy consumption data and battery degradation characteristics. The set of rules includes the judgment logic for six sub-scenarios: flat road cruising, gentle slope climbing, steep slope climbing, long downhill coasting, short downhill coasting, and start-stop transition. Each scenario corresponds to the associated threshold range and feature weight combination of five parameters: slope, motor load power, user cadence, battery SOC, and ambient wind speed. First, five types of real-time operating parameters are extracted from the three-dimensional feature matrix of "road condition-load-battery". Among them, road condition gradient (denoted as S, which means the inclination angle of the cycling path in degrees) and ambient wind speed (denoted as W, which means the speed of ambient air flow in meters per second) come from the road condition dimension. Motor load power (denoted as P_m, which means the energy consumption power of the motor output power in watts) and user cadence (denoted as F_p, which means the number of times the user pedals per minute in times / minute) come from the load dimension. SOC (denoted as S_c, which means the percentage of remaining battery capacity in percentage) comes from the battery dimension. All five types of parameters are values ​​after standardization in step 14, and the value range is uniformly [0,1].

[0055] Preferably, in the specific technical implementation of step 221, scenario feature association calculations are performed on the extracted five types of real-time operating parameters. The designed association calculation logic establishes collaborative judgment rules between parameters based on the energy consumption dominant factors of each sub-scenario. For example, the association rule for the flat road cruising scenario is "the slope is in the medium to low range (standardized value 0.3-0.4, corresponding to an actual slope of -2° to 3°), the motor load power is in the low range (standardized value 0.1-0.2, corresponding to an actual power of 10-50W), and the user's cadence is in the medium range (standardized value 0.4-0.6, corresponding to an actual cadence of 60-90 times / minute)". All three types of parameters must simultaneously meet the range requirements, and the SOC and wind speed parameters must be in the normal range (standardized value 0.2-0.8). The association rule for the gentle slope climbing scenario is "the slope is in the medium to high range (standardized value 0.4-0.6, corresponding to an actual cadence of 60-90 times / minute)". The standard values ​​are 0.4-0.6, corresponding to an actual slope of 3° to 7°; the motor load power is in the medium range (standardized value 0.2-0.4, corresponding to an actual power of 50-100W); and the user's cadence is in the medium-high range (standardized value 0.5-0.7, corresponding to an actual cadence of 70-100 times / minute), while also meeting the requirement of SOC ≥ 0.3 (standardized value). For steep slope climbing scenarios, the correlation weight between slope and motor load power is strengthened, requiring a standardized slope value ≥ 0.6 (corresponding to an actual slope ≥ 7°) and a standardized motor load power value ≥ 0.4 (corresponding to an actual power ≥ 100W).

[0056] Preferably, in a scenario, when step 221 is specifically implemented, based on the scenario-energy consumption feature weight mapping rule, the matching degree (denoted as M, which physically means the degree of fit between the parameter combination and the scenario features, with a value range of 0-1) between the five types of real-time operating parameters and each sub-scenario is calculated. The matching degree calculation logic is the sum of the product of the weight of each parameter in the corresponding scenario and the parameter value, where the weight is set based on the dominant energy consumption factors of the scenario (e.g., 0.35 for slope weight and 0.3 for motor load power weight in a climbing scenario, and 0.3 for cadence weight and 0.25 for SOC weight in a flat road scenario). The matching degrees of the six sub-scenarios are sorted, and the scenario type with the highest matching degree and exceeding the preset matching threshold (general threshold 0.6-0.7, 0.65 is used in the example) is selected as the candidate scenario. Subsequently, multi-parameter collaborative verification is performed on the candidate scenarios. The verification logic is that the working condition parameters at multiple consecutive sampling times (generally 3-5 times, 5 times are used as an example) all meet the association rules of the candidate scenario, avoiding misjudgment of the scenario due to instantaneous parameter fluctuations. Finally, the current scenario type is locked, providing accurate scenario basis for the weight priority matching in step 222 and the weighted calculation in step 223, ensuring that the output of the scenario adaptation attention layer can match the energy consumption requirements of actual cycling conditions.

[0057] The technical essence of step 222 is to establish a precise correlation between core features and energy allocation strategies through the structured design of scenario-based weight priorities. This is different from the traditional indiscriminate weight allocation or single feature-dominated approach, and it highlights the differences in energy consumption correlation features under different scenarios, providing a clear strategy guide for weighted calculation.

[0058] Preferably, the specific implementation process of step 222 is as follows: In response to the differentiated energy allocation needs of Ebike in multiple scenarios, a scenario-weight priority mapping system is constructed. This system includes a set of weight rules for three core scenarios: flat road cruising, climbing (including gentle slopes and steep slopes), and descending (including long descending slopes and short descending slopes). Each rule clearly defines the priority order and weight ratio range of core features and secondary features to ensure that the weight allocation is highly consistent with the dominant factors of scenario energy consumption. For flat-road cruising scenarios, the core requirements are the compatibility between power output and user cadence, and the efficient utilization of battery energy. Therefore, user cadence (denoted as F_p, physically meaning the number of times the user pedals per minute) and SOC (denoted as S_c, physically meaning the percentage of remaining battery capacity) are set as the core features with the highest weight. The combined weight of these two features is generally 50%-70% (60% in the example), with user cadence having a slightly higher weight than SOC (35% and 25% in the example, respectively). Secondary features include motor load power (denoted as P_m, physically meaning the energy consumption of the motor output power) and wind speed (denoted as W, physically meaning the ambient air flow speed), with a combined weight of 20%-30% (25% in the example). Other features (gradient, charging and discharging current, etc.) are auxiliary features, with a combined weight of 10%-20% (15% in the example). This weighting rule can enhance the adaptability of the power following strategy and avoid energy excess or deficiency in flat-road scenarios.

[0059] Preferably, in the specific technical implementation of step 222, the core requirement for the climbing scenario is to ensure the stability of peak power output while reducing battery degradation. Therefore, the road gradient (denoted as S, which physically means the inclination angle of the cycling path) and the motor load power P_m are set as the core features with the highest weight priority. The combined weight of the two types of features is generally 60%-80% (70% for example), with the motor load power weight being higher than that of the gradient (40% and 30% for example), which is adapted to the characteristic that load power dominates energy consumption when climbing. Secondary features include the battery degradation coefficient (denoted as K_dec, which physically means the ratio of the current actual capacity of the battery to the initial rated capacity) and the user's cadence F_p, with a combined weight of 15%-25% (20% for example). The weight of the battery degradation coefficient (12% for example) is used to adapt to the power output adjustment under different degradation states. The combined weight of auxiliary features (SOC, wind speed, etc.) is 5%-15% (10% for example) to ensure the balance between power output and battery status in the climbing scenario.

[0060] Preferably, in a specific implementation of step 222 in a scenario, the core requirement for downhill scenarios is to improve the accuracy of energy recovery. Therefore, the feature relating environmental wind speed W to recovery efficiency (derived based on charging / discharging current I_b and motor load power P_m, denoted as F_re, which physically represents the correlation between energy recovery efficiency) is set as the core feature with the highest weight priority. The combined weight of the two types of features is generally 55%-75% (65% in an example), with wind speed having a higher weight (35% in an example) than recovery efficiency-related features (30% in an example) because wind speed directly affects downhill gliding speed and recovery power. Secondary features include road slope S and SOCS_c, with a combined weight of 20%-30% (25% in an example). Road slope affects the amount of recovery power, and SOC affects the priority of energy replenishment. Auxiliary features (user cadence, battery degradation coefficient, etc.) have a combined weight of 5%-15% (10% in an example). The weight priority rules of the above three types of scenarios are stored as a scenario-weight mapping table. The mapping table clearly defines the specific types, weight ratio ranges and energy allocation targets of the core, secondary and auxiliary features in each scenario, providing a clear rule basis for the dimension-by-dimensional weighted calculation in step 223, and ensuring that the weighted feature vector can accurately reflect the energy consumption demand of the current scenario.

[0061] The technical essence of step 223 is to differentiate and strengthen the core features of the scene in the encoded feature vector through precise matching of scene-weight rules and dimensional structured weighting operations. This is different from the traditional unified weighting or ruleless weighting methods. It achieves deep adaptation of the feature vector to the energy allocation requirements of the current scene, and provides targeted input for subsequent time series fusion and energy consumption prediction.

[0062] Preferably, the specific implementation process of step 223 is as follows: First, obtain the current scene type locked in step 221 (such as flat road cruise, gentle slope climbing, long downhill gliding, etc.) and the scene-weight priority mapping system preset in step 222. Extract the weight rule corresponding to the current scene from the mapping system. This rule clarifies the weight coefficient of each dimension feature in the encoded feature vector (the general value range is 0-1, and the sum of the weight coefficients is 1), and the weight coefficient of the core feature is significantly higher than that of the secondary and auxiliary features. The dimension of the encoded feature vector (denoted as V_enc, the physical meaning is the set of core energy consumption features of the scene after being filtered and compressed by the feature encoding layer) is consistent with the core parameter dimension of the three-dimensional feature matrix of "road condition-load-battery" (generally 3-5 dimensions, 4 dimensions are used for example). Each dimension corresponds to the core feature, secondary feature, auxiliary feature 1, and auxiliary feature 2 in sequence. For example, the dimension of the encoded feature vector of the flat road cruise scene is "user cadence-SOC-motor load power-wind speed", and the dimension of the climbing scene is "slope-motor load power-battery attenuation coefficient-user cadence".

[0063] Preferably, in the specific technical implementation of step 223, based on the weighting rules of the current scenario, corresponding weight coefficients are assigned to each dimension of the encoded feature vector V_enc. For example, in the flat road cruising scenario, the user cadence weight coefficient is the high proportion range corresponding to the core feature (for example, 0.35), the SOC weight coefficient is the second highest proportion range corresponding to the core feature (for example, 0.25), the motor load power weight coefficient is the medium proportion range corresponding to the secondary feature (for example, 0.2), and the wind speed weight coefficient is the low proportion range corresponding to the auxiliary feature (for example, 0.15). In the uphill scenario, the slope weight coefficient is the high proportion range corresponding to the core feature (for example, 0.35), the motor load power weight coefficient is the high proportion range corresponding to the core feature (for example, 0.35), the battery degradation coefficient weight coefficient is the medium proportion range corresponding to the secondary feature (for example, 0.15), and the user cadence weight coefficient is the low proportion range corresponding to the auxiliary feature (for example, 0.15). The designed dimensional weighted operation logic performs a multiplication operation on the feature value of each dimension in the encoded feature vector V_enc with the corresponding weight coefficient to obtain the weighted feature value of each dimension. For example, in a flat road scenario, the user's cadence feature value (after standardization, it is a value within a general medium range, for example, 0.6) is multiplied with the weight coefficient (a value within a high proportion range corresponding to the core feature, for example, 0.35) to obtain the weighted feature value (for example, 0.21). This operation can highlight the impact of the core feature on energy consumption prediction.

[0064] Preferably, in a scenario, when implementing step 223, normalization calibration is performed on the weighted feature values ​​of all dimensions, mapping the weighted feature values ​​to a general unified range (e.g., [0,1]), ensuring the consistency of the magnitude of feature values ​​in each dimension and avoiding feature imbalance caused by excessive weight in one dimension. Then, the calibrated weighted feature values ​​of each dimension are reorganized according to the dimensional order of the original encoded feature vector to generate a weighted feature vector (denoted as V_w, physically representing a set of differentiated energy consumption features after scenario-adapted weighting). The dimensions of the weighted feature vector V_w are consistent with the encoded feature vector V_enc, and its element values ​​accurately reflect the importance of each energy consumption-related feature in the current scenario. For example, in the weighted feature vector of a hill climbing scenario, the element values ​​corresponding to the slope and motor load power are significantly higher than other dimensions; in a flat road scenario, the element values ​​corresponding to the user's cadence and SOC have a higher proportion. This provides the time-series feature fusion layer with input data that fits the needs of the current scenario, ensuring that subsequent energy consumption prediction can focus on the core energy consumption factors of the scenario, improving the targeting and accuracy of the prediction.

[0065] Optionally, step 3 includes: Step 31: Based on historical multi-scenario energy consumption data and battery degradation characteristics, classify and form a scenario type library including flat road cruising, gentle slope climbing, steep slope climbing, long downhill coasting, short downhill coasting, and start-stop transition by weighted combination of five parameters: road slope, motor load power, user cadence, ambient wind speed, and energy consumption prediction value; Step 32: Extract real-time operating parameters from the "road condition-load-battery" three-dimensional feature matrix, perform multi-parameter collaborative verification on the real-time operating parameters in combination with the energy consumption prediction value, and match them with the scenario type library to lock the current scenario type; Step 33: Execute a dedicated layered energy allocation strategy according to the current scenario type to generate an initial energy allocation scheme that is deeply adapted to the scenario characteristics, battery status, and energy consumption prediction.

[0066] The technical essence of step 31 is to build a standardized type library covering all Ebike usage scenarios by using a structured weighted combination of multi-dimensional working condition parameters and scenario-based clustering classification. This is different from the traditional fixed threshold division or single parameter classification method, and achieves accurate correspondence between scenario types and actual riding conditions, providing a standardized basis for subsequent scenario identification and differentiated energy allocation.

[0067] Preferably, the specific implementation process of step 31 is as follows: First, collect historical multi-scenario energy consumption data covering different cycling scenarios such as flat roads, uphill, and downhill. The dataset contains five-dimensional operating condition parameters and actual energy consumption values ​​corresponding to each record. The five-dimensional operating condition parameters are road slope (denoted as S, which means the inclination angle of the cycling path in degrees), motor load power (denoted as P_m, which means the energy consumption power of the motor output power in watts), user cadence (denoted as F_p, which means the number of times the user pedals per minute in times / minute), wind speed (denoted as W, which means the ambient air flow speed in meters per second), and energy consumption prediction value (denoted as P_pred, which means the energy consumption per unit distance predicted based on historical data in watt-hours per kilometer). At the same time, associate the battery degradation coefficient (denoted as K_dec, which means the ratio of the current actual capacity of the battery to the initial rated capacity) corresponding to each record to ensure that the data can reflect the scenario energy consumption characteristics under different degradation states.

[0068] Preferably, in the specific technical implementation of step 31, scenario-based weighted processing is performed on the five-dimensional working condition parameters. The designed parameter weighting rule is based on the influence weight of each parameter on the scenario classification. Among them, slope and motor load power are the core parameters for scenario classification and are given a high weight. User cadence and energy consumption prediction are secondary parameters and are given a medium weight. Wind speed is an auxiliary parameter and is given a low weight. The sum of the weights of each parameter is 1 (for example: slope 0.3, motor load power 0.3, user cadence 0.15, energy consumption prediction 0.15, wind speed 0.1). The comprehensive working condition feature value of each historical data is obtained through weighted calculation (denoted as V_scene, which physically means the quantitative representation of the scenario feature after multi-parameter fusion). The calculation logic is the sum of the product of the standardized value of each parameter and the corresponding weight. The parameter standardization processing is mapped to the [0,1] interval according to the physical value range to ensure that the magnitude of different parameters is consistent.

[0069] Preferably, in the specific technical implementation of step 31, based on the comprehensive operating condition feature value V_scene and the battery degradation coefficient K_dec, combined with the energy consumption pattern of Ebike's actual riding scenarios, the number of clusters is set to 6, corresponding to six sub-scenarios: flat road cruising, gentle slope climbing, steep slope climbing, long downhill coasting, short downhill coasting, and start-stop transition. During the clustering process, the degradation intervals are first divided according to the battery degradation coefficient K_dec (generally, there are three intervals: low degradation, medium degradation, and high degradation; for example, K_dec≥0.9, 0.7≤K_dec<0.9, K_dec<0.7). Clustering operations are performed independently within each degradation interval to ensure the consistency of operating condition features for the same scenario type under different degradation states. Subsequently, by calculating the feature similarity between data points (based on the Euclidean distance of the comprehensive operating condition feature value), data points with high similarity are grouped into the same category, forming the initial dataset for the six scenarios.

[0070] Preferably, in a specific implementation of step 31 in a scenario, feature extraction is performed on the initial datasets of the six scenarios, extracting the five-dimensional operating condition parameter statistical features (including maximum, minimum, average, and median) of each scenario dataset. Combined with the energy consumption requirements of the actual cycling scenario, the range of operating condition parameters for each scenario is determined. For example, the parameter range for the flat road cruising scenario is: gradient [-2°, 3°], motor load power [10W, 50W], user cadence [60 laps / minute, 90 laps / minute], wind speed [0m / s, 5m / s], and predicted energy consumption [10Wh / km, 20Wh / km]; the range for the gentle slope climbing scenario is: gradient [3°, 7°], motor load power [50W, 100W], user cadence [70 laps / minute, 100 laps / minute], wind speed [0m / s, 6m / s], and predicted energy consumption [20Wh / km, 70W, 100W ... [35Wh / km]; Steep slope climbing scenario: slope ≥7°, motor load power ≥100W, user cadence ≥80 times / minute; Long downhill gliding scenario: slope ≤-3°, motor load power ≤10W, user cadence ≤50 times / minute; Short downhill gliding scenario: slope in [-3°, 0°], motor load power in [10W, 30W], user cadence in [50 times / minute, 70 times / minute]; Start-stop transition scenario: motor load power fluctuation ≥50W / second, user cadence fluctuation ≥30 times / minute / second, slope in [-2°, 2°]. The parameter ranges, feature descriptions, and corresponding energy allocation strategy identifiers of the six scenarios are integrated to form a structured scenario type library. Each scenario record in the type library contains a unique scenario identifier, operating condition parameter range, typical energy consumption characteristics, and an index of the appropriate energy allocation strategy, providing a standardized template for scenario matching in step 32 and strategy invocation in step 33.

[0071] The technical essence of step 32 is to filter instantaneous interference through multi-parameter collaborative verification and combine energy consumption prediction values ​​to achieve accurate matching between operating parameters and scenario type library. This is different from the traditional identification method of single parameter matching or ignoring prediction information, ensuring the stability and adaptability of scenario type locking and providing a reliable basis for subsequent invocation of dedicated energy allocation strategies.

[0072] Preferably, the specific implementation process of step 32 is as follows: First, real-time operating parameters are extracted from the three-dimensional feature matrix of "road condition-load-battery", including road condition gradient (denoted as S, which physically means the inclination angle of the cycling path) and wind speed (denoted as W, which physically means the speed of ambient air flow) in the road condition dimension; motor load power (denoted as P_m, which physically means the energy consumption power of the motor output power) and user cadence (denoted as F_p, which physically means the number of times the user pedals per minute) in the load dimension; and battery SOC (denoted as S_c, which physically means the percentage of remaining battery capacity) in the battery dimension. At the same time, the predicted energy consumption value for the future preset time period (denoted as P_pred, which physically means the predicted energy consumption per unit distance) output in step 24 is obtained to form a scene matching input set of "five parameters + one predicted value" to ensure that the input information fully covers the core factors of scene recognition.

[0073] Preferably, in the specific technical implementation of step 32, multi-parameter collaborative verification is performed on the extracted real-time operating parameters. The designed verification logic is based on the physical correlation characteristics between parameters to avoid misjudgment caused by instantaneous fluctuations of a single parameter. For example, the collaborative verification of slope S and motor load power P_m: when slope S is in the climbing range, motor load power P_m should be synchronously in the high load range. If there is a contradictory situation where slope S is steep but motor load power P_m is low load, then the set of parameters is determined to be abnormal data, the parameters at the current sampling time are discarded, and the valid parameters at the previous time are used. The collaborative verification of user cadence F_p and SOCS_c: when user cadence F_p is in the high range, the rate of decrease of SOCS_c should conform to the energy consumption law of the corresponding scenario. If the rate of decrease exceeds the preset reasonable range (for example, >0.5% / s), then the parameter is smoothed and corrected, and the weighted result of the current value and the average of the previous N times (for example, N=3) is taken. After the verification is passed, a calibrated real-time operating parameter set is generated to ensure the consistency and reliability of the parameters.

[0074] Preferably, in the specific technical implementation of step 32, the calibrated real-time operating condition parameter set and the energy consumption prediction value P_pred are fused to generate a scene matching feature vector. The vector dimension is 6 (corresponding to road slope S, ambient wind speed W, motor load power P_m, user cadence F_p, SOCS_c, and energy consumption prediction value P_pred in sequence), and each element is a standardized parameter value (mapped to the [0,1] interval). The scene type library constructed in step 31 is called. The type library contains the parameter range and feature weight of six types of scenes, such as flat road cruising and gentle slope climbing. The fit degree between the scene matching feature vector and each type of scene in the type library is calculated (denoted as C, which physically means the degree of agreement between the input feature and the standard feature of the scene, with a value range of 0-1). The fit degree calculation logic is the reciprocal of the weighted sum of the normalized differences of the parameters in each dimension. Core parameters (such as slope and motor load power) are given higher weights, and auxiliary parameters (such as wind speed) are given lower weights.

[0075] Preferably, in a given scenario, when implementing step 32, the scenario type with the highest fit C that exceeds a preset fit threshold (generally 0.7-0.8, 0.75 in this example) is selected as a candidate scenario. To further improve recognition stability, a continuous sampling time verification mechanism is introduced. When the scenario matching results for multiple consecutive sampling times (generally 3-5, 4 in this example) are all the same candidate scenario, this scenario type is locked as the current scenario type. If the matching results for consecutive times are inconsistent, the verification period is extended (generally 5-8, 6 in this example), and the trend of the energy consumption prediction value P_pred is used to assist in the judgment. For example, when the energy consumption prediction value P_pred continues to increase, climbing scenarios are prioritized for matching; when the energy consumption prediction value P_pred continues to decrease, downhill scenarios are prioritized for matching. Finally, the current scenario type is accurately locked, providing accurate scenario basis for the invocation of the exclusive hierarchical energy allocation strategy in step 33.

[0076] Optionally, step 33 includes: Step 331, the exclusive layered energy allocation strategy for the flat road cruise scenario is a dynamic adaptation layered strategy of "cadence-energy consumption-power". Based on the comparison between the energy consumption prediction value and the historical energy consumption characteristics of the flat road cruise scenario in the scenario type library, the power following coefficient is corrected in layers. The basic following coefficient is used in the low energy consumption range, the enhanced following coefficient is used in the medium energy consumption range, and the energy-saving following coefficient is used in the high energy consumption range. The user's cadence in the three-dimensional feature matrix of "road condition-load-battery" is extracted every preset period, and the motor output power is finely adjusted in layers. At the same time, a differentiated fluctuation threshold is set according to the power range to limit the output change rate, and an initial energy allocation scheme is generated that is deeply adapted to the characteristics of the flat road cruise scenario, the battery status and the energy consumption prediction.

[0077] The technical essence of step 331 is to correct the power following coefficient by layering energy consumption ranges, combine real-time cadence dynamic fine-tuning of output power, and limit the rate of change by different fluctuation thresholds. This achieves precise matching of energy output with user needs and battery status in flat road cruising scenarios, which is different from traditional fixed power output or single following logic and solves the problem of excess energy or insufficient power in flat road scenarios.

[0078] Preferably, the specific implementation process of step 331 is as follows: First, obtain the energy consumption prediction value output in step 24 and the historical energy consumption characteristics of the flat road cruising scenario in the scenario type library. The energy consumption prediction value (denoted as P_pred, which physically means the predicted energy consumption per unit mileage within a preset time period in the future, in watt-hours per kilometer) is mapped to the [0,1] interval after standardization. The historical energy consumption characteristics are the energy consumption statistical intervals of different riding states under the flat road scenario (divided into low energy consumption interval, medium energy consumption interval, and high energy consumption interval). Each interval is divided according to the distribution pattern of historical data (for example: the low energy consumption interval corresponds to the standardized prediction value 0-0.3, the medium energy consumption interval is 0.3-0.7, and the high energy consumption interval is 0.7-1.0). Based on the energy consumption range to which the predicted energy consumption value P_pred belongs, the preset power following coefficient layering rules are invoked. The low energy consumption range uses the basic following coefficient (physically meaning the power mapping coefficient that meets basic riding needs, with a value range of 0.4-0.6, and 0.5 for example). The medium energy consumption range uses the enhanced following coefficient (physically meaning the power mapping coefficient that improves riding comfort, with a value range of 0.6-0.8, and 0.7 for example). The high energy consumption range uses the energy-saving following coefficient (physically meaning the power mapping coefficient that reduces energy consumption, with a value range of 0.3-0.5, and 0.4 for example). Through coefficient layering correction, energy output adaptation under different energy consumption states is achieved.

[0079] Preferably, in the specific technical implementation of step 331, real-time pedal frequency (denoted as F_p, which physically means the number of times the user pedals per minute, in units of times / minute) is extracted from the three-dimensional feature matrix of "road condition-load-battery" according to a preset period (the general period is 100-300 milliseconds, and 200 milliseconds is used as an example). After the real-time pedal frequency F_p is standardized, it is multiplied with the power following coefficient corresponding to the current interval to obtain the initial motor output power (denoted as P_init, which physically means the basic output power calculated based on pedal frequency and following coefficient, in units of watts). The initial motor output power P_init is modified by combining the battery SOC (denoted as S_c, which physically means the percentage of remaining battery capacity) and the battery degradation coefficient (denoted as K_dec, which physically means the ratio of the current actual capacity of the battery to the initial rated capacity) in the battery state characteristic configuration. The modification logic is as follows: when the SOC is in the high range (normalized value 0.7-1.0) and the battery degradation coefficient is in the low range (0.8-1.0), the initial power is maintained; when the SOC is in the medium-low range (0-0.7) or the battery degradation coefficient is in the high range (0-0.8), the initial power is reduced according to the modification factor (value range 0.8-0.95, 0.9 is used in the example) to avoid over-discharge of the battery.

[0080] Preferably, in the specific technical implementation of step 331, a mapping relationship between power range and fluctuation threshold is constructed. The range of motor output power is divided into low power range, medium power range, and high power range (for example: low power range 20-50 watts, medium power range 50-100 watts, high power range 100-150 watts). Each power range corresponds to a different fluctuation threshold (physically meaning the maximum allowable change in power per unit time, in watts per second). The fluctuation threshold of the low power range is set to a lower range (2-5 watts / second, for example 3 watts / second), the medium power range is set to a medium range (5-8 watts / second, for example 6 watts / second), and the high power range is set to a higher range (8-12 watts / second, for example 10 watts / second). This design is based on the user's sensitivity to power changes in the flat road cruising scenario, avoiding riding discomfort caused by sudden power changes.

[0081] Preferably, in one scenario, when implementing step 331, the difference between the second-corrected motor output power and the actual output power of the previous cycle is calculated to obtain the power change. If the absolute value of the change is less than the fluctuation threshold corresponding to the current power range, the current corrected power is directly output; if the absolute value of the change exceeds the fluctuation threshold, the power change rate is limited according to the fluctuation threshold, and the superposition value of the power of the previous cycle and the fluctuation threshold (when power increases) or the difference (when power decreases) is taken as the current output power. The finally determined motor output power, power following coefficient, and fluctuation threshold are integrated to generate an initial energy allocation scheme for the flat road cruising scenario. This scheme clarifies the dynamic adjustment rules of the real-time motor output power, ensuring the adaptability of power output to the user's cadence, achieving efficient energy utilization through energy consumption stratification and battery state correction, and improving the stability of riding by leveraging the fluctuation threshold.

[0082] Optionally, step 33 includes: Step 332, the exclusive layered energy allocation strategy for the gentle slope climbing scenario is a "load grading - energy replenishment grading" collaborative strategy. Combining the load characteristic thresholds of the gentle slope climbing scenario in the scenario type library, the load is divided into three load ranges: low, medium, and high according to the motor load power. In the low load range, only the conventional rate battery cell group is used for power supply. In the medium load range, the energy storage capacitor is triggered to replenish energy at the first ratio. In the high load range, the energy storage capacitor replenishes energy at the second ratio. The exclusive layered energy allocation strategy for the steep slope climbing scenario is a "dual-path parallel - dynamic layered power supply" strategy. Referring to the attenuation adaptation rules of the steep slope climbing scenario in the scenario type library, the battery is layered according to the dual dimensions of motor load power and battery attenuation coefficient. In the low attenuation high load range, the high rate battery cell group has the first ratio, and in the high attenuation high load range, the energy storage capacitor power supply has the second ratio. The dual-path power supply current allocation ratio is dynamically adjusted to generate an initial energy allocation scheme that is deeply adapted to the characteristics of the climbing scenario, battery status, and energy consumption prediction.

[0083] The technical essence of step 332 is to design a differentiated layered power supply logic for the load characteristics and battery degradation impact of climbing scenarios (gentle slopes and steep slopes). By load grading and dual-dimensional layering, the power supply mode is dynamically adapted. Unlike the traditional single-path fixed power supply mode, it not only ensures the stability of climbing power output, but also reduces the battery degradation rate, thus solving the core contradiction of insufficient power and battery overload in climbing scenarios.

[0084] Preferably, the specific implementation process of step 332 is as follows: First, the hardware configuration basis for the hill-climbing scenario is defined. The battery pack is divided into a conventional rate cell pack (supporting medium discharge rate, physically meaning a cell combination that meets the needs of conventional loads) and a high rate cell pack (supporting high discharge rate, physically meaning a cell combination that can handle peak loads). At the same time, an energy storage capacitor module (physically meaning a short-time high-power energy replenishment unit with fast charging and discharging characteristics) is configured. The three types of power supply units achieve coordinated power supply through a power distribution module. The power distribution module has built-in current detection and switching control logic to ensure a smooth transition of power supply modes. The load characteristic thresholds and attenuation adaptation rules for gentle hill-climbing scenarios and steep hill-climbing scenarios are extracted from the scenario type library to provide a basis for the stratification strategy of the two types of scenarios.

[0085] Preferably, in the specific technical implementation of the "load grading-energy replenishment layering" collaborative strategy for the gentle slope climbing scenario, the real-time motor load power (denoted as P_m, which physically means the energy consumption power required for the motor output power) in the three-dimensional feature matrix of "road condition-load-battery" is first extracted. Combined with the load feature threshold of the gentle slope climbing scenario in the scenario type library, the load is divided into three levels of load intervals: low, medium, and high according to the value range of the motor load power P_m. The low load range refers to the basic load range where the motor load power is in a gentle slope scenario (e.g., 50-80 watts). At this time, only the conventional rate battery pack is used for independent power supply, and the supply current is dynamically adjusted according to the motor load power demand to avoid energy loss caused by the start-up of high rate units. The medium load range refers to the medium load range where the motor load power is in a gentle slope scenario (e.g., 80-120 watts). The first proportion of energy storage capacitor is triggered to replenish energy. The first proportion is a relatively low proportion of the energy storage capacitor supply current to the total supply current (e.g., 20%-30%). The conventional rate battery pack provides the remaining proportion of current to alleviate the battery load pressure through capacitor replenishment. The high load range refers to the high load range where the motor load power is in a gentle slope scenario (e.g., 120-150 watts). The energy storage capacitor replenishes energy according to the second proportion, which is a higher proportion of replenishment than the first proportion (e.g., 40%-50%). This enhances the power output under peak load and avoids long-term high-load discharge of the conventional rate battery pack.

[0086] Preferably, in the specific technical implementation of the "dual-path parallel-dynamic hierarchical power supply" strategy for steep slope climbing scenarios, the real-time motor load power P_m and battery attenuation coefficient (denoted as K_dec, which physically means the ratio of the battery's current actual capacity to its initial rated capacity) are extracted from the three-dimensional feature matrix of "road condition-load-battery". The system is then divided into hierarchical intervals based on both the motor load power P_m and the battery attenuation coefficient K_dec. The motor load power P_m is divided into a low-load interval and a high-load interval on steep slopes (for example, a high-load interval of ≥150 watts), and the battery attenuation coefficient K_dec is divided into a low attenuation interval (for example, ≥0.8), a medium attenuation interval (for example, 0.6-0.8), and a high attenuation interval (for example, ≤0.6). In the low-degradation, high-load range, high-rate cell packs account for the largest proportion (e.g., 60%-70%), while conventional-rate cell packs make up the remaining proportion. This utilizes the high-rate discharge capability of the low-degradation batteries to ensure power output. In the medium-degradation, high-load range, the proportion of high-rate cell packs decreases to a medium proportion (e.g., 40%-50%), while the proportion of conventional-rate cell packs increases. Simultaneously, energy storage capacitors provide supplementary power (e.g., 10%-20%). In the high-degradation, high-load range, energy storage capacitors account for the second largest proportion (e.g., 50%-60%). Both high-rate and conventional-rate cell packs provide the remaining current. The high-power output characteristics of the capacitors compensate for the insufficient discharge capability of the high-degradation batteries. The power supply current distribution ratio between the dual-cell packs and the energy storage capacitors is dynamically adjusted to ensure that the power output matches the battery state.

[0087] Preferably, in one scenario, when step 332 is specifically implemented, the output current and cell voltage parameters of each power supply unit are collected in real time during the power supply process. Combined with the battery degradation coefficient K_dec and energy consumption prediction value in the battery state characteristic profile, the power supply ratio is dynamically corrected. For example, in a gentle slope climbing scenario, if the voltage drop rate of the conventional rate cell group is detected to be too fast (e.g., >0.1 volts / second), the energy storage capacitor's energy replenishment ratio is appropriately increased. In a steep slope climbing scenario, if the battery degradation coefficient K_dec continues to decrease, the upper limit of the second proportion of the energy storage capacitor is gradually increased. The power supply unit selection, power supply ratio rules, and switching conditions for both scenarios are integrated to generate initial energy allocation schemes for gentle and steep slope climbing scenarios. The schemes clearly define the power supply mode, current allocation ratio, and switching threshold under different load and degradation states, ensuring both the continuity and stability of power output during the climbing process and reducing cell overload and extending battery cycle life through layered power supply.

[0088] Optionally, step 33 includes: Step 333, the exclusive layered energy allocation strategy for the long downhill gliding scenario is a three-level layered strategy of "recovery-balancing-replenishment". Based on the recovery parameter benchmark of the long downhill gliding scenario in the scenario type library, the first level adjusts the recovery power according to the wind speed, the second level executes the balancing logic according to the cell voltage difference, and the third level allocates the replenishment priority according to the battery SOC. After the energy recovered by the motor is stabilized by the voltage conversion module, the high SOC range is given priority to replenish the low voltage cells. When the cell voltage difference drops to the set threshold, it switches to the average replenishment mode, and generates an initial energy allocation scheme that is deeply adapted to the long downhill gliding scenario, battery status and energy consumption prediction.

[0089] The technical essence of step 333 is to achieve efficient utilization of recovered energy and dynamic optimization of cell consistency in long downhill scenarios through a three-level progressive hierarchical logic of "recovery-balancing-recharge". Unlike the traditional single recovery and recharging or independent balancing method, it deeply coordinates energy recovery and battery balancing, which not only improves the energy recovery utilization rate, but also inhibits cell consistency degradation, solving the dual problems of energy waste and accelerated battery degradation in long downhill scenarios.

[0090] Preferably, the specific implementation process of step 333 is as follows: First, the recovery parameter benchmark for the long downhill gliding scenario is extracted from the scenario type library. This benchmark includes the upper limit of recovery power, the cell equalization trigger threshold, and the SOC layered energy replenishment rules corresponding to different wind speed ranges, providing a quantitative basis for the three-level layered strategy. The core hardware support for the long downhill gliding scenario includes a motor reverse power generation module, a DC-DC voltage conversion module, a cell voltage detection module, and an energy distribution switch matrix. The motor reverse power generation module is responsible for converting mechanical energy into electrical energy. The DC-DC voltage conversion module stabilizes the recovered electrical energy to the voltage range suitable for the battery pack. The cell voltage detection module collects the voltage of each cell in real time (the sampling frequency is a general range of 10-20Hz, for example, 15Hz). The energy distribution switch matrix controls the energy replenishment path and current magnitude of the recovered electrical energy.

[0091] Preferably, in the specific technical implementation of the first-level "layered adjustment of recovery power according to wind speed", the real-time wind speed (denoted as W, which physically means the ambient air flow speed in a long downhill scenario, in meters per second) is extracted from the three-dimensional feature matrix of "road condition-load-battery". This wind speed is then divided into low-wind-speed, medium-wind-speed, and high-wind-speed ranges (for example: low-wind-speed range 0-3 m / s, medium-wind-speed range 3-6 m / s, high-wind-speed range 6-10 m / s). Based on the recovery parameter benchmarks in the scenario type library, a corresponding upper limit for recovery power is set for each wind speed range. The upper limit for recovery power in the low-wind-speed range is set to a relatively low range (for example, 20-50 W), because the vehicle's gliding speed is slow at low wind speeds, and excessive recovery can easily affect the smoothness of gliding. The upper limit for recovery power in the medium-wind-speed range is set to a medium range (for example, 50-100 W), balancing recovery efficiency and gliding experience. The upper limit for recovery power in the high-wind-speed range is set to a relatively high range (for example, 100-150 W), fully utilizing the gliding kinetic energy under high wind speeds. By adjusting the excitation current of the reverse power generation through the motor controller, the recovered power is controlled within the corresponding range, generating a wind speed-adaptive recovered power signal.

[0092] Preferably, in the specific technical implementation of the second-level "layered execution of equalization logic based on cell voltage difference", the cell voltage detection module collects the real-time voltage of all cells (denoted as U_cell-i, where i is the cell number, and physically means the terminal voltage of the i-th cell, in volts), calculates the cell voltage difference (denoted as ΔU_cell, and physically means the difference between the highest and lowest cell voltage, in volts), and divides the cell voltage difference ΔU_cell into mild imbalance intervals, moderate imbalance intervals, and severe imbalance intervals according to the value range of the cell voltage difference ΔU_cell (for example: mild imbalance interval 0.05-0.1V, moderate imbalance interval 0.1-0.2V, severe imbalance interval >0.2V). Differentiated balancing logic is designed for different imbalance ranges. In the mild imbalance range, only voltage monitoring and tracking are activated without active intervention. In the moderate imbalance range, passive balancing is activated, which consumes excess power of high-voltage cells through energy-consuming resistors, so that the cell voltage difference is gradually reduced. In the severe imbalance range, active balancing is activated, which is linked to the energy recovery path to prioritize the recovery of energy to low-voltage cells, while limiting the charging current of high-voltage cells, accelerating the correction of cell voltage consistency, and generating cell balancing control signals.

[0093] Preferably, in the specific technical implementation of the third level "allocating charging priority according to battery SOC", the battery SOC (denoted as S_c, physically meaning the percentage of remaining capacity of the battery pack) is extracted from the battery state characteristic profile and divided into low SOC range, medium SOC range, and high SOC range according to the SOC value range (for example: low SOC range <30%, medium SOC range 30%-70%, high SOC range >70%). Based on the cell voltage detection results, charging priority rules are set for different SOC ranges: in the low SOC range, all cells need charging, and the charging priority is sorted from low to high cell voltage, with lower voltage having higher priority; in the medium SOC range, only cells with voltage lower than the average cell voltage are charged, and the charging priority is positively correlated with the voltage difference; in the high SOC range, charging high-voltage cells is prohibited, and only low-voltage cells are charged in a targeted manner to avoid overcharging of the battery pack. The electrical energy recovered by the reverse generator is regulated by a DC-DC voltage conversion module (the regulated voltage range is 0.95-1.05 times the general range of the rated voltage of the battery pack; for example, a 36V battery pack is regulated to 34.2-37.8V) to generate stable replenishing power.

[0094] Preferably, in one scenario, when step 333 is specifically implemented, based on the energy replenishment priority rule and the cell equalization control signal, the energy distribution switch matrix switches to the corresponding energy replenishment path. In the high SOC range, stable energy replenishment is prioritized to supply low-voltage cells. The energy replenishment current is dynamically adjusted according to the cell voltage difference. The larger the voltage difference, the larger the current (the current range is a general range of 0.5-2A, for example, 0.5-1.5A is used). When the cell voltage difference drops to a set threshold (the general threshold is 0.05-0.1V, for example, 0.08V is used), it switches to the average energy replenishment mode. Stable energy replenishment is distributed to all cells with equal current to maintain cell voltage consistency. By integrating the control parameters of the three-level hierarchical strategy (upper limit of recovered power, threshold of equalization interval, range of replenishment current, and mode switching conditions), an initial energy distribution scheme for long downhill gliding scenarios is generated. This scheme clarifies the energy recovery intensity and replenishment logic under different wind speeds, different cell states, and different SOCs, which maximizes the recovery of kinetic energy in long downhill scenarios and protects the battery through precise replenishment and dynamic equalization, thereby extending the battery's lifespan.

[0095] Optionally, step 33 includes: Step 334, the exclusive layered energy allocation strategy for the short downhill coasting scenario is a "recovery grading - energy storage grading - standby adaptation" strategy. Based on the working condition association model of the short downhill coasting scenario in the scenario type library, the recovery intensity is adjusted according to the predicted energy consumption value to predict the subsequent working conditions. The first intensity of recovery is adopted for the predicted flat road working conditions, and the second intensity of recovery is adopted for the predicted climbing working conditions. The recovered electrical energy is stored in layers according to the remaining capacity of the energy storage capacitor. At the same time, the power output threshold is reserved in layers according to the standby priority, and an initial energy allocation scheme that is deeply adapted to the short downhill coasting scenario, battery status and energy consumption prediction is generated.

[0096] The technical essence of step 334 is to solve the problem of wasted recovered energy or insufficient power reserve caused by the uncertainty of subsequent working conditions in short downhill scenarios through a three-level collaborative strategy of "recovery intensity prediction and adaptation - energy storage capacity layered storage - standby power threshold reservation". It is different from the traditional fixed intensity recovery or single recharge battery method, and achieves efficient storage of recovered energy and rapid adaptation to subsequent working conditions, balancing energy recovery efficiency and riding power continuity.

[0097] Preferably, the specific implementation process of step 334 is as follows: First, the working condition association model of the short downhill coasting scenario in the scenario type library is called. This model is constructed based on the working condition conversion data of historical short downhill scenarios and includes feature association rules for two core conversion paths: "short downhill-flat road" and "short downhill-climbing road". The rules clearly define the collaborative judgment logic of energy consumption prediction value, slope change trend, and motor load power prediction value. Extract the future preset time period energy consumption prediction value (denoted as P_pred, which physically means the predicted energy consumption per unit mileage) output in step 24 and the real-time slope change rate (denoted as ΔS / Δt, which physically means the slope change amplitude per unit time, reflecting the road condition conversion trend) and motor load power prediction value (denoted as P_m_pred, which is derived based on the energy consumption prediction value and physically means the motor load power required for subsequent working conditions) from the three-dimensional feature matrix of "road condition-load-battery" to form a working condition prediction input set, which provides a basis for adjusting the recovery intensity.

[0098] Preferably, in the specific technical implementation of step 334, the subsequent operating conditions are predicted based on the operating condition correlation model. The prediction logic is as follows: when the predicted energy consumption value P_pred is in the low range (standardized value 0.1-0.3, corresponding to actual energy consumption 10-20Wh / km), the slope change rate ΔS / Δt is close to zero (for example, -0.5° / s to 0.5° / s), and the predicted motor load power value P_m_pred is in the low range (standardized value 0.1-0.2, corresponding to actual energy consumption 10-20Wh / km), the predicted energy consumption ... When the actual power is 10-30W, the subsequent operating condition is determined to be a flat road condition; when the energy consumption prediction value P_pred is in the high range (standardized value 0.6-0.9, corresponding to actual energy consumption 30-45Wh / km), the slope change rate ΔS / Δt is in the positive range (for example, >0.5° / s), and the motor load power prediction value P_m_pred is in the high range (standardized value 0.5-0.7, corresponding to actual power 80-120W), the subsequent operating condition is determined to be a climbing condition. Differential recovery intensities are set for two types of predicted operating conditions. The first intensity of recovery is used for the predicted flat road condition (physically meaning medium recovery intensity, balancing recovery efficiency and battery charge and discharge protection, with a recovery power upper limit of 30-60W in a general range, 40W for example). The second intensity of recovery is used for the predicted climbing condition (physically meaning high recovery intensity, maximizing the recovery energy reserve power, with a recovery power upper limit of 60-100W in a general range, 80W for example). The excitation current of the reverse generation is adjusted by the motor controller to control the recovery power within the corresponding intensity range, generating a condition-adaptive recovery power signal.

[0099] Preferably, in the specific technical implementation of step 334, an independent energy storage capacitor module (denoted as C_sto, physically meaning a short-time high-power energy storage unit, with a capacity ranging from 5-20F, for example, 10F) is configured. This module is connected in parallel with the battery pack, and the storage path of the recovered energy is controlled by an energy distribution switch. The real-time remaining capacity of the energy storage capacitor module (denoted as C_rem, physically meaning the maximum energy percentage that the energy storage capacitor can currently store, with a value range of 0-1) is extracted and divided into low remaining capacity range, medium remaining capacity range, and high remaining capacity range (for example: low range 0-0.3, medium range 0.3-0.7, high range 0.7-1.0). The recovered energy is regulated by a DC-DC voltage conversion module (regulated to 0.95-1.05 times the rated voltage of the capacitor, for example, regulated to 45.6-49.2V for a 48V capacitor). Then, it is stored in layers according to the remaining capacity range: In the low remaining capacity range, the recovered energy is stored quickly with the maximum charging current (general range 5-10A, for example 8A) to fill the capacitor first; in the medium remaining capacity range, the energy is stored with a medium charging current (general range 3-6A, for example 4A) to balance the storage speed and capacitor heat generation; in the high remaining capacity range, the energy is stored with a small current (general range 1-3A, for example 2A) to avoid overcharging the capacitor, and a small portion of the excess energy is recharged back into the battery to ensure that the recovered energy is not wasted.

[0100] Preferably, in the specific technical implementation of step 334, based on the predicted operating conditions and the remaining capacity of the energy storage capacitor, the power output threshold is reserved in layers according to the standby priority (denoted as P_res, which physically means the minimum instantaneous output power reserved by the energy storage capacitor to ensure the power response speed of subsequent operating conditions). When anticipating flat road conditions, reserve low-priority standby thresholds based on the remaining capacity of the energy storage capacitors: a lower threshold for the low remaining capacity range (general range 10-20W, 15W for example), a medium threshold for the medium remaining capacity range (general range 20-30W, 25W for example), and a higher threshold for the high remaining capacity range (general range 30-40W, 35W for example), to meet the basic power following requirements for flat road conditions. When anticipating uphill conditions, reserve high-priority standby thresholds based on the remaining capacity of the energy storage capacitors: a medium threshold for the low remaining capacity range (general range 30-40W, 35W for example), a higher threshold for the medium remaining capacity range (general range 40-60W, 50W for example), and a high threshold for the high remaining capacity range (general range 60-80W, 70W for example), to ensure peak power output for uphill conditions.

[0101] Preferably, in one scenario, when step 334 is specifically implemented, the storage status of the energy storage capacitor and the predicted operating conditions are monitored in real time. When the actual subsequent operating condition changes are consistent with the prediction, the energy storage capacitor quickly releases energy according to the reserved power output threshold to power the battery pack. When the operating condition changes are inconsistent with the prediction, the recovery intensity and the reserved threshold are adjusted in real time. For example, if the predicted flat road actually turns into an uphill climb, the recovery intensity is immediately increased to the second intensity, and the reserved power output threshold is increased. The recovery intensity adjustment rules, energy storage layer parameters, and standby threshold reservation standards are integrated to generate an initial energy allocation scheme for short downhill gliding scenarios. This scheme clarifies the recovery power, charging current, and reserved power under different predicted operating conditions and different capacitor capacities, maximizing the recovery of kinetic energy in short downhill scenarios and ensuring the continuity of power in subsequent operating conditions through precise reservation, thereby improving the riding experience under complex road condition changes.

[0102] Optionally, step 33 includes: Step 335, the exclusive layered energy allocation strategy for the start-stop transition scenario is a three-level layered output strategy of "start-boost-stable". Referring to the impact protection parameters of the start-stop transition scenario in the scenario type library, the start-up phase adopts low-power layered start-up, the boost phase increases the output layered according to the rate, and the stable phase extracts the user cadence layered power lock from the three-dimensional feature matrix of "road condition-load-battery" to generate an initial energy allocation scheme that is deeply adapted to the start-stop transition scenario, battery status and energy consumption prediction.

[0103] The technical essence of step 335 is to solve the core contradiction of power impact and energy waste in start-stop transition scenarios through a three-level progressive output logic of "starting low power buffer - controllable boost rate - stable cadence lock". It is different from the traditional instantaneous full power start or fixed rate boost method, and achieves precise coordination between power output and user pedaling action, which reduces the battery high current impact loss and improves the riding smoothness of the start-stop process.

[0104] Preferably, the specific implementation process of step 335 is as follows: First, the impact protection parameters for the start-stop transition scenario are extracted from the scenario type library. These parameters include the power upper limit during the start-up phase, the rate threshold during the boost phase, and the power lock-in range during the steady phase. These parameters are set based on the user's perceived threshold and the battery's impact tolerance characteristics during Ebike start-stop (e.g., the maximum impact current during the start-up phase does not exceed 1.2 times the battery's rated current). The core control logic relies on the motor drive controller and the power buffer module. The motor drive controller is responsible for adjusting the output power according to a graded strategy, and the power buffer module suppresses the current surge caused by power fluctuations through an inductor-capacitor filter circuit, ensuring the stable operation of the battery and motor.

[0105] Preferably, in the specific technical implementation of "low-power tiered start-up" during the start-up phase, the start-up power is divided into three tiers based on the battery degradation coefficient (denoted as K_dec, which physically means the ratio of the battery's current actual capacity to its initial rated capacity) and SOC (denoted as S_c, which physically means the percentage of the battery's remaining capacity) in the battery state characteristic configuration. When the battery degradation coefficient is in the low range (general range 0.8-1.0, 0.9-1.0 in an example) and the SOC is in the high range (general range 0.7-1.0, 0.8-1.0 in an example), the first-level start-up power (general range 10-20W, 15W in an example) is used to balance start-up response speed and impact protection; when the battery degradation coefficient is in the middle range (general range 0.6-0.8, 0.7-0.9 in an example) or the SOC is in the middle range (general range 0.8-1.0), the first-level start-up power (general range 10-20W, 15W in an example) is used to balance start-up response speed and impact protection. When the battery degradation coefficient is in the high range (general range 0-0.7, example 0.4-0.8), the second-level starting power (general range 8-15W, example 10W) ​​is used to reduce the impact load on the battery. When the battery degradation coefficient is in the high range (general range 0-0.6, example 0-0.7) or the SOC is in the low range (general range 0-0.3, example 0-0.4), the third-level starting power (general range 5-10W, example 8W) is used to avoid excessive current impact on the battery with high degradation or low charge. The duration of the starting phase is generally 0.3-0.8 seconds, example 0.5 seconds, to ensure that the user's pedaling action and power output form an initial coordination.

[0106] Preferably, in the specific technical implementation of "tiered output boosting by rate" during the boosting phase, three boosting rate thresholds are set (physically meaning the maximum power increase per unit time). These rate thresholds correspond one-to-one with the power levels during the startup phase. The first-level startup power corresponds to the first-level boosting rate (general range 10-20W / s, example 15W / s), the second-level startup power corresponds to the second-level boosting rate (general range 8-15W / s, example 12W / s), and the third-level startup power corresponds to the third-level boosting rate (general range 5-10W / s, example 8W / s). This avoids abrupt power surges or lags caused by excessively fast or slow boosting rates under different battery conditions. The rate of change of motor output power is monitored in real time, and the actual boosting rate is controlled within the corresponding threshold using a PID control algorithm. When the power boosting rate exceeds the threshold, the increase in drive current is automatically reduced to ensure a smooth and gradual increase in power output.

[0107] Preferably, in the specific technical implementation of "extracting real-time cadence and locking power in a layered manner" during the stable phase, real-time cadence (denoted as F_p, which physically means the number of times the user pedals per minute) is extracted from the three-dimensional feature matrix of "road condition-load-battery" according to a preset period (general range 100-300 milliseconds, 200 milliseconds for example). The real-time cadence F_p is divided into low cadence range, medium cadence range, and high cadence range according to its value range (for example: low cadence range 40-60 times / minute, medium cadence range 60-90 times / minute, high cadence range 90-120 times / minute). Set a corresponding power lock range for each cadence range. The power lock range for the low cadence range is 20-40W (30W for example), the power lock range for the medium cadence range is 40-70W (50W for example), and the power lock range for the high cadence range is 70-100W (80W for example). The power lock range is set based on the "cadence-power" adaptation model for start-stop transition scenarios in the scenario type library to ensure that the power output matches the user's pedaling force.

[0108] Preferably, in one scenario, when step 335 is specifically implemented, the fluctuation amplitude of the real-time cadence F_p is continuously monitored during the stable phase. When the fluctuation amplitude is lower than the preset stability threshold (general range 5-10 times / minute, 8 times / minute for example) and the general duration is 0.5-1.5 seconds (1 second for example), the start-stop transition is determined to be complete, and the energy distribution strategy for the flat road cruising scenario is automatically switched. If the fluctuation amplitude exceeds the stability threshold, the power lock logic of the stable phase is maintained until the cadence stabilizes. The three-level hierarchical power parameters, boost rate threshold, and cadence lock rules are integrated to generate the initial energy distribution scheme for the start-stop transition scenario. This scheme protects the battery through low-power start-up and controllable boost rate, and achieves coordination between power and riding action through cadence lock, thereby improving the smoothness of the start-stop process and energy utilization efficiency.

[0109] Optionally, step 4 includes: Step 41, the fuzzy control closed-loop feedback submodule takes the initial energy allocation scheme, including the battery attenuation coefficient, cell voltage difference, and energy consumption prediction value, as input variables, and the maximum discharge rate, maximum charging rate, and equalization replenishment current as output variables; Step 42, performs fuzzification processing on the input variables to generate a fuzzy set, performs rule reasoning on the fuzzy set based on a preset fuzzy rule table to obtain the fuzzy association result of the output variable, and obtains the control value of the output variable by defuzzification operation on the fuzzy association result; Step 43, dynamically adjusts the battery charging and discharging threshold and equalization replenishment current based on the control value, generates energy allocation control commands, and regulates the battery charging and discharging process and the cell equalization process.

[0110] The technical essence of step 41 is to screen the core input variables (battery degradation coefficient, cell voltage difference, and energy consumption prediction) that are strongly related to the energy distribution of Ebike in multiple scenarios, and to clarify the output variables (maximum discharge rate, maximum charging rate, and equalization current) that are adapted to the needs of the scenarios. This establishes a precise correlation logic between input and output, which is different from the problem of general variable selection and poor adaptability to scenarios in traditional fuzzy control. It enables targeted dynamic control of the battery charging, discharging and equalization process, balancing the range requirements and battery protection under different scenarios.

[0111] Preferably, the specific implementation process of step 41 is as follows: First, the variable selection logic of the fuzzy control closed-loop feedback submodule is clarified. The input variables must directly reflect the battery state, cell consistency, and future energy consumption requirements, and the output variables must accurately correspond to the core control parameters of energy allocation to ensure the physical correlation and scenario adaptability between variables. The battery state feature configuration is parsed from the initial energy allocation scheme to extract the battery degradation coefficient and cell voltage difference. The energy consumption prediction value is obtained from the output of the energy consumption prediction model as three core input variables. Combining the control requirements of energy allocation in multiple scenarios, the maximum discharge rate, maximum charging rate, and equalization replenishment current are determined as three output variables, forming a "three-input-three-output" fuzzy control variable system, which lays the foundation for subsequent fuzzification processing and rule reasoning.

[0112] Preferably, in the specific technical implementation of step 41, the acquisition and preprocessing of input variables must meet the requirements of real-time control and accuracy. The battery degradation coefficient (denoted as K_dec, physically meaning the ratio of the battery's current actual capacity to its initial rated capacity, reflecting the degree of battery aging) is extracted from the battery state feature configuration generated in step 11. This parameter is updated according to a set cycle (the general cycle is 10-20 battery cycles, 15 cycles are used as an example), with a value range of 0-1. After extraction, no additional conversion is required; it is directly used as input. The cell voltage difference (denoted as ΔU_cell, physically meaning the difference between the highest and lowest cell voltages in the battery pack, reflecting cell consistency) is collected in real-time by the cell voltage detection module. The sampling frequency is generally within the range of 10-20Hz (15Hz is used as an example). After collecting the terminal voltage of all cells, the difference is calculated, with a value range of 0-0.5V (for example). After standardization, it is mapped to the [0,1] interval. The energy consumption prediction value (denoted as P_pred, which physically means the energy consumption per unit mileage in the future preset period, reflecting the energy consumption demand of subsequent operating conditions) is obtained from the output of step 24, with a value range of 10-50Wh / km (for example). It is also standardized and mapped to the [0,1] interval to ensure that the magnitudes of the three input variables are consistent and to improve the accuracy of fuzzy inference.

[0113] Preferably, in the specific technical implementation of step 41, the battery degradation coefficient K_dec has a particularly significant impact in high-load scenarios such as hill climbing. Low-degradation batteries can withstand higher discharge rates, while high-degradation batteries need to limit their discharge rate to avoid overload. The cell voltage difference ΔU_cell plays a prominent role in energy recovery scenarios such as long downhill slopes; the larger the voltage difference, the stronger the demand for balanced energy replenishment. The energy consumption prediction value P_pred is directly related to the energy demand of subsequent operating conditions. A high prediction value corresponds to scenarios such as hill climbing, requiring an increase in the maximum discharge rate to ensure power, while a low prediction value corresponds to flat road cruising scenarios, allowing for a reduction in the discharge rate to save energy. These three input variables work together to reflect the current state of the battery and future operating condition requirements, ensuring that the input information is comprehensive and highly targeted.

[0114] Preferably, in the specific technical implementation of step 41, the control objectives and scenario adaptation rules of each output variable are clearly defined. The maximum discharge rate (denoted as D_max, physically meaning the ratio of the maximum allowable discharge current of the battery to the rated capacity, in units of C) directly controls the upper limit of the power supplied by the motor. A medium discharge rate can be used in flat road cruising scenarios, an appropriate increase is needed in climbing scenarios, and a decrease is needed in high-degradation battery scenarios. The maximum charging rate (denoted as C_max, physically meaning the ratio of the maximum allowable charging current of the battery to the rated capacity, in units of C) is mainly adapted to downhill energy recovery scenarios. In high SOC scenarios, the charging rate needs to be reduced to avoid overcharging, while in low SOC scenarios, the charging rate can be increased to improve recovery efficiency. The equalization replenishment current (denoted as I_bal, physically meaning the magnitude of the replenishment current used for cell equalization, in units of A) is based on the cell voltage difference ΔU_cell. The larger the voltage difference, the larger the equalization replenishment current. At the same time, it needs to be adjusted in conjunction with SOC. The replenishment current is reduced in high SOC scenarios and increased in low SOC scenarios. The three output variables correspond to the core control links of energy distribution, ensuring that the control commands are accurately adapted to the needs of the scenario.

[0115] Preferably, in a specific implementation of step 41 within a given scenario, a scenario-related mapping table of input and output variables is established to clarify the association priority of each variable under different scenarios. For example, in a hill climbing scenario, the association priority between the predicted energy consumption value P_pred and the maximum discharge rate D_max is the highest, followed by the battery degradation coefficient K_dec; in a long downhill scenario, the association priority between the cell voltage difference ΔU_cell and the equalization charging current I_bal is the highest, followed by the predicted energy consumption value P_pred and the maximum charging rate C_max; in a flat road cruising scenario, the association priority between the battery degradation coefficient K_dec and the maximum discharge rate D_max is the highest, followed by the cell voltage difference ΔU_cell and the equalization charging current I_bal. This mapping table provides scenario guidance for the subsequent construction of the fuzzy rule table, ensuring that fuzzy control can adjust the control focus according to the core needs of different scenarios, generating control variables that are deeply adapted to scenario characteristics and battery state, and providing a clear variable basis for the fuzzification processing and rule reasoning in step 42.

[0116] The technical essence of step 43 is to transform the control value obtained by defuzzification into hardware execution instructions adapted to the scenario. By dynamically adjusting the charging and discharging thresholds and the equalization replenishment current, the closed-loop optimization of the initial energy distribution scheme is achieved. This is different from traditional fixed threshold control or independent equalization logic, so that the energy distribution not only adapts to the current scenario's power requirements, but also takes into account the battery degradation state and cell consistency, balancing the driving range and battery life.

[0117] Preferably, the specific implementation process of step 43 is as follows: First, obtain the three output variable control values ​​output in step 423, namely the maximum discharge rate control value (denoted as D_max_ctrl, which physically means the ratio of the maximum allowable battery discharge current to the rated capacity, in C), the maximum charge rate control value (denoted as C_max_ctrl, which physically means the ratio of the maximum allowable battery charge current to the rated capacity, in C), and the equalization current control value (denoted as I_bal_ctrl, which physically means the magnitude of the equalization current used for cell voltage equalization, in A). At the same time, extract the current scene type locked in step 3 and the battery state feature configuration generated in step 1 to determine the priority of the control logic for scene adaptation. For example, in the climbing scene, the adjustment of the maximum discharge rate is the core priority; in the long downhill scene, the adjustment of the maximum charge rate and the equalization current is the core priority; and in the flat road scene, the three are adjusted in a balanced manner to provide scene guidance for instruction conversion.

[0118] Preferably, in the specific technical implementation of step 43, the battery discharge threshold is dynamically adjusted based on the maximum discharge rate control value D_max_ctrl. The discharge threshold includes the upper limit of discharge current (denoted as I_dis_max, which physically means the maximum current allowed to be output by the battery, in A) and the upper limit of discharge power (denoted as P_dis_max, which physically means the maximum power allowed to be output by the battery, in W). The calculation logic of the upper limit of discharge current I_dis_max is the product of D_max_ctrl and the rated capacity of the battery (denoted as C_rated, which physically means the nominal capacity of the battery, in Ah), that is, I_dis_max = D_max_ctrl × C_rated. For example, for a battery with a rated capacity of 10Ah, when D_max_ctrl is 5C, I_dis_max is 50A (example). The calculation logic of the upper limit of discharge power P_dis_max is the product of the upper limit of discharge current I_dis_max and the real-time terminal voltage of the battery (denoted as U_b, extracted from the battery state characteristic configuration), that is, P_dis_max = I_dis_max × U_b. The discharge threshold is adjusted based on the current scenario type: In hill climbing scenarios, if the predicted energy consumption is in the high range, P_dis_max can be increased by 5%-10% (8% in this example) to ensure peak power; in flat road scenarios, if the battery degradation coefficient is in the high range, I_dis_max can be decreased by 10%-15% (12% in this example) to avoid overloading of high-degradation batteries; in start-stop transition scenarios, a discharge current rise rate limit is set (general range 2-5A / s, 3A / s in this example) to suppress starting inrush current. The adjusted discharge current upper limit and discharge power upper limit are integrated into a discharge control threshold command, which is sent to the discharge control module of the Battery Management System (BMS) to regulate the current output of the motor power supply circuit.

[0119] Preferably, in the specific technical implementation of step 43, the battery charging threshold is dynamically adjusted based on the maximum charging rate control value C_max_ctrl. The charging threshold includes the upper limit of charging current (denoted as I_cha_max, which physically means the maximum current allowed to be input by the battery, in A) and the upper limit of charging voltage (denoted as U_cha_max, which physically means the highest charging voltage allowed by the battery, in V). The calculation logic for the upper limit of charging current I_cha_max is the product of C_max_ctrl and the battery's rated capacity C_rated, i.e., I_cha_max = C_max_ctrl × C_rated. For example, for a battery with a rated capacity of 10Ah, when C_max_ctrl is 3C, I_cha_max is 30A (example). The upper limit of charging voltage U_cha_max is set according to the battery type as a baseline value (e.g., the baseline voltage of a single lithium battery cell is 3.65V, and the upper limit of the baseline is 21.9V for 6 cells in series). It is corrected by combining the cell voltage difference (denoted as ΔU_cell, extracted from the battery state characteristic profile). When ΔU_cell is in the high range, U_cha_max is lowered by 0.5%-1% in a general range (0.8% is used in the example) to avoid overcharging of batteries with high inconsistency. The charging threshold is adjusted based on the current scenario type: In long downhill scenarios, if the SOC is in the low range, I_cha_max is increased by 10%-15% (10% in this example) to improve energy recovery efficiency; in short downhill scenarios, if the subsequent condition is predicted to be an uphill climb, U_cha_max is maintained at the baseline value to ensure sufficient storage of recovered energy; in high SOC scenarios (SOC > 80%), C_max_ctrl is forced down to the low range (0.5-1C in this example) and U_cha_max is reduced to prevent battery overcharging damage. The adjusted charging current limit and charging voltage limit are integrated into a charging control threshold command and sent to the charging control module of the BMS to regulate the current input of the energy recovery loop.

[0120] Preferably, in the specific technical implementation of step 43, the equalization current is dynamically adjusted based on the equalization current control value I_bal_ctrl. First, the real-time voltage of all cells (denoted as U_cell-i, where i is the cell number) is obtained through the cell voltage detection module. The cell with the lowest voltage (denoted as U_cell_min) and the cell with the highest voltage (denoted as U_cell_max) are determined, and the cell voltage difference ΔU_cell = U_cell_max - U_cell_min is calculated. When ΔU_cell is greater than the preset equalization start threshold (general range 0.05-0.1V, example 0.08V), the active equalization replenishment logic is activated: the energy distribution switch matrix switches to the equalization replenishment channel, and the equalization replenishment current control value I_bal_ctrl is dynamically allocated according to the cell voltage difference. The lower the voltage of the cell, the higher the proportion of replenishment current allocated. For example, the lowest voltage cell is allocated 60% of I_bal_ctrl, the second lowest voltage cell is allocated 30%, and the remaining cells are allocated 10% (example); when ΔU_cell is less than or equal to the equalization start threshold, passive equalization is activated or equalization is stopped. Passive equalization consumes the excess power of the high voltage cell through the energy consumption resistor. The current consumption is set according to 30%-50% of I_bal_ctrl (example 40%) to avoid excessive equalization energy consumption. The equalization current is adjusted based on the current scenario type and SOC status: In long downhill scenarios, if the recovered power is sufficient, I_bal_ctrl is increased by 20%-30% (25% in this example) to accelerate equalization; in high SOC scenarios (SOC > 70%), I_bal_ctrl is decreased by 40%-60% (50% in this example) to maintain only mild equalization; in low SOC scenarios (SOC < 30%), passive equalization is stopped, and active equalization is used to improve cell consistency and avoid energy waste. The equalization current allocation logic and the corrected current value are integrated into an equalization control command, which is sent to the BMS equalization control module and energy distribution switch matrix to regulate the equalization path and current magnitude.

[0121] Preferably, in one scenario, when step 43 is specifically implemented, the discharge control threshold command, charging control threshold command, and equalization control command are integrated into a unified energy distribution control command. The command includes information such as scenario identifier, control parameter value, execution priority, and effective duration to ensure that the hardware modules execute in a coordinated manner. After the BMS receives the control command, the discharge control module limits the motor supply current and power according to the discharge threshold, the charging control module limits the recovered energy input according to the charging threshold, and the equalization control module and energy distribution switch matrix adjust the replenishment current according to the equalization command. The three execute synchronously and provide real-time feedback on the execution status (such as actual discharge current, charging current, and changes in cell voltage difference). The closed-loop logic of steps 41-43 is repeated every preset cycle (general range 0.5-1.5 seconds, 1 second is used as an example). The control command is dynamically updated according to the new battery state parameters and scenario changes to ensure that the energy distribution continuously adapts to changes in operating conditions. This satisfies the energy-saving requirements of flat road cruising, the power requirements of climbing, and the recovery requirements of downhill driving, while also protecting the battery through dynamic thresholds and coordinated equalization to extend the battery cycle life.

[0122] Optionally, step 42 includes: Step 421, constructing a fuzzy rule table adapted to the energy distribution needs of multiple scenarios, including different interval combinations of battery degradation coefficient, cell voltage difference, and energy consumption prediction value, and corresponding output variable values ​​of maximum discharge rate, maximum charging rate, and equalization replenishment current. The input variables are divided into three levels: low, medium, and high according to their numerical range. The fuzzy rule table is adapted to the energy consumption characteristics of the subdivided scenarios; Step 422, inputting the battery degradation coefficient, cell voltage difference, and energy consumption prediction value into the fuzzy inference engine, and combining the rule priority corresponding to the current scenario type to perform fuzzy inference operation to obtain the fuzzy association result of the output variable; Step 423, using the centroid method to perform defuzzification operation on the fuzzy association result to obtain the control value of the output variable.

[0123] The technical essence of step 421 is to construct a scenario-adaptive fuzzy rule table. By finely dividing the input variable range and mapping the output variable in a scenario-based manner, a precise correlation logic between input and output is established. This is different from the problem of the traditional fuzzy rule table having a general variable range division and poor scenario adaptability. It enables targeted rule support for battery charging, discharging and equalization control in different scenarios, ensuring that the fuzzy inference results are consistent with scenario requirements and battery status.

[0124] Preferably, the specific implementation process of step 421 is as follows: First, the construction logic of the fuzzy rule table is clarified. The rule table needs to cover all interval combinations of input variables, and the output variable values ​​need to be adapted to the energy consumption characteristics, power requirements, and battery protection requirements of six scenarios: flat road cruising, gentle slope climbing, steep slope climbing, long downhill coasting, short downhill coasting, and start-stop transition. Input variables include battery degradation coefficient, cell voltage difference, and energy consumption prediction value, all of which are divided into three levels: low, medium, and high, according to their numerical range. Output variables include maximum discharge rate, maximum charging rate, and equalization charging current, the values ​​of which need to be set in combination with scenario characteristics and battery safety thresholds to form a rule system of "three-level input combination - scenario-based output".

[0125] Preferably, in the specific technical implementation of step 421, the three input variables are divided into intervals based on their physical meaning, battery characteristics, and scenario requirements. The battery degradation coefficient (denoted as K_dec, physically representing the ratio of the battery's current actual capacity to its initial rated capacity) is divided into the following intervals: The low interval indicates low battery degradation (general range 0.8-1.0, example 0.9-1.0), indicating good battery performance; the middle interval indicates moderate battery degradation (general range 0.6-0.8, example 0.7-0.9), indicating a slight decrease in battery performance; and the high interval indicates high battery degradation (general range 0-0.6, example 0-0.7), indicating significant battery performance degradation. Cell voltage difference (denoted as ΔU_cell, physically meaning the difference between the highest and lowest cell voltages in the battery pack) is divided into the following ranges: Low range indicates good cell consistency (general range 0-0.1V, example 0-0.08V); Medium range indicates moderate cell consistency (general range 0.1-0.2V, example 0.08-0.15V); High range indicates poor cell consistency (general range 0.2-0.5V, example 0.15-0.3V). The predicted energy consumption value (denoted as P_pred, which physically means the energy consumption per unit mile in the future preset period) is divided into the following ranges: the low range is for low energy consumption demand (general range 10-20Wh / km, example 12-18Wh / km), corresponding to scenarios such as cruising on flat roads; the middle range is for medium energy consumption demand (general range 20-35Wh / km, example 18-30Wh / km), corresponding to scenarios such as gentle slope climbing and start-stop transitions; the high range is for high energy consumption demand (general range 35-50Wh / km, example 30-45Wh / km), corresponding to scenarios such as steep slope climbing.

[0126] Preferably, in the specific technical implementation of step 421, the value range of the output variable and the scene adaptation rules are set based on the scene characteristics. The value range of the maximum discharge rate (denoted as D_max, which physically means the ratio of the maximum allowable discharge current of the battery to the rated capacity) is as follows: the low range output is a low discharge rate (general range 1-3C, for example 1.5-2.5C), which is suitable for high-degradation batteries or low-energy consumption scenarios; the middle range output is a medium discharge rate (general range 3-6C, for example 2.5-5C), which is suitable for medium-degradation batteries or medium-energy consumption scenarios; the high range output is a high discharge rate (general range 6-10C, for example 5-8C), which is suitable for low-degradation batteries or high-energy consumption scenarios, and the D_max value of the same input combination is higher in the climbing scenario than in the flat road scenario. The maximum charging rate (denoted as C_max, which physically means the ratio of the battery's maximum allowable charging current to its rated capacity) ranges as follows: the low range outputs a low charging rate (general range 0.5-1.5C, example 0.8-1.2C), suitable for high SOC or high attenuation scenarios; the medium range outputs a medium charging rate (general range 1.5-3C, example 1.2-2.5C), suitable for medium SOC scenarios; the high range outputs a high charging rate (general range 3-5C, example 2.5-4C), suitable for low SOC or downhill recovery scenarios, and the C_max value for the same input combination is higher in long downhill scenarios than in other scenarios. The range of the equalization current (denoted as I_bal, which physically refers to the magnitude of the equalization current used for cell equalization) is as follows: The low range output is a low equalization current (general range 0.1-0.5A, example 0.2-0.4A), suitable for scenarios with good cell consistency; the middle range output is a medium equalization current (general range 0.5-1.5A, example 0.4-1.2A), suitable for scenarios with moderate cell consistency; the high range output is a high equalization current (general range 1.5-3A, example 1.2-2.5A), suitable for scenarios with poor cell consistency, and the I_bal value for the same input combination is higher in long downhill scenarios than in other scenarios.

[0127] Preferably, in the specific technical implementation of step 421, the core rule entries of the fuzzy rule table are constructed, covering 27 interval combinations of all input variables, and the output variable value corresponding to each rule is clearly defined. For example: 1. When the battery degradation coefficient is in the low interval, the cell voltage difference is in the low interval, and the energy consumption prediction value is in the low interval (a typical combination for flat road cruising scenarios), the output maximum discharge rate is moderately low (e.g., 2.5C), the maximum charge rate is moderate (e.g., 1.5C), and the equalization charging current is low (e.g., 0.3A); 2. When the battery degradation coefficient is in the low interval, the cell voltage difference is in the low interval, and the energy consumption prediction value is in the high interval (a typical combination for steep slope climbing scenarios), the output maximum discharge rate is high (e.g., 7C), the maximum charge rate is low (e.g., 1C), and the equalization charging current is low (e.g., 0.3A); 3. When the battery degradation coefficient is in the middle range, the cell voltage difference is in the high range, and the energy consumption prediction value is in the middle range (a typical combination for long downhill scenarios), the maximum output discharge rate is medium (3C for example), the maximum charge rate is high (3.5C for example), and the equalization current is high (2A for example); 4. When the battery degradation coefficient is in the high range, the cell voltage difference is in the middle range, and the energy consumption prediction value is in the middle range (a typical combination for gentle uphill scenarios), the maximum output discharge rate is low (2C for example), the maximum charge rate is medium (1.8C for example), and the equalization current is medium (0.8A for example).

[0128] Preferably, in a specific implementation of step 421 within a given scenario, the fuzzy rule table is optimized for scenario adaptation by adding a scenario priority identifier to each rule, thus clarifying the effective weight of the rule in different scenarios. For example, rules for long downhill scenarios have the highest effective weight in this scenario (general weight percentage 70%-80%, 75% in this example), while rules for other scenarios have lower effective weights (general weight percentage 20%-30%, 25% in this example); rules for uphill scenarios have the highest effective weight in uphill scenarios, while rules for other scenarios have lower effective weights. Simultaneously, the rule table supports dynamic updates, adjusting the values ​​of output variables according to a set period (general period 1-3 months, 2 months in this example) based on the input-output relationships in actual operational data, ensuring the adaptability and accuracy of the rule table and providing precise, scenario-based rule support for subsequent fuzzy inference.

[0129] The technical essence of step 422 is to establish a precise mapping between the fuzzy set of input variables and the fuzzy association result of output variables by adapting the priority of scenario-based rules and performing fuzzy inference operations with multiple input variables. This is different from the traditional fuzzy inference mode that ignores scenario differences and applies rules equally. This makes the inference result not only fit the real-time state of the battery, but also deeply adapt to the energy consumption characteristics and control requirements of the current scenario, ensuring the pertinence and rationality of energy distribution control.

[0130] Preferably, the specific implementation process of step 422 is as follows: First, obtain the three fuzzy sets of input variables after fuzzification processing, namely the fuzzy set of battery degradation coefficient (denoted as F_K, containing three fuzzy subsets of low, medium, and high, physically representing the fuzzy representation of battery degradation state), the fuzzy set of cell voltage difference (denoted as F_ΔU, containing three fuzzy subsets of low, medium, and high, physically representing the fuzzy representation of cell consistency), and the fuzzy set of energy consumption prediction value (denoted as F_P, containing three fuzzy subsets of low, medium, and high, physically representing the fuzzy representation of subsequent energy consumption demand). At the same time, extract the current scene type locked in step 3 (such as flat road cruising, steep slope climbing, etc.), call the scene-based fuzzy rule table constructed in step 421, determine the rule priority weight corresponding to the current scene, and provide scene guidance for fuzzy inference.

[0131] Preferably, in the specific technical implementation of step 422, a scenario-based rule priority allocation logic is designed, and the rule effectiveness weight is set based on the core control requirements of different scenarios. For example, the core requirement of the flat road cruising scenario is energy saving and battery protection. Therefore, the priority weight of rules related to low energy consumption prediction and low battery degradation coefficient is set to the highest (general weight ratio 60%-70%, 65% for example), the priority weight of the balancing rules related to high cell voltage difference is medium (general weight ratio 20%-30%, 25% for example), and the priority weight of rules related to high discharge rate is the lowest (general weight ratio 10%-20%, 10% for example). The core requirement of the steep slope climbing scenario is to ensure power output. Therefore, the priority weight of the high discharge rate rules related to high energy consumption prediction and low battery degradation coefficient is the highest (general weight ratio 60%-70%, 68% for example), and the priority weight of rules related to cell voltage difference is low. Rules related to voltage difference have a low priority weight (general weight 15%-25%, 20% for example), and rules related to high charging rate have the lowest priority weight (general weight 5%-15%, 12% for example). The core requirements for long downhill scenarios are efficient recycling and cell balancing. Therefore, rules related to balancing and charging with high cell voltage difference and medium-low energy consumption prediction have the highest priority weight (general weight 60%-70%, 66% for example), rules related to battery degradation coefficient have a medium priority weight (general weight 20%-30%, 24% for example), and rules related to high discharge rate have the lowest priority weight (general weight 10%-20%, 10% for example).

[0132] Preferably, in the specific technical implementation of step 422, the core logic of performing fuzzy inference operations is fuzzy subset matching and membership degree synthesis based on rule priority. First, all rule entries in the fuzzy rule table are traversed, and the antecedent (input variable interval combination) of each rule is matched with the corresponding fuzzy set of input variables. The rule activation strength (denoted as μ, which physically represents the degree of fit between the rule and the state of the input variables, with a value range of 0-1) is calculated. The activation strength is calculated using the minimum operation, i.e., μ = min(membership degree of input variable 1, membership degree of input variable 2, membership degree of input variable 3). For example, if the antecedent of a rule is "low battery degradation coefficient, medium cell voltage difference, and high energy consumption prediction value", and the membership degree of the "low" subset in the fuzzy set of battery degradation coefficient is 0.9, the membership degree of the "medium" subset in the fuzzy set of cell voltage difference is 0.7, and the membership degree of the "high" subset in the fuzzy set of energy consumption prediction value is 0.8, then the activation strength of this rule is μ = min(0.9, 0.7, 0.8) = 0.7.

[0133] Preferably, in the specific technical implementation of step 422, the activation intensity of each rule is corrected based on the rule priority weight of the current scenario. The corrected activation intensity (denoted as μ') = original activation intensity μ × rule priority weight. For example, in a flat road cruising scenario, if the priority weight of the above rule is 10%, then the corrected activation intensity μ' = 0.7 × 10% = 0.07; if the priority weight of the rule in a steep slope climbing scenario is 68%, then the corrected activation intensity μ' = 0.7 × 68% = 0.476. After correction, the corrected activation intensities of all rules are categorized according to the output variable type (maximum discharge rate, maximum charging rate, equalization charging current), and all rules under the same output variable form an activation intensity set.

[0134] Preferably, in one scenario, when implementing step 422, a fuzzy synthesis operation is performed on the activation intensity set of each output variable. The synthesis logic uses a maximum value operation, meaning that the final membership degree of each fuzzy subset of the output variable is the maximum value of the activation intensities after rule correction for all rules corresponding to that subset. For example, in the fuzzy set of maximum discharge rate, the activation intensities after rule correction for the three rules corresponding to the "high" subset are 0.476, 0.35, and 0.28, respectively. Therefore, the final membership degree of the "high" subset is max(0.476, 0.35, 0.28) = 0.476; the activation intensities after rule correction for the "medium" subset are 0.32, 0.25, and 0.18, respectively. Therefore, the final membership degree of the "medium" subset is 0.32; and the activation intensities after rule correction for the "low" subset are 0.15, 0.08, and 0.07, respectively. Therefore, the final membership degree of the "low" subset is 0.15. By integrating the fuzzy subsets and corresponding final membership degrees of the three output variables, a fuzzy association result of the output variables is formed. This result not only reflects the fuzzy state of the input variables, but also incorporates the rule priority guidance of the current scenario, providing accurate fuzzy domain data support for subsequent defuzzification operations.

[0135] The technical essence of step 423 is to defuzzify the operation by using the centroid method with scenario-based correction, and to transform the fuzzy correlation results of the output variables into precise and executable control values. This is different from the traditional general centroid method, which ignores the characteristics of the scenario. It makes the defuzzification results not only consistent with the logical consistency of fuzzy reasoning, but also deeply adapted to the power demand and battery protection requirements of the current scenario, providing a precise quantitative basis for the generation of subsequent energy distribution control commands.

[0136] Preferably, the specific implementation process of step 423 is as follows: First, obtain the fuzzy correlation results of the three output variables output in step 422, namely, the fuzzy correlation result of the maximum discharge rate (denoted as F_Dmax, which includes three fuzzy subsets of low, medium and high and their corresponding membership degrees, and physically represents the fuzzy domain representation of the maximum discharge rate), the fuzzy correlation result of the maximum charging rate (denoted as F_Cmax, which includes three fuzzy subsets of low, medium and high and their corresponding membership degrees, and physically represents the fuzzy domain representation of the maximum charging rate), and the fuzzy correlation result of the equalization charging current (denoted as F_Ibal, which includes three fuzzy subsets of low, medium and high and their corresponding membership degrees, and physically represents the fuzzy domain representation of the equalization charging current). At the same time, extract the current scene type locked in step 3, call the scene-based centroid method to correct the parameters, and set a clear domain interval and weight correction coefficient that are adapted to the scene for each output variable to ensure that the defuzzification process conforms to the battery working characteristics and power output requirements of Ebike under different driving scenarios.

[0137] Preferably, in the specific technical implementation of step 423, the fuzzy subset center value and the scene-defined clear domain interval of each output variable are clearly defined. The center value settings for the fuzzy subsets of maximum discharge rate are as follows: the center value of the low subset (denoted as D_low, which physically means the benchmark value of the low discharge rate range) is the benchmark value of the low rate range adapted to the characteristics of conventional Ebike batteries (e.g., 2C); the center value of the middle subset (denoted as D_mid, which physically means the benchmark value of the medium discharge rate range) is the benchmark value of the medium rate range adapted to the characteristics of conventional Ebike batteries (e.g., 4C); and the center value of the high subset (denoted as D_high, which physically means the benchmark value of the high discharge rate range) is the benchmark value of the high rate range adapted to the characteristics of conventional Ebike batteries (e.g., 7C). The scenario-specific clear ranges are as follows: for flat road cruising scenarios, the discharge rate range matching the needs of smooth driving (e.g., 1.5-4.5C); for hill climbing scenarios, the discharge rate range matching the needs of high power (e.g., 3.5-8.5C); and for downhill scenarios, the discharge rate range matching the needs of energy recovery and smooth gliding (e.g., 2-5C). The center value settings for the fuzzy subsets of the maximum charging rate are as follows: the center value of the low subset (denoted as C_low) is the baseline value for the low rate range adapted to the charging characteristics of regular Ebike batteries (1C for example), the center value of the middle subset (denoted as C_mid) is the baseline value for the medium rate range adapted to the charging characteristics of regular Ebike batteries (2C for example), and the center value of the high subset (denoted as C_high) is the baseline value for the high rate range adapted to the charging characteristics of regular Ebike batteries (4C for example); its scenario-specific clear domain range is as follows: for flat road cruising scenarios, it is the charging rate range matching regular charging needs (0.8-2.5C for example), for hill climbing scenarios, it is the charging rate range matching low energy replenishment needs (0.8-1.8C for example), and for downhill scenarios, it is the charging rate range matching energy recovery charging needs (1.2-4C for example). The center value settings for the fuzzy subsets of the equalization charging current are as follows: the center value of the low subset (denoted as I_low) is the reference value for the small current range that adapts to the equalization needs of regular Ebike battery cells (0.3A for example); the center value of the middle subset (denoted as I_mid) is the reference value for the medium current range that adapts to the equalization needs of regular Ebike battery cells (1A for example); and the center value of the high subset (denoted as I_high) is the reference value for the large current range that adapts to the equalization needs of regular Ebike battery cells (2A for example). The scenario-specific clear ranges are as follows: for flat road cruising scenarios, the current range that matches the regular equalization needs (0.2-1.2A for example); for hill climbing scenarios, the current range that matches the low-interference equalization needs (0.2-0.8A for example); and for downhill scenarios, the current range that matches the high-efficiency equalization needs (0.6-2.2A for example).

[0138] Preferably, in the specific technical implementation of step 423, the centroid method calculation for scenario-based correction is performed. The core logic is to calculate the centroid value of the output variable by combining the scenario weight correction coefficient, which serves as the final control value. First, the sum of the products of the membership degree of each fuzzy subset of the output variable and the corresponding center value is calculated. Then, the sum of the membership degrees of all fuzzy subsets is calculated to obtain the uncorrected centroid value (denoted as V_raw). The calculation logic is that the uncorrected centroid value is equal to the sum of the products of the membership degree of each fuzzy subset and the corresponding center value divided by the sum of the membership degrees of all fuzzy subsets. The membership degree of each fuzzy subset is the membership degree corresponding to the low, medium, and high fuzzy subsets, and the center value is the center value of the corresponding fuzzy subset. Then, based on the current scene type, the scene weight correction coefficient (denoted as K_scene, which physically means the correction ratio of the scene to the defuzzification result) is called. The scene weight correction coefficient for flat road cruise scene is set to the ratio that matches the stable energy consumption requirement (0.95 for example), the scene weight correction coefficient for climbing scene is set to the ratio that matches the high power output requirement (1.05 for example), and the scene weight correction coefficient for downhill scene is set to the ratio that matches the energy recovery and smooth gliding balance requirement (1.0 for example). The corrected control value (denoted as V_ctrl) is equal to the product of the uncorrected center of gravity value and the scene weight correction coefficient.

[0139] Preferably, in the specific implementation of step 423, scenario-based boundary constraint processing is performed on the corrected control value to ensure that the control value is within the clear domain range of the corresponding scenario. If the corrected control value is lower than the lower limit of the clear domain, it is forcibly constrained to the lower limit value of the clear domain; if it is higher than the upper limit of the clear domain, it is forcibly constrained to the upper limit value of the clear domain; if it is within the range, the original corrected value remains unchanged. For example, in the climbing scenario, the uncorrected center of gravity value of the maximum discharge rate is 7.5C, the scenario weight correction coefficient is 1.05, and the corrected control value is 7.875C. Its clear domain range is 3.5-8.5C. If it is within the range, it is directly used as the maximum discharge rate control value; if the corrected control value is 9C, which exceeds the upper limit of 8.5C, it is constrained to 8.5C to avoid accelerated battery degradation due to excessively high discharge rate.

[0140] Preferably, in a scenario, when step 423 is specifically implemented, the control values ​​of the three output variables are calculated according to the above logic. Taking a steep slope climbing scenario as an example: In the fuzzy association result of the maximum discharge rate, the membership degrees of the low, medium, and high subsets are 0.15, 0.32, and 0.476, respectively, and the center values ​​are 2C, 4C, and 7C, respectively. The uncorrected centroid value is obtained by calculating the sum of the products of each membership degree and the corresponding center value and then dividing by the sum of the membership degrees, which is approximately 5.2C. The scenario weight correction coefficient is 1.05, and the corrected control value is the product of 5.2C and 1.05, which is approximately 5.46C. Its clear domain range is 3.5-8.5C, and the final maximum discharge rate control value is 5.46C. In the fuzzy association result of the maximum charging rate, the membership degrees of the low, medium, and high subsets are 0.4, 0.35, and 0.1, respectively, and the center values ​​are 1C, 2C, and 4C, respectively. The uncorrected centroid value is obtained by calculating the sum of the products of each membership degree and the corresponding center value and then dividing by the sum of the membership degrees, which is approximately 5.2C. The sum of the products of membership degree and corresponding centroid value, divided by the sum of membership degrees, yields approximately 1.63C. The scene weight correction coefficient is 1.0, and the corrected control value is 1.63C, with a sharp domain range of 0.8-1.8C. The final maximum charging rate control value is 1.63C. In the fuzzy association results of the balanced charging current, the membership degrees of the low, medium, and high subsets are 0.6, 0.25, and 0.08, respectively, and the centroid values ​​are 0.3A, 1A, and 2A, respectively. The uncorrected centroid value is approximately 0.57A obtained by calculating the sum of the products of each membership degree and corresponding centroid value, divided by the sum of membership degrees. The scene weight correction coefficient is 1.0, and the corrected control value is 0.57A, with a sharp domain range of 0.2-0.8A. The final balanced charging current control value is 0.57A. The final control values ​​of the three output variables are integrated to form a set of output variable control values, which provides a precise quantitative basis for the adjustment of the charging and discharging threshold and the regulation of the equalization replenishment current in step 43. This ensures that the control commands not only conform to fuzzy reasoning logic, but also adapt to the high power demand and battery safety protection requirements of Ebike's steep hill climbing scenario.

[0141] This application provides a computer-readable storage medium storing at least one instruction or at least one program, which is loaded and executed by a processor to implement the multi-scenario Ebike battery energy optimization distribution control method as described in any of the above claims.

[0142] like Figure 2 As shown in the embodiment of this application, an electronic device is provided. The electronic device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or the at least one program is loaded and executed by the processor to implement the multi-scenario Ebike battery energy optimization distribution control method as described in any of the above claims.

[0143] This application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, they implement the multi-scenario Ebike battery energy optimization and distribution control method as described above.

Claims

1. A method for optimizing battery energy distribution and control in multiple scenarios for Ebikes, characterized in that, include: Step 1: Obtain the battery status parameters, power load parameters, and environmental road condition parameters of Ebike, and construct a three-dimensional feature matrix of "road condition-load-battery"; Step 2: Based on the three-dimensional feature matrix of "road condition-load-battery", call the energy consumption prediction model to calculate the predicted energy consumption value for the future preset period; Step 3: According to the real-time operating parameters and energy consumption prediction value in the three-dimensional feature matrix of "road condition-load-battery", determine the current scene type through the multi-dimensional threshold of the dynamic scene recognition module, and call the hierarchical energy allocation strategy of the corresponding scene to generate an initial energy allocation scheme that matches the current scene type. Step 4: Based on the initial energy allocation scheme, start the fuzzy control closed-loop feedback submodule. Through input variable fuzzification, rule reasoning and defuzzification calculation, dynamically adjust the charging and discharging threshold and equalization replenishment current, and generate energy allocation control commands to perform dynamic optimization allocation of battery energy. Step 1 includes: Step 11, collecting battery SOC, battery terminal voltage, and charge / discharge current to form battery state parameters, combining the battery cycle count to fit a capacity decay curve to calculate the battery decay coefficient, and integrating the features to generate a battery state feature profile; Step 12, collecting motor load power, motor speed, and user cadence to form power load parameters, and generating a power load feature profile through load feature correlation calculation; Step 13, collecting road slope and ambient wind speed to form environmental road condition parameters, and generating an environmental road condition feature profile through road condition parameter standardization; Step 14, fusing the battery state feature profile, power load feature profile, and environmental road condition feature profile to construct a three-dimensional feature matrix of "road condition-load-battery"; The energy consumption prediction model includes a feature encoding layer, a scene adaptation attention layer, a temporal feature fusion layer, and a prediction output layer. Step 2 includes: Step 21, the feature encoding layer performs feature dimension compression and key information extraction on the three-dimensional feature matrix of "road condition-load-battery" based on the energy consumption correlation characteristics of multiple scenarios, and selects the core features that are strongly correlated with the energy consumption of flat road, uphill, and downhill scenarios to generate encoded feature vectors; Step 22, the scene adaptation attention layer combines the dominant factors of energy consumption in different scenarios and performs scene adaptation weighted operations on the encoded feature vectors, including strengthening the slope and motor in uphill scenarios. The load power feature weights are calculated as follows: for flat road scenarios, the weights of cadence and SOC are strengthened, and for downhill scenarios, the weights of wind speed and recycling efficiency are strengthened to generate a weighted feature vector; Step 23: The time-series feature fusion layer fuses the weighted feature vector with the battery degradation coefficient in a time-series manner to highlight the energy consumption change pattern of the battery under different degradation states in various scenarios and generate a scenario-degradation fusion feature tensor; Step 24: The prediction output layer performs multi-scenario energy consumption time-series modeling on the scenario-degradation fusion feature tensor, performs time-series prediction calculations, and outputs the predicted energy consumption value for the future preset time period; Step 4 includes: Step 41, the fuzzy control closed-loop feedback submodule takes the initial energy allocation scheme, including battery attenuation coefficient, cell voltage difference, and energy consumption prediction value, as input variables, and the maximum discharge rate, maximum charge rate, and equalization replenishment current as output variables; Step 42, performs fuzzification processing on the input variables to generate fuzzy sets, performs rule reasoning on the fuzzy sets based on a preset fuzzy rule table to obtain the fuzzy association result of the output variables, and obtains the control value of the output variables by defuzzification operation on the fuzzy association result; Step 43, dynamically adjusts the battery charging and discharging threshold and equalization replenishment current based on the control value, generates energy allocation control commands, and regulates the battery charging and discharging process and the cell equalization process.

2. The multi-scenario Ebike battery energy optimization and distribution control method according to claim 1, characterized in that, Step 3 includes: Step 31, based on historical multi-scenario energy consumption data and battery degradation characteristics, a scenario type library is formed by weighting and combining five parameters: road slope, motor load power, user cadence, ambient wind speed, and energy consumption prediction value. This library includes flat road cruising, gentle slope climbing, steep slope climbing, long downhill coasting, short downhill coasting, and start-stop transition. Step 32, real-time operating parameters are extracted from the "road condition-load-battery" three-dimensional feature matrix. Multi-parameter collaborative verification is performed on the real-time operating parameters in combination with the energy consumption prediction value, and the parameters are matched with the scenario type library to determine the current scenario type. Step 33, a dedicated layered energy allocation strategy is executed according to the current scenario type to generate an initial energy allocation scheme that is deeply adapted to the scenario characteristics, battery status, and energy consumption prediction.

3. The multi-scenario Ebike battery energy optimization and distribution control method according to claim 2, characterized in that, Step 33 includes: Step 331, the exclusive layered energy allocation strategy for the flat road cruise scenario is a dynamic adaptation layered strategy of "cadence-energy consumption-power". Based on the comparison between the energy consumption prediction value and the historical energy consumption characteristics of the flat road cruise scenario in the scenario type library, the power following coefficient is corrected in layers. The basic following coefficient is used in the low energy consumption range, the enhanced following coefficient is used in the medium energy consumption range, and the energy-saving following coefficient is used in the high energy consumption range. The user's cadence is extracted from the three-dimensional feature matrix of "road condition-load-battery" every preset period, and the motor output power is finely adjusted in layers. At the same time, a differentiated fluctuation threshold is set according to the power range to limit the rate of output change, and an initial energy allocation scheme is generated that is deeply adapted to the characteristics of the flat road cruise scenario, the battery status and the energy consumption prediction.

4. The multi-scenario Ebike battery energy optimization and distribution control method according to claim 2, characterized in that, Step 33 includes: Step 332, the exclusive layered energy allocation strategy for gentle slope climbing scenarios is a "load grading - energy replenishment grading" collaborative strategy. Combining the load characteristic thresholds of gentle slope climbing scenarios in the scenario type library, the load is divided into three levels of load ranges: low, medium, and high according to the motor load power. In the low load range, only conventional rate battery cells are used for power supply. In the medium load range, the energy storage capacitor is triggered to replenish energy at the first ratio. In the high load range, the energy storage capacitor replenishes energy at the second ratio. The exclusive layered energy allocation strategy for steep slope climbing scenarios is a "dual-path parallel - dynamic layered power supply" strategy. Referring to the attenuation adaptation rules of steep slope climbing scenarios in the scenario type library, the system is layered according to the dual dimensions of motor load power and battery attenuation coefficient. In the low attenuation high load range, the high rate battery cells account for the first ratio, and in the high attenuation high load range, the energy storage capacitor power supply accounts for the second ratio. The dual-path power supply current allocation ratio is dynamically adjusted to generate an initial energy allocation scheme that is deeply adapted to the characteristics of climbing scenarios, battery status, and energy consumption prediction.

5. The multi-scenario Ebike battery energy optimization and distribution control method according to claim 2, characterized in that, Step 33 includes: Step 333, the exclusive layered energy allocation strategy for long downhill gliding scenarios is a three-level layered strategy of "recovery-balancing-replenishment". Based on the recovery parameter benchmark of long downhill gliding scenarios in the scenario type library, the first level adjusts the recovery power according to wind speed, the second level executes the balancing logic according to the cell voltage difference, and the third level allocates the replenishment priority according to the battery SOC. After the energy recovered by the motor is stabilized by the voltage conversion module, the high SOC range is given priority to replenish the low voltage cells. When the cell voltage difference drops to the set threshold, it switches to the average replenishment mode, and generates an initial energy allocation scheme that is deeply adapted to the long downhill gliding scenario, battery status and energy consumption prediction.

6. The multi-scenario Ebike battery energy optimization and distribution control method according to claim 2, characterized in that, Step 33 includes: Step 334, the exclusive layered energy allocation strategy for the short downhill coasting scenario is the "recovery grading - energy storage grading - standby adaptation" strategy. Based on the working condition association model of the short downhill coasting scenario in the scenario type library, the recovery intensity is adjusted according to the predicted energy consumption value to predict the subsequent working conditions. The first intensity of recovery is adopted for the predicted flat road working conditions, and the second intensity of recovery is adopted for the predicted climbing working conditions. The recovered electrical energy is stored in layers according to the remaining capacity of the energy storage capacitor. At the same time, the power output threshold is reserved in layers according to the standby priority, and an initial energy allocation scheme is generated that is deeply adapted to the short downhill coasting scenario, battery status and energy consumption prediction.

7. An electronic device, the device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the multi-scenario Ebike battery energy optimization distribution control method as described in any one of claims 1-6.