Method and system for upgrading firmware of unmanned aerial vehicle and related products

By configuring the onboard management module and firmware main equipment in the drone, using the three-time security verification mechanism and the backup unit recovery mechanism, the security risks in the firmware upgrade process of the drone are solved, and the firmware upgrade effect with high security and rapid recovery is achieved.

CN119883307APending Publication Date: 2025-04-25SHANGHAI PROCESSOR TECH INNOVATION CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311386500.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

There are potential security risks during the UAV firmware upgrade process, including upgrade errors or malicious tampering, which may lead to serious consequences such as control failure, equipment downtime or equipment scrapping.

Method used

By configuring the onboard management module and the firmware main device in the drone, three security verification mechanisms are adopted: the first security verification checks the version of the firmware upgrade package, the second security verification checks the key comparison of the firmware content, and the third security verification uses a cyclic redundancy verification algorithm to verify the overall firmware, and when the upgrade fails, the backup unit is used to restore the original firmware version.

Benefits of technology

It effectively improves the security during the firmware upgrade process, prevents malicious attacks and operational errors, ensures the normal and effective operation of the drone, and quickly returns to a stable state when the upgrade fails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883307A_ABST
    Figure CN119883307A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for upgrading firmware of an unmanned aerial vehicle and related products, the unmanned aerial vehicle is provided with an onboard management module and firmware master equipment, and the firmware master equipment is provided with an upgrading unit; the method comprises the following steps: receiving a firmware upgrade package for performing firmware upgrade on a firmware master device; performing first security verification on the firmware upgrade package by using an onboard management module; in response to passing of the first security verification, writing the firmware upgrade package into an upgrade unit so as to perform firmware upgrade of the firmware master device; performing second security verification on the firmware after the firmware master device is upgraded by using the onboard management module; in response to passing of the second security verification, performing third security verification on the upgraded firmware by using the firmware master device; and determining to complete firmware upgrading of the unmanned aerial vehicle in response to the fact that the third security verification is passed. By means of the scheme, the reliability and safety of the firmware in the upgrading process can be effectively guaranteed, and the risk brought to the firmware master device under the abnormal conditions such as malicious tampering is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of drone technology. More specifically, the present invention relates to a method, system and related products for upgrading drone firmware. Background Art

[0002] The firmware in the drone is the most basic and lowest-level software in the drone system. In the hardware devices of the drone, the firmware is the soul of the hardware devices, and some hardware devices even have no other software components except the firmware. Therefore, the firmware can determine the function and performance of the hardware devices.

[0003] Manufacturers of drone hardware devices usually need to further upgrade the firmware after the hardware device is released in the following situations:

[0004] 1. After the hardware device is released, the manufacturer further optimizes and innovates the firmware to make it work better. After the firmware upgrade, the performance of the hardware device can be improved.

[0005] 2. As the software and hardware environment used by hardware equipment changes and updates, hardware equipment products may be incompatible with many new hardware and software. Manufacturers update firmware files to make hardware equipment compatible with more and newer software and hardware, and continuously enhance the compatibility of hardware equipment.

[0006] 3. Based on the original hardware equipment, the manufacturer has developed new functions. For the original hardware equipment products, new functions can be added by simply updating the firmware.

[0007] 4. For any product that has been produced, there may be some defects. Manufacturers can correct errors, vulnerabilities or deficiencies in previous firmware versions by updating the firmware.

[0008] As can be seen above, firmware upgrades can be used to introduce new functions to hardware devices, iterate product performance, and improve user experience, with significant economic and efficient features. However, at the same time, there are potential security risks during the firmware upgrade process. Upgrade errors or malicious tampering may even cause serious consequences such as control failure, equipment downtime, or equipment scrapping.

[0009] In view of this, there is an urgent need to provide a method for upgrading drone firmware in order to prevent system risks during drone upgrades and improve the security of the firmware upgrade process. Summary of the invention

[0010] In order to at least solve one or more of the technical problems mentioned above, the present invention proposes a method, system and related product solutions for drone firmware upgrade in multiple aspects.

[0011] In a first aspect, the present invention provides a method for upgrading the firmware of an unmanned aerial vehicle, wherein the unmanned aerial vehicle is configured with an onboard management module and a firmware master device, wherein the firmware master device is configured with an upgrade unit; the method comprises: receiving a firmware upgrade package for upgrading the firmware of the firmware master device; performing a first security check on the firmware upgrade package using the onboard management module; in response to passing the first security check, writing the firmware upgrade package into the upgrade unit to upgrade the firmware of the firmware master device; performing a second security check on the upgraded firmware of the firmware master device using the onboard management module; in response to passing the second security check, performing a third security check on the upgraded firmware using the firmware master device; and in response to passing the third security check, determining that the firmware upgrade of the unmanned aerial vehicle is completed.

[0012] In some embodiments, the firmware master device is further configured to include a backup unit, and the method includes: using the backup unit to store the verified firmware version.

[0013] In some embodiments, the backup unit is in read-only mode and write-protected relative to the firmware master.

[0014] In some embodiments, receiving the firmware upgrade package includes: responding to an upgrade instruction of a gateway device, setting the onboard management module to a receiving mode, and responding to the gateway device.

[0015] In some embodiments, the first security check includes checking the version of the firmware upgrade package.

[0016] In some embodiments, the verifying the version of the firmware upgrade package includes: checking whether the version number of the firmware upgrade package is greater than the original firmware version number.

[0017] In some embodiments, in response to the failure of the first safety check, a first safety alarm is issued using the onboard management module.

[0018] In some embodiments, the second security check includes: using the onboard management module to compare preset information between a key preset in the firmware master device and the firmware upgrade package.

[0019] In some embodiments, the third security check includes: using a cyclic redundancy check algorithm to perform an overall check on the upgraded firmware.

[0020] In some embodiments, in response to the failure of the second security check or the third security check, the onboard management module is used to restore the firmware in the backup unit to the firmware of the firmware master device, and the onboard management module is used to issue a second security alarm or a third security alarm accordingly.

[0021] In a second aspect, the present invention provides an unmanned aerial vehicle, which is configured to include: an onboard management module, a firmware master device, and a main upgrade unit and a backup unit mounted on the firmware master device, wherein the onboard management module is configured to receive the firmware upgrade package and perform a first security check and a second security check on the firmware upgrade package; the upgrade unit is configured to upgrade the firmware of the firmware master device; the firmware master device is configured to perform a third security check on the upgraded firmware; and the backup unit is configured to back up a verified firmware version.

[0022] In some embodiments, the first security check is set as the onboard management module performing a version check on the received firmware upgrade package.

[0023] In some embodiments, in response to the first security check passing, the onboard management module writes the firmware upgrade package into the upgrade unit.

[0024] In some embodiments, the second security check is configured as follows: using the onboard management module to compare preset information between a key preset in the firmware master device and a firmware upgrade package of the upgrade unit.

[0025] In some embodiments, the third security check setting is: using a cyclic redundancy check algorithm to perform an overall check on the upgraded firmware.

[0026] In some embodiments, the backup unit configuration includes: mounting on a firmware master device, and using the backup unit to store a verified firmware version.

[0027] In some embodiments, in response to the failure of the second security check or the third security check, the onboard management module is used to write the firmware in the backup unit to the upgrade unit to restore the firmware version of the firmware master device, and the onboard management module issues a second security alarm or a third security alarm accordingly.

[0028] In a third aspect, the present invention provides a computer-readable storage medium comprising program instructions for upgrading the firmware of a drone, and when the program instructions are executed by a processor, the method described in any one of the embodiments in the first aspect is implemented.

[0029] In a fourth aspect, the present invention provides a system for upgrading drone firmware, comprising: a gateway device and a drone; wherein the gateway device is configured to communicate with the drone; and the drone is configured to execute the method described in any one of the embodiments in the first aspect.

[0030] Through a method for upgrading drone firmware as provided above, the embodiment of the present invention performs a first security check and a second security check on the firmware upgrade version of the firmware master device through the onboard management module configured by the drone, and performs a third security check through the firmware master device, which advantageously ensures the security of the firmware upgrade. Specifically, the first security check ensures that the version of the firmware upgrade package is correct, the second security check ensures that the content of the firmware upgrade package is correct, and in particular ensures that the firmware has not been maliciously tampered with, and the third security check ensures that the upgrade package as a whole can run correctly. Through the security check of the above steps of the scheme of the present invention, the security of the firmware during the upgrade process is improved, the potential risks brought by malicious attacks are effectively prevented, and the normal and effective operation of the drone is ensured.

[0031] Furthermore, in some embodiments, by mounting a backup unit on the firmware master device and storing the verified firmware version in the backup unit through the onboard management module, it is possible to prevent the failure of the upgrade process by restoring the original version of the firmware to ensure that the firmware master device can work normally.

[0032] Further, in some embodiments, the onboard management module responds to the upgrade instruction of the gateway device and first performs a first security check on the version of the received firmware upgrade package. In some embodiments, it is checked whether the version number of the firmware upgrade version is greater than the current firmware version number, so that the onboard management module can confirm that the firmware received is a valid version number. Then, the onboard management module begins to write the firmware upgrade package to the upgrade unit, and continues to perform a second security check on the content information of the upgrade package, namely, a content check of the firmware upgrade package. Through the two security checks, it is ensured that the version written to the upgrade unit is a valid version, and it is also ensured that the upgraded firmware is safe and has not been tampered with, which effectively improves the security of installing the upgraded firmware.

[0033] Furthermore, in some embodiments, a cyclic redundancy check is performed on the upgraded firmware by the firmware master device, effectively ensuring that the firmware as a whole can run normally and safely. If the upgraded firmware is defective and cannot maintain normal operation or is incompatible, the backup version in the backup unit will be restored to the firmware master device through the onboard management module. Through the overall third safety check, it can be further ensured that the firmware application can run normally and effectively on the basis of passing the first safety check and the second safety check.

[0034] Through the above scheme, the present invention can effectively ensure the reliability and security of the firmware during the upgrade process, and avoid irreversible damage to the firmware host device or even the drone due to operational errors, communication interference, or abnormal situations such as network attacks, malicious tampering, or even embedded virus codes, thereby avoiding data risks and economic losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0036] Figure 1 An exemplary architecture diagram of a firmware upgrade system for a drone according to an application scenario is shown;

[0037] Figure 2 An exemplary flow chart of a firmware upgrade process for a drone according to an application scenario is shown;

[0038] Figure 3 An exemplary architecture diagram of a drone firmware upgrade system according to some embodiments of the present invention is shown;

[0039] Figure 4 An exemplary flow chart of a method for upgrading firmware of a drone according to some embodiments of the present invention is shown; and

[0040] Figure 5 An exemplary flow chart of a firmware upgrade process for a drone according to some embodiments of the present invention is shown. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0042] It should be understood that when the terms "first", "second", "third" and "fourth" are used in the claims, description and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.

[0043] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the claims, the singular forms of "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in the specification of the present invention and the claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0044] As used in this specification and claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0045] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0046] Exemplary application scenarios

[0047] Figure 1 An exemplary architecture diagram of a firmware upgrade system 100 for a drone according to an application is shown. As shown in the figure, a drone can be generally configured with a terminal device 101, and communicate with an upgrade unit 102 through bus control. In a conventional upgrade scenario, the terminal device 101 (which can be, for example, a firmware master device) responds to an upgrade instruction of an external backend gateway device, jumps to the upgrade boot program, and starts receiving a firmware upgrade package. When the firmware upgrade package is received, the terminal device uses a decompression function to decompress the firmware upgrade package, and writes the decompressed firmware upgrade package into the upgrade unit 102. After the backend gateway device sends the firmware upgrade package, it can send the version information or check value of the current upgrade firmware and other related information to the terminal device. After receiving the data, the terminal device can use the data to verify the entire decompressed firmware upgrade package. If the verification is successful, the terminal device can save the updated version information to the preset information segment, send an upgrade success signal to the gateway device, and jump to the application to run; otherwise, if the verification fails, the terminal device can send a firmware upgrade failure signal to the backend gateway device to wait for the upgrade again.

[0048] Figure 2An exemplary flow chart of an upgrade process 200 for drone firmware according to an application is shown. As will be described in detail below, the upgrade process 200 may include more details of the operation of the system 100 described above, so the upgrade process can be regarded as a possible implementation of the operation of the system 100.

[0049] like Figure 2 As shown, when the terminal device to be upgraded is running an application, the external PC control machine gateway device sends a firmware upgrade request instruction 201 to the terminal device, and the terminal device responds to the upgrade instruction, jumps to the upgrade boot program 202, and is set to a receiving mode, and begins waiting for the data packet of the upgrade process of the specific end device of the gateway device (for example, it can be an upgrade unit).

[0050] Further, in process 200, in response to the upgrade request, at process 203, the terminal device receives a complete firmware upgrade package and stores the received firmware upgrade package in a preset storage space.

[0051] Furthermore, after the gateway device sends the firmware upgrade package of the terminal device, it sends the version information and check value of the current upgrade firmware package to the terminal device. At process 204, when the terminal device receives the data, it performs a firmware data integrity check on the entire decompressed firmware. If the check succeeds, the version information is updated to the preset information segment. Otherwise, the check fails, and the process returns to process 202, and the terminal device is in receiving mode again.

[0052] Further, after the integrity check at process 204, the process proceeds to process 205, where the upgraded firmware is checked for integrity using CRC (cyclic redundancy check). Further, at process 206, if the check succeeds, the terminal device sends an upgrade success signal to the gateway device, and the terminal device jumps to the application and starts running. If the check fails, the current process returns to process 202, and the terminal device is reinitialized to the receiving mode, waiting for the gateway device to retransmit the firmware upgrade package.

[0053] Through the above description of the architecture diagram of system 100 and the flowchart of process 200, the firmware upgrade process can be guaranteed to proceed smoothly under normal circumstances and without external interference, and security can also be relatively guaranteed. However, in the case of external interference, or network failure, malicious attack and other upgrade abnormalities, the smooth progress of the upgrade and the security of the firmware upgrade package cannot be effectively guaranteed.

[0054] In view of the problems of the above-mentioned embodiments, the inventors have studied every stage and risk points in the upgrade process. In the process of research, it was found that the security verification method of the above-mentioned embodiment does not provide sufficient and adequate protection for the security of the firmware, especially in the event of an upgrade failure or a firmware defect, it does not have the ability to quickly resume work. Therefore, after continuing to study security protection, the inventors proposed the method for upgrading drone firmware of the present application. The method proposed in the present invention has the effect of fast and effective firmware upgrade, and can fully guarantee the security of the firmware. In addition, the method also provides a security guarantee for the firmware master device in the firmware upgrade environment to restore the working state in the event of an upgrade exception by configuring a backup unit for the firmware master device.

[0055] Specifically, some embodiments of the present invention provide a method for upgrading the firmware of a drone. In one embodiment, the drone is configured with an onboard management module and a firmware master device, wherein the firmware master device is configured with an upgrade unit. It should be noted that the firmware master device here is equivalent to the above Figure 1 or Figure 2 The terminal device of the embodiment in the embodiment. The specific firmware upgrade method includes: receiving a firmware upgrade package for upgrading the firmware of the firmware master device; performing a first security check on the firmware upgrade package using the onboard management module; in response to the first security check passing, writing the firmware upgrade package to the upgrade unit to upgrade the firmware of the firmware master device, and performing a second security check on the upgraded firmware of the firmware master device using the onboard management module. In response to the second security check passing, performing a third security check on the upgraded firmware using the firmware master device; and in response to the third security check passing, determining that the firmware upgrade of the drone is completed. The upgrade scheme provided in the above embodiment can maximize the security and stability of the firmware upgrade by performing three targeted security checks on the firmware upgrade package in batches, and adopting a gradually in-depth verification method. At the same time, this verification method can also help to discover problems as early as possible so that timely treatment measures can be taken, thereby saving upgrade resources.

[0056] Figure 3 An exemplary architecture diagram of a drone firmware upgrade system 300 according to some embodiments of the present invention is shown; it may mainly include a drone and a backend gateway device.

[0057] In the system 300, the main components may include a firmware master device 301, an upgrade unit 302 and a backup unit 303 mounted on the firmware master device 301, a bus 304 responsible for communication between the components, a bus switch 305 responsible for switching the communication line, an onboard management module 306 for controlling and scheduling the components, and a backend gateway device 307 and a corresponding sending unit 308. In one embodiment, the configuration of each component may be that the sending unit 308 is configured to transmit a firmware upgrade package to the onboard management module 306; the onboard management module 306 is configured to receive the firmware upgrade package and perform a first security check and a second security check on the firmware upgrade package; the upgrade unit 302 is configured to upgrade the firmware of the firmware master device 301; the firmware master device 301 is configured to perform a third security check on the upgraded firmware; and the backup unit 303 is configured to back up the verified firmware version.

[0058] Based on the system 300, the firmware upgrade solution can be specifically described as follows. The back-end gateway device 307 sends an upgrade instruction to the firmware master device 301. In one embodiment, the firmware master device 301 periodically sends an upgrade request to the gateway device 307, and the back-end gateway device 307 responds to the request and sends the upgrade instruction. After receiving the upgrade instruction, the onboard management module 306 controls the communication line of the bus 304 through the bus switch 305, connects to the firmware master device 301, and notifies the firmware master device 301 to prepare for the upgrade. At the same time, the onboard management module 306 is set to the receiving mode to prepare for receiving the upgrade data packet.

[0059] In one embodiment, when the sending unit 308 in the gateway device 307 starts to send the firmware upgrade package, the onboard management module 306 receives the firmware upgrade package and decompresses the received firmware upgrade package using a decompression algorithm, thereby performing a first security check to verify whether the version information is correct. In the process of decompressing the upgrade package, the specific decompression algorithm used does not have a decisive influence on the technical problem to be solved by the present invention, so no further description is made on this. Those skilled in the art should understand that the present invention does not impose any restrictions on the conventional function of decompression using a decompression algorithm.

[0060] In one embodiment, the first security check is whether the version number of the upgraded firmware package is greater than the firmware version number in the original firmware master device, so as to confirm whether the version of the upgrade package is valid. When the version number of the upgraded firmware package is greater than the original firmware version number, it is proved that the received upgrade version is valid. Otherwise, the received version is invalid. When the received firmware upgrade package is invalid, one embodiment is that the onboard management module 306 issues a first security alarm and sends a failure signal back to the back-end gateway device 307, and then the onboard management module 306 returns to the receiving mode. Among them, the warning method of the first security alarm is: the device light flashes, a preset alarm sound is issued, or the screen displays a "version error" message, etc. In actual application scenarios, the specific alarm form can be one or more. Therefore, the present invention does not make any restrictive provisions on the warning method in this regard. Similarly, the alarm method part involved in the context of the present invention is similar to the description here, and no restrictive provisions are made.

[0061] When the first security check passes, one embodiment is that the onboard management module 306 controls the bus switch 305 to switch to the onboard management module 306 to communicate with the firmware master device 301, and then uses the onboard management module 306 to back up the firmware version in the firmware master device 301 to the backup unit 303, and then writes the received firmware upgrade package into the upgrade unit 302 through the bus 304.

[0062] Further, the onboard management module 306 reads the preset key in the firmware master device 301 and performs a second security check on the preset information of the upgrade package. Through information comparison, if it meets the preset information, the data in the upgrade package is credible data, and the subsequent upgrade steps can continue. Otherwise, if it does not meet the preset information, one embodiment is that the onboard management module 306 issues a second security alarm, and the alarm method refers to the above description, and no restrictive provisions are made for this. At the same time, the onboard management module 306 reads the verified backup firmware in the backup unit 303 and writes it into the upgrade unit 302, so as to restore the firmware master device 301 to the original operating environment.

[0063] Further, in response to the passing of the second security check, the firmware master device 301 performs a third security check on the upgraded firmware, namely, a CRC (cyclic redundancy check) integrity check. Based on the passing of the third security check, it is proved that the firmware operates correctly in its entirety, indicating that the entire upgrade process has been successfully completed, and the firmware master device 301 jumps to the application program to start the formal operation after the upgrade. Based on the failure of the third security check, one embodiment is that the onboard management module 306 issues a third security alarm, and reads the backup version in the backup unit and writes it to the upgrade unit, so as to restore the operating environment of the firmware master device.

[0064] Figure 4An exemplary flow chart of a method 400 for upgrading firmware of a drone according to some embodiments of the present invention is shown.

[0065] As shown in the figure, in step S401 of method 400, a firmware upgrade package for upgrading the firmware of the firmware master device is received. In one embodiment of the present invention, the drone can be configured with an onboard management module, and after the onboard management module responds to the upgrade instruction of the gateway device, it is set to a receiving mode and responds to the gateway device. When the gateway device receives the response, it starts to send the firmware upgrade package.

[0066] After the onboard management module successfully receives the firmware upgrade package, the process goes to step S402: the onboard management module is used to perform a first security check on the firmware upgrade package. In one embodiment, the first security check includes checking the version number of the firmware upgrade package. Specifically, the onboard management module reads the version information in the firmware upgrade package to compare the original firmware version. If the version number of the firmware upgrade package is greater than the original firmware version number, the firmware upgrade package received this time is a valid version. Otherwise, the firmware upgrade package is wrong and is an invalid version. Subsequently, an embodiment is that the onboard management module issues a first security alarm and returns to the receiving mode state, and continues to wait for the gateway device to send a new firmware upgrade package. It should be noted that as a version verification method, there are different verification methods according to different application scenarios and actual needs, such as time verification, verification of preset rules, etc. Those skilled in the art should understand that as long as the purpose of verifying whether the upgraded version is an upgrade based on the original firmware version can be achieved, the specific verification rules adopted do not affect the solution of the technical problem of the present invention, and the present invention does not make any restrictive provisions on this.

[0067] Further, in step S403, in response to the first security check passing, the onboard management module decompresses the firmware upgrade package using a decompression algorithm and writes it into the upgrade unit to perform a subsequent firmware upgrade of the firmware master device. The specific decompression algorithm process used to decompress the upgrade package is as described above in system 300. Since it does not have a decisive impact on the technical problem to be solved by the present invention, it is not described in detail here. Those skilled in the art should understand that the present invention does not make any restrictive provisions in this regard for the conventional functions of the decompression algorithm.

[0068] Next, at step S404, after the firmware of the firmware master device is upgraded, the onboard management module reads the preset key in the firmware master device, and uses the preset key to perform a second security check on the preset information in the firmware. The preset key here, in one embodiment, can include decrypting the preset information in the firmware based on the preset key, and then performing a second security check by comparing the preset information, so as to determine whether the firmware content is safe. Therefore, it can be seen that through the second security check, it is possible to achieve a security verification of whether the firmware information is correct, thereby preventing the firmware content data from being incorrect or maliciously tampered with. If the second security check fails, one embodiment is that the onboard management module sends a second security alarm. One embodiment of a specific method of sending the second security alarm is that the error message of the second security alarm can display words such as "data error". At this time, the onboard management module can use the original firmware version in the backup unit to restore the problematic firmware upgrade package of the firmware master device. By restoring the original firmware version, it is possible to effectively prevent the firmware upgrade failure from causing the firmware master device to fail, thereby affecting normal operation.

[0069] Further, at step S405, in response to the passing of the second security check at step S404, the firmware master device performs a third security check on the upgraded firmware. The third security check here, in one embodiment, uses CRC (cyclic redundancy check) to check the entire firmware, thereby ensuring the normal operation of the entire firmware from an overall perspective. If the third security check fails, in one embodiment, the onboard management module sends a third security alarm, and replaces the problematic upgrade package in the firmware master device with the firmware version in the backup unit, thereby ensuring that the firmware master device can be restored to a normal state of operation. The error message of the third security alarm sent here can display words such as "operation error".

[0070] Further, in step S406, in response to the third security check in step S405 being passed, the firmware master device jumps to the firmware application and starts running, thereby determining that the upgrade of the drone firmware has been completed.

[0071] The firmware upgrade method of the above method 400 can smoothly realize the security upgrade of the firmware. Further, through the verification based on three security checks, the correctness, security and compatibility of the firmware upgrade package are ensured from the version, firmware content and integrity of the firmware upgrade package, ensuring the safe and smooth operation of the subsequent firmware master device.

[0072] Figure 5 An exemplary flowchart of a firmware upgrade process 500 for a drone according to some embodiments of the present invention is shown. As shown in the figure, the entire process from the start of the firmware upgrade to the completion and smooth operation of the firmware upgrade is described in detail. It can be seen from the contents shown in the figure that Figure 5The method 400 includes more details, so it can be regarded as a possible implementation of the method 400. Figure 4 The description also applies to Figure 5 , and for the purpose of clarity and simplicity, the same contents are not repeated. The specific description of process 500 is as follows:

[0073] At process 501, in some embodiments, the firmware upgrade is a request initiated from the back-end gateway device. In other embodiments, the firmware master device can periodically initiate firmware upgrade requests. Through the teachings of the embodiments of the present invention in the context, those skilled in the art should understand that the specific order of initiating requests and responses and the mode of response do not constitute an absolute impact on the technical problems solved by the present invention. Therefore, the present invention does not impose any restrictions in this regard. When the firmware upgrade request is responded to, it comes to process 502, and the onboard management module in the drone is set to the receiving mode, waiting for the back-end gateway device to send the firmware upgrade package through the sending unit. Otherwise, if the request is not responded, it comes to the last step 511 of process 500 and jumps to the application to continue the operation of the original firmware.

[0074] Further, at process 503, the onboard management module starts to receive the firmware upgrade package. With the transmission of the firmware upgrade package, when the firmware upgrade package is transmitted, the process comes to 504. The onboard management module starts to perform firmware version verification on the received firmware upgrade package, that is, the first safety verification. If the verification version does not meet the expected requirements, process 504 returns to the receiving mode of process 502, waiting for the gateway device to retransmit the firmware upgrade package. An embodiment of the expected standard for version verification is: the version number of the firmware upgrade package is greater than the version number of the original firmware, that is, the upgraded version number is greater than the currently running firmware version. It should be noted that the version comparison method is as described above, and there may also be other verification and comparison methods, such as time comparison verification, comparison verification of preset rules, etc. Those skilled in the art should understand that as long as the upgrade version can be compared with the original firmware version, so that the purpose of the upgrade package being a new version can be clarified, the specific verification rule method does not constitute an absolute impact on the solution of the technical problem of the present invention, and the present invention does not make any restrictive provisions on this.

[0075] In the above embodiment, if the first security check passes, the process comes to 505. The onboard management module decompresses the firmware upgrade package using a decompression algorithm, writes it into the upgrade unit, and reads the preset key in the firmware master device. Then the onboard management module uses the preset key to verify the firmware preset information at process 506 on the content information of the firmware upgrade package, that is, to perform a second security check. If the firmware preset information verification at process 506 fails, one embodiment is that the process enters process 509 and performs a background alarm, that is, a second security alarm. At the same time, one embodiment is that the process enters process 510, the onboard management module reads the original verified firmware version in the backup unit, continues to process 505, writes the firmware version in the backup unit into the upgrade unit, and restores the firmware of the firmware master device to the original firmware version, thereby ensuring that the firmware master device can maintain normal operation.

[0076] Further, in response to the second safety check passing at process 506, the process proceeds to process 507, where the entire firmware is checked using CRC (cyclic redundancy check), i.e., a third safety check is performed. Further, the process proceeds to process 508, where in response to the integrity check after the firmware upgrade being successful, the firmware upgrade is completed.

[0077] After completing the firmware upgrade and responding to the success of the third security check, the process enters process 511, and the firmware master device jumps to the application to start formal operation. Otherwise, in response to the failure of the integrity check of the firmware at process 508, one embodiment is that the onboard management module enters process 509 to issue a background alarm, that is, the third security alarm. At the same time, the process further enters process 510, and the onboard management module reads the original verified firmware version in the backup unit. Continue to process 505 to write the firmware version of the backup unit to the upgrade unit, so as to overwrite the problematic version with the backup version to restore the normal operation of the firmware master device.

[0078] Through the above description of the process 500, the firmware upgrade in the firmware master device can be successfully completed. During the upgrade process of process 500, the security of the firmware is ensured based on three security checks, that is, the version, firmware content, and integrity are checked step by step, thereby ensuring that the firmware upgrade package is a correct, safe, compatible and executable version, and ultimately ensuring the operational security of the firmware master device.

[0079] In summary, the method for firmware upgrade of the present invention can obtain significant advantages over the prior art. Specifically, based on three security checks during the upgrade process, as well as the control and management of the upgrade by the onboard management module and the functional recovery of the backup unit in the event of an upgrade failure, it can support the realization of all-round and effective protection of the security, reliability, and compatibility of the firmware during the upgrade process. Furthermore, through three security checks, it is possible to avoid irreversible damage to the firmware main device or even the drone due to operational errors, communication interference, or in abnormal situations such as network attacks, malicious tampering, or even embedded virus codes, thereby causing data risks and economic losses. The solution of the present invention strengthens the security protection of drones in the firmware upgrade link and improves the effectiveness of security technology prevention.

[0080] Although multiple embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art may conceive of many changes, modifications, and alternatives without departing from the thought and spirit of the present invention. It should be understood that in the process of practicing the present invention, various alternatives to the embodiments of the present invention described herein may be adopted. The appended claims are intended to define the scope of protection of the present invention, and therefore cover equivalents or alternatives within the scope of these claims.

Claims

1. A method for upgrading drone firmware, characterized in that: The drone is configured with an onboard management module and a firmware master device, wherein the firmware master device is configured with an upgrade unit; the method comprises: Receiving a firmware upgrade package for performing a firmware upgrade on a firmware master device; Performing a first security check on the firmware upgrade package using the onboard management module; In response to the first security check passing, writing the firmware upgrade package into the upgrade unit to perform a firmware upgrade of the firmware master device; Using the onboard management module to perform a second security check on the upgraded firmware of the firmware master device; In response to the second security check passing, using the firmware master device to perform a third security check on the upgraded firmware; and In response to the third security check being passed, it is determined that the firmware upgrade of the drone is completed.

2. The method according to claim 1, characterized in that The firmware master device configuration also includes a backup unit, and the method includes: using the backup unit to store the verified firmware version.

3. The method according to claim 2, characterized in that The backup unit is in read-only mode and write-protected relative to the firmware master device.

4. The method according to claim 1, characterized in that Receiving the firmware upgrade package includes: In response to the upgrade instruction of the gateway device, the onboard management module is set to a receiving mode and responds to the gateway device.

5. The method according to claim 1, characterized in that The first security check includes checking the version of the firmware upgrade package.

6. The method according to claim 5, characterized in that The verifying the version of the firmware upgrade package includes: checking whether the version number of the firmware upgrade package is greater than the original firmware version number.

7. The method according to claim 1, characterized in that In response to the failure of the first safety check, a first safety alarm is issued using the onboard management module.

8. The method according to claim 1, characterized in that The second security check includes: using the onboard management module to compare preset information between the key preset in the firmware master device and the firmware upgrade package.

9. The method according to claim 1, characterized in that: The third security check includes: using a cyclic redundancy check algorithm to perform an overall check on the upgraded firmware.

10. The method according to claim 2, characterized in that In response to the failure of the second security check or the third security check, the firmware in the backup unit is restored to the firmware of the firmware master device using the onboard management module, and the second security alarm or the third security alarm is issued accordingly using the onboard management module.

11. A drone, comprising: Onboard management module, firmware master device, and upgrade unit and backup unit mounted on the firmware master device; in The onboard management module is configured to receive a firmware upgrade package, and perform a first security check and a second security check on the firmware upgrade package; The upgrading unit is configured to upgrade the firmware of the firmware master device; The firmware master device is configured to perform a third security check on the upgraded firmware; The backup unit is configured to back up the verified firmware version.

12. The drone according to claim 11, characterized in that: The first security check is set as the onboard management module performing a version check on the received firmware upgrade package.

13. The drone according to claim 12, characterized in that: In response to the first security check passing, the onboard management module writes the firmware upgrade package into the upgrade unit.

14. The drone according to claim 11, characterized in that: The second security check is set as follows: using the onboard management module to compare preset information between a key preset in the firmware master device and a firmware upgrade package of the upgrade unit.

15. The drone according to claim 11, characterized in that: The third security check setting is: using a cyclic redundancy check algorithm to perform an overall check on the upgraded firmware.

16. The drone according to claim 11, characterized in that: The backup unit configuration includes: mounting on a firmware master device, and using the backup unit to store a verified firmware version.

17. The drone according to claim 11, characterized in that: In response to the failure of the second security check or the third security check, the firmware in the backup unit is written to the upgrade unit using the onboard management module to restore the firmware version of the firmware master device, and the second security alarm or the third security alarm is issued accordingly using the onboard management module.

18. A computer-readable storage medium comprising program instructions for upgrading drone firmware, wherein when the program instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.

19. A system for upgrading drone firmware, comprising: Gateway devices and drones; wherein the gateway device is configured to communicate with the drone; The drone is configured to perform the method according to any one of claims 1-10.