OTA upgrading method and device and power-assisted riding control system
By connecting the assisted cycling control system to the OTA server to obtain and distribute OTA upgrade packages, the problem of helping bicycles in the existing technology is solved and data loss of system upgrade data is lost, achieving efficient and real-time OTA upgrades.
Patent Information
- Application Number
- CN202411851039.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing bicycles cannot be connected to the Internet, and the system upgrade can only be burned and upgraded through external devices, which can easily lead to data loss.
By establishing a connection between the riding control system and the OTA server, obtaining and verifying the OTA upgrade package, and distributing it to the target module according to the module identification code, executing the upgrade program, the OTA upgrade of wireless communication methods is realized.
It solves the problems of space limitations and data loss that helps bicycle upgrade, improves upgrade efficiency, and realizes real-time upgrades and parameter configuration updates.
Smart Images

Figure CN119883310A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data information processing technology, and specifically to an OTA upgrade method, device and power-assisted riding control system. Background Art
[0002] A power-assisted bicycle is a mechatronic vehicle that uses a battery as an auxiliary energy source and is installed on the bicycle. It also has a motor, a motor management unit, a battery, a throttle, a brake handle and other operating components, and a display instrument system. With the development of electric power-assisted bicycles, they are becoming more and more intelligent. Through various personalized adjustment settings, power-assisted bicycles are becoming more intelligent.
[0003] However, most of the existing power-assisted bicycles are fully assembled bicycles and cannot be connected to the Internet. When the power-assisted bicycle system is updated and upgraded, it can only be burned and upgraded through an external upgrade device, and the system upgrade of the power-assisted bicycle is a full system upgrade, which is prone to data loss during the upgrade process. Summary of the invention
[0004] In view of the above problems, the embodiments of the present invention provide an OTA upgrade method, device and power-assisted riding control system to solve the problem that most of the power-assisted bicycles in the prior art are fully equipped bicycles and cannot be connected to the Internet; when the power-assisted bicycle system is updated and upgraded, it can only be burned and upgraded through an external upgrade device, and the system upgrade of the power-assisted bicycle is a full system upgrade, data loss is prone to occur during the upgrade process.
[0005] According to one aspect of an embodiment of the present invention, an OTA upgrade method is provided, which is applied to a power-assisted bicycle with a power-assisted riding control system; the method comprises: Establish a connection between the power-assisted riding control system and the OTA server; Query and / or receive an OTA upgrade package pushed by an OTA server, and verify the OTA upgrade package; Querying the module identification code of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code; An upgrade program is executed according to the OTA upgrade package to overwrite the original code or configuration of the target module, and the power-assisted riding control system is restarted after the target module is upgraded.
[0006] In some optional embodiments, querying and obtaining an OTA upgrade package from an OTA server specifically includes: Establishing a connection between the power-assisted riding control system and a mobile terminal and communicating with an OTA server through the mobile terminal, or directly connecting the power-assisted riding control system to the OTA server; Send an upgrade request to the OTA server through the power-assisted riding control system or mobile terminal; The OTA upgrade package version of the OTA server is verified. If the verification passes, the OTA upgrade package is read from the memory of the OTA server.
[0007] In some optional embodiments, receiving an OTA upgrade package pushed by an OTA server specifically includes: Establishing a connection between the power-assisted riding control system and a mobile terminal and communicating with an OTA server through the mobile terminal, or directly connecting the power-assisted riding control system to the OTA server; The OTA server initiates an upgrade query to the power-assisted riding control system; After receiving the confirmation upgrade information, the OTA upgrade package version of the OTA server is verified. If the verification is successful, the OTA server pushes a new OTA upgrade package to the power-assisted riding control system. Otherwise, the upgrade inquiry is initiated again after a preset time.
[0008] In some optional embodiments, when the power-assisted bicycle is in a riding state, after the user accepts the upgrade inquiry and confirms it, the power-assisted riding control system stops providing the power source, and the power-assisted bicycle adjusts from the assisted riding state to the human-powered riding state; the power-assisted riding control system restarts after the upgrade is completed and sends a message to the user whether to enter the assisted riding state.
[0009] In some optional embodiments, the OTA upgrade package version verification of the OTA server specifically includes: Perform the first verification on the vehicle model version of the OTA upgrade package. If the first verification passes, proceed to the next step. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. Perform a second verification on the hardware version of the OTA upgrade package. If the second verification passes, proceed to the next step. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The software version of the OTA upgrade package is verified for the third time. If the third verification passes, the OTA upgrade package is downloaded or pushed to the power-assisted riding control system. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The OTA server sends the OTA upgrade package to the power-assisted riding control system through differential packet transmission or full packet transmission.
[0010] In some optional embodiments, verifying the OTA upgrade package specifically includes: When generating the OTA update package, the private key is used to sign the OTA update package, and after the power-assisted riding control system receives the complete OTA update package, the signature of the OTA update package is verified by the public key corresponding to the private key; Alternatively, when generating an OTA upgrade package, a hash algorithm is used to generate a first hash value of the OTA upgrade package, and after the power-assisted riding control system receives the complete OTA upgrade package, a second hash value of the OTA upgrade package is recalculated, and the second hash value is compared with the first hash value for verification.
[0011] In some optional embodiments, querying the module identification code of the OTA upgrade package and distributing the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code specifically includes: Determine the target module of the corresponding power-assisted riding control system by querying and comparing the name of the OTA upgrade package or the ID field of the OTA upgrade package, and distribute the OTA upgrade package to the target module of the power-assisted riding control system; The target module includes at least one or more of a main control module, a drive module, a battery module, a display module and a sensor module.
[0012] In some optional embodiments, when the power-assisted riding control system has multiple target modules to be upgraded, it also includes: According to the priority or update time of the OTA upgrade package, the target modules to be upgraded are sorted; According to the upgrade sequence, an OTA upgrade package is sent to the target module, and the target module is upgraded according to the OTA upgrade package, and an upgrade completion instruction is sent to the power-assisted riding control system after the target module is upgraded; The power-assisted riding control system sends an OTA upgrade package to the next target module according to the upgrade completion instruction and the upgrade sequence, and upgrades the next target module according to the OTA upgrade package until all target modules are upgraded.
[0013] According to another aspect of an embodiment of the present invention, an OTA upgrade device is provided, the device comprising: An OTA acquisition module is used to establish a connection between the power-assisted riding control system and the OTA server, query and obtain and / or receive the OTA upgrade package pushed by the OTA server, and verify the OTA upgrade package; An OTA distribution module, used to query the module identification code of the OTA upgrade package, and distribute the OTA upgrade package to a target module of the power-assisted riding control system according to the module identification code; And an upgrade execution module, which is used to execute the upgrade program according to the OTA upgrade package, overwrite the original code or original configuration of the target module, and restart the power-assisted riding control system after the target module is upgraded.
[0014] According to another aspect of an embodiment of the present invention, there is provided a power-assisted riding control system, which is integrated in a power-assisted bicycle, the system comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations such as the above-mentioned OTA upgrade method.
[0015] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention establishes a connection between the power-assisted riding control system and the OTA server, so that the power-assisted riding control system can obtain the OTA upgrade package through wireless communication, instead of burning and upgrading through an external upgrade device, thus removing the upgrade space limitation and greatly improving the upgrade efficiency.
[0016] (2) The OTA upgrade package of the present invention is an upgrade package of the target module of the power-assisted riding control system or a power-assisted control upgrade package for partial or overall upgrade, which can not only reduce the size of the upgrade package and the traffic consumption during the upgrade process, but also avoid data loss during the upgrade process.
[0017] (3) The OTA upgrade method of the present invention can be used to upgrade the power-assisted bicycle in real time during riding by stopping the power-assisted riding control system from providing the power-assisted riding source, so that the power-assisted bicycle can be adjusted from the assisted riding state to the human-powered riding state, so as to timely update the parameter configuration of the power-assisted bicycle and adjust the bicycle riding mode in real time, so as to improve riding convenience and timeliness of upgrade.
[0018] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings: Figure 1 A schematic diagram of the process of the OTA upgrade method provided by the present invention is shown; Figure 2 A schematic diagram of a process flow when a power-assisted riding control system provided by the present invention has multiple target modules to be upgraded is shown; Figure 3 The structure diagram of the OTA upgrade device provided by the present invention is shown; Figure 4The structure diagram of the power-assisted riding control system provided by the present invention is shown; Figure 5 A schematic diagram showing the connection between the power-assisted riding control system provided by the present invention and the OTA server is shown; Figure 6 The OTA upgrade package version verification for the OTA server provided by the present invention is shown. DETAILED DESCRIPTION
[0020] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0021] Embodiment 1: Figure 1 An embodiment of an OTA upgrade method of the present invention is shown, which is applied to a power-assisted bicycle with a power-assisted riding control system. When the power-assisted bicycle is in a driving state or a stopped state, the power-assisted riding control system can be OTA upgraded to improve the functions of the power-assisted bicycle or update the configuration parameters of the power-assisted bicycle, thereby improving the riding effect. The method specifically includes: 110, establish a connection between the power-assisted riding control system and the OTA server; in step 110, establish a connection between the power-assisted riding control system and the mobile terminal and communicate with the OTA server through the mobile terminal, or directly connect the power-assisted riding control system to the OTA server. In a specific example, the power-assisted riding control system can be provided with a wireless communication module, and the wireless communication module can be directly connected to the OTA server, or the wireless communication module can be connected to the OTA server through the mobile terminal.
[0022] 120, query to obtain and / or receive the OTA upgrade package pushed by the OTA server, and verify the OTA upgrade package; in step 120, the OTA upgrade package can be obtained by sending an upgrade request to the OTA server through the power-assisted riding control system or the mobile terminal; the OTA upgrade package version of the OTA server is verified, and if the verification is successful, the OTA upgrade package is read from the memory of the OTA server; the OTA upgrade package can also be obtained by initiating an upgrade query to the power-assisted riding control system through the OTA server; after receiving the confirmation upgrade information, the OTA upgrade package version of the OTA server is verified, and if the verification is successful, the OTA server pushes a new OTA upgrade package to the power-assisted riding control system, otherwise the upgrade query is initiated again after a preset time. The OTA upgrade package can be verified by signing the OTA upgrade package with a private key and verifying it with a public key. Or the OTA upgrade package is verified by a hash algorithm. If the OTA upgrade package verification passes, step 130 is executed. Otherwise, the OTA upgrade package is obtained again.
[0023] 130, query the module identification code of the OTA upgrade package, and distribute the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code; in step 130, query the module identification code of the OTA upgrade package, and distribute the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code, specifically including: determining the corresponding target module of the power-assisted riding control system by querying and comparing the name of the OTA upgrade package or the ID field of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system; wherein the target module includes at least any one or more of a main control module, a drive module, a battery module, a display module and a sensor module.
[0024] 140, execute the upgrade program according to the OTA upgrade package, overwrite the original code or configuration of the target module, and restart the power-assisted riding control system after the target module is upgraded; in step 140, after the target module receives the complete upgrade package, start to execute the upgrade program according to the OTA upgrade package, overwrite the original code or configuration with the upgrade code or upgrade configuration of the OTA upgrade package, and realize the OTA upgrade of the power-assisted bicycle.
[0025] By executing steps 110-140, an OTA upgrade of a power-assisted bicycle with fewer functional modules and limited integration space is achieved, solving the problem that the prior art can only perform upgrades through external upgrade devices. The present invention establishes a connection between the power-assisted riding control system and the OTA server, so that the power-assisted riding control system can obtain the OTA upgrade package through wireless communication, instead of performing upgrades through external upgrade devices, removing the upgrade space limitation and greatly improving the upgrade efficiency. The OTA upgrade package of the present invention is an upgrade package for a target module of the power-assisted riding control system or a power-assisted control upgrade package for partial or overall upgrades, which can not only reduce the size of the upgrade package and the traffic consumption during the upgrade process, but also avoid data loss during the upgrade process.
[0026] In step 110, the power-assisted riding control system is connected to the mobile terminal and communicated with the OTA server through the mobile terminal, or the power-assisted riding control system is directly connected to the OTA server; wherein the power-assisted riding control system may be provided with a wireless communication module, the wireless communication module may be directly connected to the OTA server, or the wireless communication module may be connected to the OTA server through the mobile terminal. The wireless communication module may be Wi-Fi, cellular network, 5G, Bluetooth, ZigBee, digital radio, etc. Figure 5, the power-assisted riding control system 510 is connected to the mobile terminal 520 via Bluetooth or ZigBee, and the mobile terminal 520 is connected to the OTA server 530 via WiFi or 5G or cellular network or data transmission radio, wherein the mobile terminal can be a mobile phone, tablet, etc. In addition, the power-assisted riding control system 510 can also integrate wireless communication modules such as WiFi or 5G or cellular network or data transmission radio, and directly connect the power-assisted riding control system 510 to the OTA server 530 through the wireless communication module. In addition, the power-assisted riding control system can be connected to the mobile terminal via a wired connection.
[0027] In step 120, the OTA upgrade package of the OTA server is queried, specifically including: sending an upgrade request to the OTA server through the power-assisted riding control system or the mobile terminal; verifying the OTA upgrade package version of the OTA server, and reading the OTA upgrade package from the memory of the OTA server if the verification is successful. In this embodiment, the power-assisted riding control system or the mobile terminal can be used to actively query whether the OTA server has an OTA upgrade package and perform an autonomous update. The power-assisted riding control system will check whether there is an available update regularly or upon user request. Once an update is detected, the power-assisted riding control system will start downloading the OTA upgrade package.
[0028] In one implementation of this embodiment, due to the lightweight design of the power-assisted bicycle, it is difficult to integrate a communication module such as WiFi or 5G with a certain volume and large power consumption into the power-assisted bicycle. The power-assisted bicycle needs to be upgraded by a mobile terminal. Since the upgrade takes a long time, the present invention can choose to actively upgrade during riding, that is, the power-assisted riding control system stops providing the power source, and the power-assisted bicycle adjusts the human riding state from the auxiliary riding state. Actively upgrade during riding.
[0029] In addition, receiving the OTA upgrade package pushed by the OTA server may include: establishing a connection between the power-assisted riding control system and the mobile terminal and communicating with the OTA server through the mobile terminal, or directly connecting the power-assisted riding control system to the OTA server; the OTA server initiates an upgrade inquiry to the power-assisted riding control system; after receiving confirmation of the upgrade information, verifying the OTA upgrade package version of the OTA server, if the verification passes, the OTA server pushes a new OTA upgrade package to the power-assisted riding control system, otherwise initiating an upgrade inquiry again after a preset time.
[0030] In the above example, the OTA upgrade package version of the OTA server is verified, see Figure 6 , including: Perform the first verification on the vehicle model version of the OTA upgrade package. If the first verification passes, proceed to the next step. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The vehicle model version may include one or more of the vehicle model information, configuration information, batch information, and regional information. When the vehicle model version has multiple sets of information, the multiple sets of information can be authenticated one by one in turn. Only when all the information is verified, proceed to the next step; otherwise, the verification fails. The vehicle model information can be the model of the power-assisted bicycle, the configuration information can be the high-end, medium-end, or low-end of the power-assisted bicycle, the batch information can be the factory batch, production batch, or generation year, and the regional information is the country or region where the power-assisted bicycle is located. The vehicle model version of the OTA upgrade package needs to be consistent with the vehicle model version of the currently upgraded power-assisted riding control system, otherwise it is easy to cause the power-assisted riding control system product to collapse and become unusable.
[0031] The hardware version of the OTA upgrade package is verified for the second time. If the second verification passes, the next step is performed. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The hardware version can be the hardware information of the current power-assisted bicycle when it leaves the factory or the hardware information that is added, modified, or deleted after it leaves the factory. The hardware version of the OTA upgrade package needs to be consistent with the hardware version of the currently upgraded power-assisted riding control system, otherwise it is easy to cause the power-assisted riding control system product to collapse and become unusable.
[0032] The software version of the OTA upgrade package is verified for the third time. If the third verification passes, the OTA upgrade package will be downloaded or pushed to the power-assisted riding control system. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The software version can be the system version of the power-assisted riding control system or the module version of each module. Only after the first and second verifications are completed and the vehicle model version and hardware version are confirmed to be consistent, can the new OTA upgrade package be confirmed by the new and old software versions. If it is a new OTA upgrade package, it will be downloaded or pushed to the power-assisted riding control system, otherwise it will not be updated.
[0033] Through the above steps, the present invention can verify the OTA upgrade package multiple times, thereby preventing an erroneous OTA upgrade package from being downloaded to the power-assisted riding control system, which not only occupies the memory space of the power-assisted riding control system, but also prevents the upgrade program from being erroneously executed in the power-assisted riding control system, turning the entire system into a brick, thereby rendering the software information of the power-assisted bicycle unusable.
[0034] In one implementation of this embodiment, the present invention can receive upgrade push during riding, and can touch the display module of the power-assisted bicycle to confirm whether to upgrade. When the upgrade is selected, the power-assisted riding control system stops providing the power source, and the power-assisted bicycle adjusts from the assisted riding state to the human riding state.
[0035] In addition, when the power-assisted bicycle is being tested or racing, the driving parameters of the driving module of the power-assisted bicycle can be adjusted in real time through the OTA upgrade package, such as adjusting the power-assisted riding ratio, maximum speed limit, etc., so as to adjust the power-assisted bicycle to meet different test conditions or different racing conditions; thereby improving the testing efficiency or competition ability of the power-assisted bicycle.
[0036] In the above embodiments, it should be noted that the power-assisted bicycle has a human-powered riding state, an assisted riding state, and an electric riding state when riding; wherein, the human-powered riding state is a state in which the rider's pedaling force is used as the driving source, the assisted riding state is a state in which the rider's pedaling force and the motor's electric driving force are dual driving sources, and the electric riding state is a state in which the pure motor's electric driving force is used as the driving source.
[0037] When the power-assisted bicycle is undergoing an OTA upgrade, it can be upgraded in real time by switching the assisted riding state and the electric riding state to the human riding state, providing more options for OTA upgrades and being more in line with the OTA upgrade state of power-assisted bicycles. After the upgrade is completed, the power-assisted riding control system restarts and sends a message to the user whether it has entered the assisted riding state, which can restore the assisted riding state or the electric riding state, and can quickly replace the program or parameter configuration of the power-assisted riding control system, thereby achieving fast OTA upgrade capabilities.
[0038] In another implementation of the above embodiment, if the OTA upgrade package is a major upgrade of the entire system of the power-assisted riding control system and the system upgrade depends on the hardware module, the power-assisted bicycle needs to be upgraded in the parking state, and during the upgrade process, the display of the power-assisted bicycle displays "System upgrade in progress, do not start the vehicle" to remind the user to start the power-assisted bicycle to avoid the situation where some hardware devices cannot work properly during the upgrade process due to the shaking of the body during riding, or the situation where communication is difficult due to being away from the mobile terminal. Improve the OTA upgrade stability of the power-assisted bicycle. In some optional embodiments, the OTA server sends the OTA upgrade package to the power-assisted riding control system through differential packet transmission or full packet transmission. When the overall data volume of the OTA upgrade package is small, it can be upgraded through the full packet transmission method. The principle of OTA differential packet upgrade is based on the comparison and difference extraction of binary files. When generating a differential packet, the system compares the binary data between the old version of the firmware and the new version of the firmware, finds the difference between them, and packages these difference data into a differential packet. This differential packet is usually much smaller than the complete firmware package, so it can greatly reduce the time and bandwidth required for transmission. Through the OTA differential packet upgrade, the parameters of the power-assisted bicycle can be quickly upgraded and replaced, and the OTA upgrade efficiency can be improved.
[0039] In step 110, the OTA upgrade package is verified, specifically including: When generating an OTA upgrade package, the private key is used to sign the OTA upgrade package, and after the power-assisted riding control system receives the complete OTA upgrade package, the signature of the OTA upgrade package is verified by the public key corresponding to the private key; in this embodiment, the use of the private key to sign the OTA upgrade package ensures the integrity and authenticity of the OTA upgrade package and prevents tampering during transmission. If the signature verification passes, it means that the OTA upgrade package has not been tampered with during transmission and can be safely installed.
[0040] In addition, when generating an OTA upgrade package, a hash algorithm is used to generate a first hash value of the OTA upgrade package, and after the power-assisted riding control system receives the complete OTA upgrade package, the second hash value of the OTA upgrade package is recalculated, and the second hash value is compared with the first hash value for verification; in this embodiment, the hash algorithm can be a SHA-256 algorithm, and a first hash value of the upgrade package is generated when the OTA upgrade package is generated. The first hash value serves as the unique identifier of the upgrade package and is used in the subsequent verification process. In the power-assisted riding control system, the second hash value of the downloaded OTA upgrade package is recalculated and compared with the hash value provided by the OTA server. If the two are consistent, it means that the OTA upgrade package remains intact during the transmission process and is not damaged or tampered with.
[0041] In step 130, the module identification code of the OTA upgrade package is queried, and the OTA upgrade package is distributed to the target module of the power-assisted riding control system according to the module identification code, specifically including: determining the corresponding target module of the power-assisted riding control system by querying and comparing the name of the OTA upgrade package or the ID field of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system; wherein the target module includes at least one or more of the main control module, the drive module, the battery module, the display module and the sensor module. In the present application, the target module can be identified according to the name of the OTA upgrade package. In a specific example, Drive_2024.11.10_OTA_Upgrade_Package indicates that the OTA upgrade package is a drive module upgrade package; it can be sent to the drive module through the internal lines of the power-assisted riding control system, such as the I2C line, and the drive module performs the upgrade.
[0042] like Figure 2As shown, when the power-assisted riding control system has multiple target modules to be upgraded, it also includes: 210, upgrading the target modules to be upgraded according to the priority or update time of the OTA upgrade package; 220, sending the OTA upgrade package to the target module according to the upgrade sequence, and upgrading the target module according to the OTA upgrade package, and sending the upgrade completion instruction to the power-assisted riding control system after the first target module completes the upgrade; 230, the power-assisted riding control system sends the OTA upgrade package to the next target module according to the upgrade completion instruction and the upgrade sequence, and upgrades the next target module according to the OTA upgrade package until all target modules are upgraded. In this embodiment, the present invention can be upgraded according to the priority of the target module, such as: drive module> main control module> battery module> sensor module> display module, and the power-assisted riding control system is upgraded in sequence in this order to avoid upgrade conflicts.
[0043] The OTA upgrade method of the present invention also provides a difference processing and fault tolerance mechanism. 1. Handling of human factors Considering that the user needs to keep the mobile phone connected to the bicycle during the upgrade process, some fault-tolerant mechanisms can be designed, such as pausing the upgrade when the user is disconnected, saving the current progress, and continuing the upgrade after the user reconnects.
[0044] 2. Power-off protection To prevent problems caused by power outages during the upgrade process, key data can be backed up before the upgrade, and the battery power can be checked regularly during the upgrade process. When the power is low, the upgrade will be paused and the user will be prompted to charge. It can be seen that the OTA upgrade method of the present invention transmits data or signals in the air through a wireless network, providing the power-assisted riding control system with the ability to remotely update or manage. The present invention can achieve a major breakthrough in the remote control of power-assisted bicycles. At the same time, in order to ensure the successful implementation of the OTA update, the present invention also takes into account issues such as network stability, device compatibility and data security, and has high reliability.
[0045] Embodiment 2: Figure 3 The schematic diagram of the structure of an embodiment of the OTA upgrade device of the present invention is shown, and an OTA upgrade device 300 is provided. The device includes an OTA acquisition module 310, an OTA distribution module 320 and an upgrade execution module 330. Specifically, The OTA acquisition module 310 is used to execute step 110 and step 120. The OTA acquisition module 310 is specifically used to establish a connection between the power-assisted riding control system and the mobile terminal and communicate with the OTA server through the mobile terminal, or directly connect the power-assisted riding control system to the OTA server; the OTA upgrade package can be obtained by sending an upgrade request to the OTA server through the power-assisted riding control system or the mobile terminal; if there is a new OTA upgrade package on the OTA server, the OTA upgrade package is read from the memory of the OTA server; the OTA upgrade package can also be obtained by initiating an upgrade inquiry to the power-assisted riding control system through the OTA server; if the upgrade is confirmed, the OTA server pushes a new OTA upgrade package to the power-assisted riding control system, otherwise the upgrade inquiry is initiated again after a preset time. The OTA upgrade package can be verified by signing the OTA upgrade package with a private key and verifying it with a public key. Or the OTA upgrade package can be verified by a hash algorithm. If the OTA upgrade package passes the verification, step 130 is executed. Otherwise, the OTA upgrade package is obtained again.
[0046] The OTA distribution module 320 is used to execute step 130. The OTA distribution module 320 is specifically used to query the module identification code of the OTA upgrade package, and distribute the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code, specifically including: determining the corresponding target module of the power-assisted riding control system by querying and comparing the name of the OTA upgrade package or the ID field of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system; wherein the target module includes at least any one or more of a main control module, a drive module, a battery module, a display module and a sensor module.
[0047] The upgrade execution module 330 is used to execute step 140. The upgrade execution module 330 is specifically used to start executing the upgrade program according to the OTA upgrade package after receiving the complete upgrade package through the target module, and overwrite the original code or configuration with the OTA upgrade package upgrade code or upgrade configuration to achieve OTA upgrade of the power-assisted bicycle.
[0048] The present invention establishes a connection between the power-assisted riding control system and the OTA server, so that the power-assisted riding control system can obtain the OTA upgrade package through wireless communication, instead of burning and upgrading through an external upgrade device, removing the upgrade space limitation and greatly improving the upgrade efficiency. The OTA upgrade package of the present invention is an upgrade package of the target module of the power-assisted riding control system or a power-assisted control upgrade package for partial or overall upgrade, which can not only reduce the size of the upgrade package and the traffic consumption during the upgrade process, but also avoid data loss during the upgrade process. The OTA upgrade method of the present invention can be used during the riding process, by stopping the power-assisted riding control system from providing a power source, and adjusting the power-assisted bicycle from an auxiliary riding state to a human riding state mode, so as to perform real-time upgrades on the power-assisted bicycle, so as to timely update the parameter configuration of the power-assisted bicycle, and adjust the bicycle riding mode in real time, so as to improve riding convenience and timeliness of upgrades.
[0049] Embodiment 3: Figure 4 The schematic diagram of the structure of an embodiment of the power-assisted riding control system of the present invention is shown. The present invention is integrated into a power-assisted bicycle. The specific embodiment does not limit the specific implementation of the power-assisted riding control system.
[0050] like Figure 4 As shown, the power-assisted riding control system may include: a processor (processor) 410 , a communications interface (Communications Interface) 420 , a memory (memory) 430 , and a communication bus 440 .
[0051] The processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The communication interface 520 is used to communicate with other devices such as a client or other server network elements. The processor 410 is used to execute the program 450, which can specifically execute the relevant steps in the above-mentioned embodiment of the intelligent parameter adjustment method.
[0052] Specifically, program 450 may include program code including computer executable instructions.
[0053] The processor 410 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the power-assisted bicycle may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0054] The memory 430 is used to store the program 450. The memory 430 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0055] The program 450 can be specifically called by the processor 410 to enable the power-assisted bicycle to perform the following operations: 110, establish a connection between the power-assisted riding control system and the OTA server; 120, querying and / or receiving an OTA upgrade package pushed by an OTA server, and verifying the OTA upgrade package; 130, querying the module identification code of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code; 140 , executing an upgrade program according to the OTA upgrade package to overwrite the original code or configuration of the target module, and restarting the power-assisted riding control system after the target module is upgraded.
[0056] The present invention establishes a connection between the power-assisted riding control system and the OTA server, so that the power-assisted riding control system can obtain the OTA upgrade package through wireless communication, instead of burning and upgrading through an external upgrade device, removing the upgrade space limitation and greatly improving the upgrade efficiency. The OTA upgrade package of the present invention is an upgrade package of the target module of the power-assisted riding control system or a power-assisted control upgrade package for partial or overall upgrade, which can not only reduce the size of the upgrade package and the traffic consumption during the upgrade process, but also avoid data loss during the upgrade process. The OTA upgrade method of the present invention can be used during the riding process, by stopping the power-assisted riding control system from providing a power source, and adjusting the power-assisted bicycle from an auxiliary riding state to a human riding state mode, so as to perform real-time upgrades on the power-assisted bicycle, so as to timely update the parameter configuration of the power-assisted bicycle, and adjust the bicycle riding mode in real time, so as to improve riding convenience and timeliness of upgrades.
[0057] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.
[0058] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0059] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0060] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. An OTA upgrade method, characterized in that: Applied to a power-assisted bicycle with a power-assisted riding control system; the method comprises: Establish a connection between the power-assisted riding control system and the OTA server; Query and / or receive an OTA upgrade package pushed by an OTA server, and verify the OTA upgrade package; Querying the module identification code of the OTA upgrade package, and distributing the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code; An upgrade program is executed according to the OTA upgrade package to overwrite the original code or configuration of the target module, and the power-assisted riding control system is restarted after the target module is upgraded.
2. The OTA upgrade method according to claim 1, characterized in that: Query and obtain the OTA upgrade package from the OTA server, including: Establishing a connection between the power-assisted riding control system and a mobile terminal and communicating with an OTA server through the mobile terminal, or directly connecting the power-assisted riding control system to the OTA server; Send an upgrade request to the OTA server through the power-assisted riding control system or mobile terminal; The OTA upgrade package version of the OTA server is verified. If the verification passes, the OTA upgrade package is read from the memory of the OTA server.
3. The OTA upgrade method according to claim 1, characterized in that: Receive the OTA upgrade package pushed by the OTA server, including: Establishing a connection between the power-assisted riding control system and a mobile terminal and communicating with an OTA server through the mobile terminal, or directly connecting the power-assisted riding control system to the OTA server; The OTA server initiates an upgrade query to the power-assisted riding control system; After receiving the confirmation upgrade information, the OTA upgrade package version of the OTA server is verified. If the verification is successful, the OTA server pushes a new OTA upgrade package to the power-assisted riding control system. Otherwise, the upgrade inquiry is initiated again after a preset time.
4. The OTA upgrade method according to claim 3, characterized in that: When the power-assisted bicycle is in a riding state, after the user accepts the upgrade inquiry and confirms it, the power-assisted riding control system stops providing the power source, and the power-assisted bicycle adjusts from the assisted riding state to the human riding state; the power-assisted riding control system restarts after the upgrade is completed and sends a message to the user whether to enter the assisted riding state.
5. The OTA upgrade method according to any one of claims 2 to 4, characterized in that: The OTA upgrade package version verification of the OTA server specifically includes: Perform the first verification on the vehicle model version of the OTA upgrade package. If the first verification passes, proceed to the next step. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. Perform a second verification on the hardware version of the OTA upgrade package. If the second verification passes, proceed to the next step. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The software version of the OTA upgrade package is verified for the third time. If the third verification passes, the OTA upgrade package is downloaded or pushed to the power-assisted riding control system. Otherwise, the OTA upgrade package verification fails and the OTA upgrade is not performed. The OTA server sends the OTA upgrade package to the power-assisted riding control system through differential packet transmission or full packet transmission.
6. The OTA upgrade method according to claim 5, characterized in that: Verifying the OTA upgrade package includes: When generating the OTA update package, the private key is used to sign the OTA update package, and after the power-assisted riding control system receives the complete OTA update package, the signature of the OTA update package is verified by the public key corresponding to the private key; Alternatively, when generating an OTA upgrade package, a hash algorithm is used to generate a first hash value of the OTA upgrade package, and after the power-assisted riding control system receives the complete OTA upgrade package, a second hash value of the OTA upgrade package is recalculated, and the second hash value is compared with the first hash value for verification.
7. The OTA upgrade method according to claim 1, characterized in that: The querying of the module identification code of the OTA upgrade package and distributing the OTA upgrade package to the target module of the power-assisted riding control system according to the module identification code specifically includes: Determine the target module of the corresponding power-assisted riding control system by querying and comparing the name of the OTA upgrade package or the ID field of the OTA upgrade package, and distribute the OTA upgrade package to the target module of the power-assisted riding control system; The target module includes at least one or more of a main control module, a drive module, a battery module, a display module and a sensor module.
8. The OTA upgrade method according to claim 7, characterized in that: When the power-assisted riding control system has multiple target modules to be upgraded, it also includes: According to the priority or update time of the OTA upgrade package, the target modules to be upgraded are sorted; According to the upgrade sequence, an OTA upgrade package is sent to the target module, and the target module is upgraded according to the OTA upgrade package, and an upgrade completion instruction is sent to the power-assisted riding control system after the target module is upgraded; The power-assisted riding control system sends an OTA upgrade package to the next target module according to the upgrade completion instruction and the upgrade sequence, and upgrades the next target module according to the OTA upgrade package until all target modules are upgraded.
9. An OTA upgrade device, characterized in that: The device comprises: An OTA acquisition module is used to establish a connection between the power-assisted riding control system and the OTA server, query and obtain and / or receive the OTA upgrade package pushed by the OTA server, and verify the OTA upgrade package; An OTA distribution module, used to query the module identification code of the OTA upgrade package, and distribute the OTA upgrade package to a target module of the power-assisted riding control system according to the module identification code; And an upgrade execution module, which is used to execute the upgrade program according to the OTA upgrade package, overwrite the original code or original configuration of the target module, and restart the power-assisted riding control system after the target module is upgraded.
10. A power-assisted riding control system, characterized in that: Integrated in a power-assisted bicycle, the system comprises: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the OTA upgrade method as described in any one of claims 1-8.
Citation Information
Patent Citations
Upgrading method and system for whole shared electric bicycle control system
CN109857443A
Software upgrading method and device, electronic device and storage medium
CN113434181A
Electric vehicle instrument OTA upgrading method and device and storage medium
CN117032755A
Cited By
OTA program upgrading method and device, electronic equipment and storage medium
CN121367952A