Firmware upgrading method, wearable device, storage medium and computer program product

By backing up the firmware data of the data processing module in the wearable device to an external storage space and performing version rollback in case of upgrade failure, the reliability problem in the firmware upgrade process is solved, ensuring that the device can operate normally under any circumstances, thereby improving the stability of the device and the user experience.

CN123030201APending Publication Date: 2026-11-03GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510571637.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2026-11-03

Smart Images

  • Figure CN123030201A_ABST
    Figure CN123030201A_ABST
Patent Text Reader

Abstract

The application discloses a firmware upgrading method, a wearable device, a storage medium and a computer program product, relates to the technical field of wearable devices, and comprises the following steps: acquiring a firmware upgrading instruction about a data processing module in the wearable device; according to the firmware upgrading instruction, backing up current version firmware data in the data processing module to an external storage space outside the data processing module; acquiring new version firmware upgrading data, and sending the firmware upgrading data to the data processing module for firmware upgrading; and in the case that the data processing module fails in firmware upgrading, sending the current version firmware data to the data processing module for firmware version rollback. The application can realize the technical effect of improving the reliability of firmware upgrading of the wearable device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wearable device technology, and in particular to a firmware upgrade method, wearable device, storage medium, and computer program product. Background Technology

[0002] With the development of smart wearable devices, products combining AI technology with wearable devices have gained widespread attention due to their unique advantages in human-computer interaction and scenario applications. For example, AI glasses can leverage the powerful computing capabilities of AI to achieve intelligent interaction, enabling functions such as voice recognition, image recognition, and natural language processing, providing users with more convenient information access, intelligent reminders, real-time translation, and other services.

[0003] The core components of AI glasses have their own specific functions. For example, the ISP (Image Signal Processor), as the core component for high-definition image acquisition and processing in AI glasses, is crucial for improving image quality, fixing vulnerabilities, and expanding functionality through firmware upgrades. However, current firmware upgrade processes are unreliable when encountering abnormal situations such as network interruptions, power fluctuations, or data transmission errors, causing the device to malfunction. Summary of the Invention

[0004] The main objective of this application is to provide a firmware upgrade method, a wearable device, a storage medium, and a computer program product, aiming to solve the technical problem of low reliability in firmware upgrades for wearable devices.

[0005] To achieve the above objectives, this application proposes a firmware upgrade method for wearable devices, the method comprising:

[0006] Obtain firmware upgrade instructions for the data processing module in the wearable device;

[0007] According to the firmware upgrade instruction, the current version firmware data in the data processing module is backed up to an external storage space outside the data processing module;

[0008] Obtain the firmware upgrade data for the new version and send the firmware upgrade data to the data processing module for firmware upgrade;

[0009] If the firmware upgrade of the data processing module fails, the current firmware version data will be sent to the data processing module for firmware version rollback.

[0010] In some embodiments, the step of backing up the current version firmware data in the data processing module to an external storage space outside the data processing module includes:

[0011] Send a version read command to the data processing module and receive the current version firmware data fed back by the data processing module based on the version read command;

[0012] Write the current firmware data to the external storage space.

[0013] In some embodiments, the step of obtaining the new firmware upgrade data and sending the firmware upgrade data to the data processing module for firmware upgrade includes:

[0014] Download the firmware upgrade data from the cloud server and store it in the external storage space; then send the firmware upgrade data in segments to the data processing module.

[0015] The system receives upgrade status information from the data processing module during the firmware upgrade process and determines whether the data processing module has successfully upgraded based on the upgrade status information.

[0016] In some embodiments, the step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes:

[0017] If the upgrade status information is "upgrade successful", it is determined that the firmware upgrade of the data processing module was successful.

[0018] If the upgrade status information is a data verification failure or an upgrade program execution error, it is determined that the firmware upgrade of the data processing module has failed.

[0019] In some embodiments, the step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes:

[0020] If the upgrade status information indicates that data reception is complete, determine whether the startup time of the data processing module exceeds a preset time.

[0021] If the startup time exceeds a preset time, the firmware upgrade of the data processing module is determined to have failed.

[0022] In some embodiments, the step of sending the current firmware version data to the data processing module for firmware version rollback includes:

[0023] Send a stop upgrade command to the data processing module and read the current version firmware data from the external storage space;

[0024] The current firmware version data is sent to the data processing module, and the firmware version rollback success information is received from the data processing module.

[0025] In some embodiments, before the step of obtaining the new version of firmware upgrade data and sending the firmware upgrade data to the data processing module for firmware upgrade, the method further includes:

[0026] Obtain the firmware version identifier from the firmware upgrade command;

[0027] If the firmware version identifier matches the stored failed version identifier, a firmware upgrade failure message will be output.

[0028] In addition, to achieve the above objectives, this application also proposes a wearable device, the wearable device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the firmware upgrade method as described above.

[0029] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the firmware upgrade method described above.

[0030] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the firmware upgrade method described above.

[0031] One or more technical solutions proposed in this application are applied to wearable devices. They involve obtaining firmware upgrade instructions for a data processing module within the wearable device, instructing the data processing module to perform a firmware upgrade; backing up the current version firmware data of the data processing module to an external storage space outside the data processing module, as the data processing module itself requires sufficient storage space for operation; obtaining new version firmware upgrade data and sending it to the data processing module for firmware upgrade; and performing the firmware upgrade according to a predetermined procedure after receiving the firmware upgrade data. In the event of a firmware upgrade failure, the current version firmware data is sent to the data processing module for firmware version rollback. If the firmware upgrade is successful, the data processing module can operate according to the new version firmware upgrade data; if the firmware upgrade fails, the data processing module can perform a version rollback based on the backed-up current version firmware data, thus preventing the device from malfunctioning. Due to the requirements of thinness and low power consumption in wearable devices, the data processing module is usually not equipped with a very large storage space. It can only meet the storage needs of the firmware for normal operation of the data processing module, which makes backup impossible. In this embodiment, the current version firmware data is backed up to the external storage space. When the firmware upgrade fails, the backed-up data can be used to roll back the version, ensuring that the data processing module can run normally regardless of whether the firmware upgrade is successful or not, reducing the adverse effects of firmware upgrade failure and improving the reliability of firmware upgrade. Attached Figure Description

[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a partial simplified structural diagram of an AI glasses embodiment provided in this application;

[0035] Figure 2 A system architecture diagram of a wearable device provided in this application embodiment;

[0036] Figure 3 A schematic diagram illustrating a firmware upgrade scenario for a wearable device provided in an embodiment of this application;

[0037] Figure 4 This is a flowchart illustrating the first embodiment of the firmware upgrade method of this application;

[0038] Figure 5 A simplified flowchart illustrating the firmware upgrade method provided in this application embodiment;

[0039] Figure 6 This is a schematic diagram of the module structure of the firmware upgrade device according to an embodiment of this application;

[0040] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the firmware upgrade method in this application embodiment.

[0041] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0042] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application. To better understand the technical solutions of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0043] It should be noted that the firmware upgrade method in this application is applied to wearable devices. Wearable devices may include AI glasses, AR glasses, AR helmets, etc., and this application uses AI glasses as an example for illustration. Figure 1 This is a partial simplified structural diagram of an AI glasses embodiment provided in this application, as shown below. Figure 1 As shown, AI glasses are generally similar in appearance to ordinary framed glasses. A camera is set near the lens to collect image data, and function buttons can also be set on the temples of the frame for user operation.

[0044] in addition, Figure 2 This application provides a system architecture diagram for a wearable device, where AI glasses can be adopted as follows: Figure 2 The system architecture shown includes at least an MCU (Microcontroller Unit) and an ISP. The MCU serves as the core control unit for the AI ​​glasses, coordinating the operation of each module via SPI (Serial Peripheral Interface) and I / O. 2Communication interfaces such as C (Inter-Integrated Circuit, bidirectional two-wire synchronous serial bus) connect to the ISP and eMMC (Embedded Multi Media Card), and control the WiFi and Bluetooth modules to achieve data transmission and device connection, possessing data processing and logical judgment capabilities. The ISP is mainly responsible for the acquisition, processing, and optimization of image signals from the AI ​​glasses. Internally, it can be equipped with only a small-capacity NOR Flash to store the firmware. The characteristic of NOR Flash is on-chip execution, so the application can run directly in the Flash memory without having to read the code into the system RAM (Random Access Memory). Compared to the NOR Flash in the ISP, eMMC is a larger-capacity storage device mounted on the periphery of the MCU. The following examples use the MCU in a wearable device as the execution entity to illustrate the various embodiments.

[0045] Figure 3 This is a schematic diagram illustrating a firmware upgrade scenario for a wearable device provided in an embodiment of this application, combined with... Figure 2 , Figure 2 The system architecture can also include a WiFi module and a Bluetooth module. Under the control of the MCU, the WiFi module implements... Figure 3 The AI ​​glasses connect to an external network, while the Bluetooth module is used to achieve this. Figure 3 The AI ​​glasses enable short-range wireless communication with external devices such as smartphones. External devices connected to the AI ​​glasses can also include headphones. Based on the Bluetooth module, the wearable device can receive instructions or data sent by the external device, and at the same time, it can also feed back the status information of the AI ​​glasses to the external device.

[0046] Based on this, this application provides a firmware upgrade method applied to wearable devices, as shown below. Figure 4 , Figure 4 This is a flowchart illustrating the first embodiment of the firmware upgrade method of this application.

[0047] In this embodiment, the firmware upgrade method includes steps S10 to S40:

[0048] Step S10: Obtain firmware upgrade instructions for the data processing module in the wearable device;

[0049] The data processing module refers to the module component in a wearable device that has data processing capabilities, and can include various types of processors, such as... Figure 2The ISP shown below uses the data processing module as an example for explanation. The firmware upgrade command is an instruction to upgrade the firmware of the data processing module. For independently operable electronic products, firmware refers to the software that performs its most basic and lowest-level functions, similar to the definition of an operating system. Firmware upgrade refers to modifying or replacing the underlying software, thereby enabling the hardware to add new functions or function better. ISP firmware upgrades are crucial for improving image quality, fixing vulnerabilities, and expanding functionality.

[0050] Firmware upgrade commands can be sent from external devices via Bluetooth or obtained from the cloud via a WiFi module. For example, AI glasses connect to an external device (phone) via Bluetooth. After being informed that a firmware upgrade is possible, the user instructs the phone to send a firmware upgrade command to the wearable device, which is then received by the MCU.

[0051] Step S20: According to the firmware upgrade instruction, back up the current version firmware data in the data processing module to the external storage space outside the data processing module;

[0052] The current firmware data refers to the firmware data currently used by the ISP for normal operation. External storage space refers to storage space located outside the data processing module but still within the wearable device; for example, Figure 2 The eMMC mounted on the periphery of the MCU can also be Figure 2 Other storage spaces that meet the above storage location conditions, not shown in the diagram, are not specifically limited in this embodiment. The backup process can be considered as copying the current firmware data to external storage space. (Refer to...) Figure 2 In NOR Flash, isp1 represents the current firmware data, while in eMMC, isp1 is the backup of the current firmware data.

[0053] It is understandable that the NOR Flash storage space provided in the ISP is very limited, only enough to meet its normal operation requirements. Although backup cannot be performed using NOR Flash, it can save costs in terms of hardware selection. In this embodiment, during each firmware upgrade, the currently working firmware data is backed up to external storage space first. Even if the firmware upgrade fails, the backup can be used for version rollback.

[0054] In one feasible implementation, step S20 includes the following steps S21 to S22:

[0055] Step S21: Send a version read command to the data processing module and receive the current version firmware data fed back by the data processing module based on the version read command;

[0056] The version read command instructs the data processing module to provide the current firmware version data. Upon receiving a firmware upgrade command, triggering the MCU to perform a firmware data backup, a version read command can be sent to the ISP via the communication interface between the MCU and the ISP. After receiving the version read command, the ISP can also provide the currently running firmware version data from the NOR Flash to the MCU via the communication interface.

[0057] Step S22: Write the current firmware data to the external storage space.

[0058] Reference Figure 2 In this embodiment, the external storage space can be an eMMC mounted on the periphery of the MCU. After the current firmware data writing operation is completed, the eMMC also stores the same isp1 as the NOR Flash. The storage space of the eMMC is larger than that of the NOR Flash, and in addition to the current firmware data, it can also be used to store firmware upgrade packages and other system data.

[0059] This embodiment, without changing the original system architecture of the wearable device, places the backup of the current firmware data in external storage space, which retains the cost advantage in hardware selection and ensures the reliability of firmware upgrades.

[0060] Step S30: Obtain the new version of firmware upgrade data and send the firmware upgrade data to the data processing module for firmware upgrade;

[0061] The new firmware upgrade data refers to the data used to replace the current firmware data and perform a firmware upgrade. Firmware upgrade data can be obtained through communication with external devices or through a connection to the cloud; this embodiment does not impose specific limitations on this. (Refer to...) Figure 2 After obtaining the new firmware upgrade data, the MCU can store it in the eMMC. Figure 2 In this context, isp2 represents the firmware upgrade data for the new version. Thus, the eMMC will simultaneously store the current version firmware data for the old version and the firmware upgrade data for the new version.

[0062] During the firmware upgrade process, the data processing module can first stop running the current firmware version, but still enable some basic functions to maintain stable system operation, such as controlling the power management module to ensure a stable power supply and prevent data loss or hardware damage. After receiving the firmware upgrade data, the data processing module can verify it. Once successful verification confirms that the firmware upgrade data is not corrupted, it writes the firmware upgrade data to its internal storage space; for the ISP, this can be written to the equipped NOR Flash. After the firmware upgrade data is written, firmware boot can be performed. The data processing module starts the firmware according to the set program; successful boot indicates that the firmware upgrade is complete.

[0063] Step S40: If the firmware upgrade of the data processing module fails, send the current version firmware data to the data processing module to perform firmware version rollback.

[0064] A firmware upgrade failure in the data processing module indicates that the module cannot function properly based on the new firmware version. In this case, a firmware version rollback should be performed. After rollback, the module will still use the current firmware version and restore the state before the upgrade, thus maintaining normal operation. Various factors can cause firmware upgrade failures. During the firmware upgrade process, the module should continuously communicate with the MCU, providing feedback on the upgrade progress and status. This allows the MCU to determine if any problems have occurred during the firmware upgrade process.

[0065] In one feasible implementation, the step of sending the current firmware version data to the data processing module for firmware version rollback includes steps S41 to S42:

[0066] Step S41: Send a stop upgrade command to the data processing module and read the current version firmware data from the external storage space;

[0067] The stop upgrade command instructs the data processing module to halt the firmware upgrade process. If the MCU determines that the firmware upgrade has failed, it can stop its own operations during the upgrade process and send a stop upgrade command to the data processing module via the communication interface. Upon receiving the stop upgrade command, the data processing module also stops upgrading and enters a waiting state. The MCU can read the current firmware version data from external storage that contains backups of the current firmware version.

[0068] Step S42: Send the current firmware version data to the data processing module and receive the firmware version rollback success message from the data processing module.

[0069] The firmware version rollback success message indicates that the data processing module has successfully rolled back to the current firmware version. The MCU sends the current firmware version data to the data processing module via the communication interface. Upon receiving the data, the data processing module performs the rollback operation according to a pre-defined procedure, restoring the system to the state before the upgrade. After a successful rollback, it sends a firmware version rollback success message to the MCU. Once the MCU confirms the successful rollback, the AI ​​glasses can upgrade to the current firmware version and function normally.

[0070] Version rollback is performed based on the backed-up current firmware data. This fully utilizes the storage space in the wearable device while maintaining the normal operation of the data processing module and reducing the risk of firmware upgrade failure.

[0071] This embodiment provides a firmware upgrade method applied to a wearable device. It involves obtaining a firmware upgrade instruction for a data processing module within the wearable device, instructing the data processing module to undergo a firmware upgrade. Based on the firmware upgrade instruction, the current version firmware data in the data processing module is backed up to external storage space outside the data processing module. Since the data processing module itself requires sufficient storage space for operation, backing up the current version firmware data to external storage is feasible. New version firmware upgrade data is then obtained and sent to the data processing module for firmware upgrade. Upon receiving the firmware upgrade data, the data processing module can perform the firmware upgrade according to a predetermined procedure. If the firmware upgrade fails, the current version firmware data is sent to the data processing module for firmware version rollback. If the firmware upgrade is successful, the data processing module can operate according to the new version firmware upgrade data. If the firmware upgrade fails, the data processing module can roll back the version based on the backed-up current version firmware data to prevent the device from malfunctioning. Due to the requirements of thinness and low power consumption in wearable devices, the data processing module is usually not equipped with a very large storage space. It can only meet the storage needs of the firmware for normal operation of the data processing module, which makes backup impossible. In this embodiment, the current version firmware data is backed up to the external storage space. When the firmware upgrade fails, the backed-up data can be used to roll back the version, ensuring that the data processing module can run normally regardless of whether the firmware upgrade is successful or not, reducing the adverse effects of firmware upgrade failure and improving the reliability of firmware upgrade.

[0072] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment can be referred to the above description, and will not be repeated hereafter. Based on this, step S30 may include steps S31 to S32:

[0073] Step S31: Download firmware upgrade data from the cloud server and store it in the external storage space; send the firmware upgrade data to the data processing module in segments.

[0074] A cloud server refers to a virtual server that connects to wearable devices via a network. Segmented transmission refers to the method of splitting firmware upgrade data and sending it segment by segment. Firmware upgrade data can be in the form of upgrade packages. The MCU can download the firmware upgrade package from the cloud server via the WiFi module, store the upgrade package in the eMMC, then read the upgrade package from the eMMC, and send the upgrade package segment by segment to the data processing module through the communication interface.

[0075] Step S32: Receive upgrade status information from the data processing module during the firmware upgrade process, and determine whether the data processing module has successfully upgraded based on the upgrade status information.

[0076] Upgrade status information refers to information reflecting the firmware upgrade status of the data processing module. The firmware upgrade process of the data processing module can include different stages such as data reception, data verification, and firmware startup. Each stage can feed back upgrade status information to the MCU, allowing the MCU to determine whether the upgrade was successful. Upgrade status information can include various types, reflecting the status of different stages of the firmware upgrade. Upgrade status information can also be divided into error information and success information based on the execution result of the upgrade operation. Error information indicates that the relevant operations in the firmware upgrade process failed or an abnormal situation occurred, while success information indicates that the relevant operations in the firmware upgrade process were executed successfully. Upon receiving an error message, it is determined that the firmware upgrade of the data processing module has failed. Since success information represents a stage of success in the firmware upgrade process, the last stage of the firmware upgrade failure can be identified first. Upon receiving success information for this stage, it is determined that the firmware upgrade of the data processing module has been successful.

[0077] In one feasible implementation, the step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes steps S321 to S322:

[0078] If the upgrade status information is "upgrade successful", step S321 determines that the data processing module firmware upgrade is successful;

[0079] In this embodiment, the upgrade success message indicates that all firmware upgrade operations of the data processing module have been successfully executed. It can be understood that after completing the operations of receiving upgrade data, verifying data, and starting the new firmware version, and with the new firmware version successfully starting, the data processing module can send an upgrade success message to the MCU. The MCU then uses this upgrade success message to determine that the data processing module can run based on the new firmware version, thus confirming a successful firmware upgrade.

[0080] Step S322: If the upgrade status information is a data verification failure message or an upgrade program execution error message, determine that the data processing module firmware upgrade has failed.

[0081] Data verification failure indicates that the data processing module failed to verify the firmware upgrade data. Upgrade program execution error indicates that an error occurred during the execution of the upgrade program, preventing its complete execution. The upgrade program is a pre-defined program that the data processing module must execute during the firmware upgrade process; it can be a bootloader within the firmware upgrade data. The data processing module can perform system initialization and other operations according to the bootloader to implement the functions defined in the new firmware version. Both data verification failure and upgrade program execution error are reasons for firmware upgrade failure; therefore, the occurrence of either of these two situations confirms that the firmware upgrade by the data processing module has failed.

[0082] Data verification refers to the operation of verifying the integrity and correctness of firmware upgrade data. Data verification can employ verification algorithms, such as the CRC (Cyclic Redundancy Check) algorithm. Taking the CRC algorithm as an example, the data processing module can calculate a checksum for the firmware upgrade data according to a certain polynomial algorithm. This checksum is then compared with the checksum embedded in the firmware upgrade data. If they match, it indicates that the firmware upgrade data has not been corrupted during transmission, the verification is successful, and subsequent write operations can proceed. If they do not match, it indicates that the firmware upgrade data may be corrupted, the data verification fails, and the data processing module reports a data verification failure message.

[0083] The data processing module can execute the upgrade program after receiving the firmware upgrade data. If an error occurs during the execution of the upgrade program, causing the new version of the firmware to fail to start, the module can report the upgrade program execution exception information.

[0084] In one feasible implementation, the step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes steps S323 to S324:

[0085] Step S323: If the upgrade status information is data reception completed, determine whether the startup time of the data processing module exceeds the preset time.

[0086] The "Data reception complete" message indicates that the data processing module has successfully received the firmware upgrade data. In this embodiment, after receiving the firmware upgrade data, the data processing module must also start up normally with the firmware upgrade data. If this condition is met, the upgrade is considered successful. The startup duration refers to the time elapsed from the start of startup to the completion of startup for the data processing module. The preset duration refers to the time condition that the data processing module must meet to start normally with the firmware upgrade data. The preset duration can be set according to actual conditions; this embodiment does not impose specific restrictions on it. The firmware upgrade status can also be determined by whether the startup times out.

[0087] Step S324: If the startup time exceeds the preset time, it is determined that the firmware upgrade of the data processing module has failed.

[0088] The startup timer can be started from the moment the data processing module begins to boot. If the startup is not completed within the preset time after the preset time has elapsed or exceeded, the startup time is considered to have exceeded the preset time. An excessively long startup time is also considered a startup abnormality of the data processing module, thus confirming that the firmware upgrade has failed.

[0089] In this embodiment, the success of the firmware upgrade is determined by various upgrade status information fed back by the data processing module. Multiple influencing factors in the firmware upgrade process are taken into account to ensure that the data processing module can operate stably.

[0090] Based on the above embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to the above embodiments can be referred to the above description, and will not be repeated hereafter. Furthermore, before step S30, steps A10 to A20 are also included:

[0091] Step A10: Obtain the firmware version identifier from the firmware upgrade command;

[0092] A firmware version identifier is an identifier used to distinguish different firmware versions. For example, it can be a version number composed of letters and / or numbers. The firmware upgrade command can carry the firmware version identifier. After receiving the firmware upgrade command, the MCU verifies the firmware version identifier to determine whether to upgrade the firmware version represented by the firmware version identifier.

[0093] Step A20: If the firmware version identifier matches the stored failed version identifier, output a firmware upgrade failure message.

[0094] The failure version identifier refers to the identifier associated with the firmware upgrade data when the firmware upgrade process by the data processing module fails. It can be understood that when the MCU determines that the firmware upgrade has failed, it can record the basis for the failure, such as the data verification failure information in the above embodiment, and record the firmware version identifier of this failed upgrade, storing it as a failure version identifier in the eMMC or other storage space.

[0095] When performing a firmware upgrade again, the system can identify whether the firmware version identifier to be upgraded matches the failed version identifier. If they don't match, it means the firmware upgrade data may have changed and is no longer the failed version; in this case, the subsequent steps to obtain the firmware upgrade data can continue. If they match, it means the firmware upgrade data to be obtained is the same as the previously failed firmware upgrade data; a firmware upgrade failure message can be output to remind the user that this version of firmware has a high risk of upgrade failure. Additionally, the step of obtaining firmware upgrade data can be skipped, reducing redundancy of firmware upgrade data in storage space.

[0096] In this embodiment, by comparing the firmware version identifier with the failed version identifier, the possible upgrade failures during the firmware upgrade process can be predicted in advance, and the user can be reminded as early as possible to interrupt the firmware upgrade process. This can reduce the redundancy of failed firmware upgrade data and save the user time spent on high-risk version upgrade operations.

[0097] For example, to help understand the implementation flow of the firmware upgrade method obtained by combining the above embodiments, please refer to... Figure 5 , Figure 5 A simplified flowchart of a firmware upgrade method is provided. Specifically, the firmware upgrade method includes the steps of firmware backup, firmware upgrade, upgrade result judgment, and upgrade rollback. This embodiment uses AI glasses as a wearable device, an ISP as the data processing module, and an MCU as the execution entity for illustration.

[0098] Firmware Backup: When the AI ​​glasses receive a firmware upgrade command for the ISP (this command can be sent from an external device via Bluetooth or obtained from the cloud via WiFi), the MCU first sends a version read command to the ISP through the communication interface to read the current version firmware data running on the ISP; then, the MCU writes the obtained current version firmware data into the eMMC for storage, completing the backup operation of the firmware version before the ISP upgrade.

[0099] Firmware upgrade: After backup is complete, the MCU downloads the new firmware upgrade data from the cloud server via the WiFi module and stores the firmware upgrade data in the eMMC; the MCU then reads the firmware upgrade data from the eMMC and sends it to the ISP segment by segment through the communication interface; after receiving the firmware upgrade data, the ISP performs the firmware upgrade operation according to the predetermined upgrade procedure, and during the upgrade process, it provides real-time feedback on the upgrade status information to the MCU (such as upgrade progress, data verification results, whether errors have occurred, etc.).

[0100] Upgrade Result Judgment: The MCU determines whether the firmware upgrade was successful based on the upgrade status information fed back by the ISP. If the ISP sends error messages during the upgrade process (such as data verification failure, upgrade program execution abnormality, etc.), or if no upgrade completion feedback is received from the ISP within the specified time, the ISP firmware upgrade is deemed to have failed; if the MCU receives upgrade success feedback from the ISP, the ISP firmware upgrade is deemed to have succeeded.

[0101] Upgrade rollback: When the ISP firmware upgrade is determined to have failed, the MCU immediately stops the current upgrade operation and sends a stop upgrade command to the ISP, causing it to enter a waiting state; the MCU reads the previously backed-up ISP current version firmware data from the eMMC and sends the data to the ISP; after receiving the backed-up data, the ISP performs a rollback operation according to the predetermined procedure, restoring its own firmware to the state before the upgrade; after the rollback is completed, the ISP sends a rollback success feedback message to the MCU, and after the MCU confirms, the AI ​​glasses resume normal operation.

[0102] In this embodiment, the ISP firmware is backed up using the external eMMC of the MCU, effectively solving the problem that the ISP cannot reserve backup space due to the small capacity of NOR Flash, thus providing a reliable guarantee for ISP firmware upgrades. Through a complete firmware backup, upgrade, and rollback process, a usable version can be quickly restored in the event of an ISP upgrade failure, reducing the risk of AI glasses malfunctioning due to ISP upgrade anomalies and improving device stability and user experience. Furthermore, this embodiment is based on the existing hardware resources of the AI ​​glasses, such as the MCU and eMMC, requiring no significant modifications to the ISP hardware, reducing design costs and development difficulty, while improving the overall system integration and reliability. It also integrates WiFi and Bluetooth modules for data interaction and command reception, making AI glasses ISP firmware upgrades more flexible and convenient, meeting upgrade needs in different scenarios, and enhancing the practicality and adaptability of wearable devices.

[0103] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the firmware upgrade method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0104] This application also provides a firmware upgrade device, please refer to... Figure 6 The firmware upgrade device includes:

[0105] The acquisition module 10 is used to acquire firmware upgrade instructions for the data processing module in the wearable device;

[0106] Backup module 20 is used to back up the current version firmware data in the data processing module to an external storage space outside the data processing module according to the firmware upgrade instruction.

[0107] The sending module 30 is used to obtain the firmware upgrade data of the new version and send the firmware upgrade data to the data processing module for firmware upgrade.

[0108] The rollback module 40 is used to send the current version firmware data to the data processing module to perform firmware version rollback in the event that the firmware upgrade of the data processing module fails.

[0109] In one feasible implementation, the backup module 20 is further configured to:

[0110] Send a version read command to the data processing module and receive the current version firmware data fed back by the data processing module based on the version read command;

[0111] Write the current firmware data to the external storage space.

[0112] In one feasible implementation, the sending module 30 is further configured to:

[0113] Download the firmware upgrade data from the cloud server and store it in the external storage space; then send the firmware upgrade data in segments to the data processing module.

[0114] The system receives upgrade status information from the data processing module during the firmware upgrade process and determines whether the data processing module has successfully upgraded based on the upgrade status information.

[0115] In one feasible implementation, the sending module 30 is further configured to:

[0116] If the upgrade status information is "upgrade successful", it is determined that the firmware upgrade of the data processing module was successful.

[0117] If the upgrade status information is a data verification failure or an upgrade program execution error, it is determined that the firmware upgrade of the data processing module has failed.

[0118] In one feasible implementation, the sending module 30 is further configured to:

[0119] If the upgrade status information indicates that data reception is complete, determine whether the startup time of the data processing module exceeds a preset time.

[0120] If the startup time exceeds a preset time, the firmware upgrade of the data processing module is determined to have failed.

[0121] In one feasible implementation, the rollback module 40 is further configured to:

[0122] Send a stop upgrade command to the data processing module and read the current version firmware data from the external storage space;

[0123] The current firmware version data is sent to the data processing module, and the firmware version rollback success information is received from the data processing module.

[0124] In one feasible implementation, the firmware upgrade device further includes a prompting module for:

[0125] Obtain the firmware version identifier from the firmware upgrade command;

[0126] If the firmware version identifier matches the stored failed version identifier, a firmware upgrade failure message will be output.

[0127] The firmware upgrade device provided in this application, employing the firmware upgrade method described in the above embodiments, can solve the technical problem of low reliability in firmware upgrades for wearable devices. Compared with the prior art, the beneficial effects of the firmware upgrade device provided in this application are the same as those of the firmware upgrade method provided in the above embodiments, and other technical features in the firmware upgrade device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0128] This application provides a wearable device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the firmware upgrade method in the above embodiments.

[0129] The following is for reference. Figure 7 It shows a structural schematic diagram suitable for implementing the wearable device of the embodiments of this application. Figure 7 The wearable device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0130] like Figure 7As shown, the wearable device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the wearable device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the wearable device to communicate wirelessly or wiredly with other devices to exchange data. While wearable devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0131] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0132] The wearable device provided in this application, employing the firmware upgrade method described in the above embodiments, can solve the technical problem of low reliability in firmware upgrades for wearable devices. Compared with the prior art, the beneficial effects of the wearable device provided in this application are the same as those of the firmware upgrade method provided in the above embodiments, and other technical features of the wearable device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0133] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0135] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the firmware upgrade method in the above embodiments.

[0136] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0137] The aforementioned computer-readable storage medium may be included in the wearable device; or it may exist independently and not assembled into the wearable device.

[0138] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a wearable device, cause the wearable device to: obtain a firmware upgrade instruction for a data processing module within the wearable device; back up the current version firmware data in the data processing module to an external storage space outside the data processing module according to the firmware upgrade instruction; obtain new version firmware upgrade data and send the firmware upgrade data to the data processing module for firmware upgrade; and, if the firmware upgrade of the data processing module fails, send the current version firmware data to the data processing module for firmware version rollback.

[0139] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0141] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0142] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described firmware upgrade method, thereby solving the technical problem of low reliability in firmware upgrades for wearable devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the firmware upgrade method provided in the above embodiments, and will not be repeated here.

[0143] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the firmware upgrade method described above.

[0144] The computer program product provided in this application can solve the technical problem of low reliability in firmware upgrades for wearable devices. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the firmware upgrade method provided in the above embodiments, and will not be repeated here.

[0145] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A firmware upgrade method, characterized in that, The firmware upgrade method, applied to wearable devices, includes: Obtain firmware upgrade instructions for the data processing module in the wearable device; According to the firmware upgrade instruction, the current version firmware data in the data processing module is backed up to an external storage space outside the data processing module; Obtain the firmware upgrade data for the new version and send the firmware upgrade data to the data processing module for firmware upgrade; If the firmware upgrade of the data processing module fails, the current firmware version data will be sent to the data processing module for firmware version rollback.

2. The firmware upgrade method as described in claim 1, characterized in that, The step of backing up the current version firmware data in the data processing module to an external storage space outside the data processing module includes: Send a version read command to the data processing module and receive the current version firmware data fed back by the data processing module based on the version read command; Write the current firmware data to the external storage space.

3. The firmware upgrade method as described in claim 1, characterized in that, The steps of obtaining the new firmware upgrade data and sending the firmware upgrade data to the data processing module for firmware upgrade include: Download the firmware upgrade data from the cloud server and store it in the external storage space; then send the firmware upgrade data in segments to the data processing module. The system receives upgrade status information from the data processing module during the firmware upgrade process and determines whether the data processing module has successfully upgraded based on the upgrade status information.

4. The firmware upgrade method as described in claim 3, characterized in that, The step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes: If the upgrade status information is "upgrade successful", it is determined that the data processing module firmware upgrade was successful. If the upgrade status information is a data verification failure or an upgrade program execution error, it is determined that the firmware upgrade of the data processing module has failed.

5. The firmware upgrade method as described in claim 3, characterized in that, The step of determining whether the data processing module has been successfully upgraded based on the upgrade status information includes: If the upgrade status information indicates that data reception is complete, determine whether the startup time of the data processing module exceeds a preset time. If the startup time exceeds a preset time, the firmware upgrade of the data processing module is determined to have failed.

6. The firmware upgrade method as described in claim 1, characterized in that, The step of sending the current firmware version data to the data processing module for firmware version rollback includes: Send a stop upgrade command to the data processing module and read the current version firmware data from the external storage space; The current firmware version data is sent to the data processing module, and the firmware version rollback success information is received from the data processing module.

7. The firmware upgrade method according to any one of claims 1 to 6, characterized in that, Before the step of obtaining the new firmware upgrade data and sending the firmware upgrade data to the data processing module for firmware upgrade, the method further includes: Obtain the firmware version identifier from the firmware upgrade command; If the firmware version identifier matches the stored failed version identifier, a firmware upgrade failure message will be output.

8. A wearable device, characterized in that, The wearable device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the firmware upgrade method as described in any one of claims 1 to 7.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the firmware upgrade method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the firmware upgrade method as described in any one of claims 1 to 7.