WO2019084843A1 - 固件升级方法、电子设备、相机系统和无人飞行器 - Google Patents

固件升级方法、电子设备、相机系统和无人飞行器 Download PDF

Info

Publication number
WO2019084843A1
WO2019084843A1 PCT/CN2017/108926 CN2017108926W WO2019084843A1 WO 2019084843 A1 WO2019084843 A1 WO 2019084843A1 CN 2017108926 W CN2017108926 W CN 2017108926W WO 2019084843 A1 WO2019084843 A1 WO 2019084843A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
firmware
storage area
processor
application
Prior art date
Application number
PCT/CN2017/108926
Other languages
English (en)
French (fr)
Inventor
翁超
杨勇
陈汉平
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2017/108926 priority Critical patent/WO2019084843A1/zh
Priority to CN201780027021.4A priority patent/CN109416629A/zh
Publication of WO2019084843A1 publication Critical patent/WO2019084843A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a firmware upgrade method, an electronic device, a camera system, and an unmanned aerial vehicle.
  • abnormal power failure may occur, which may cause the upgrade to fail.
  • the electronic device needs to be returned to the manufacturer for maintenance, which may affect the daily life and work of the user.
  • a firmware upgrade method of an electronic device including:
  • the upgrade firmware is obtained from the upgraded end device, and the upgrade firmware is written into the target storage area;
  • the boot loader stored in the boot loader storage area is run, the upgrade firmware in the target storage area is obtained, and the application stored in the application storage area is upgraded according to the upgrade firmware.
  • an electronic device including: a processor,
  • the processor is used to:
  • the upgrade firmware is obtained from the upgrade side processor, and the upgrade firmware is written into the target storage area;
  • the boot loader stored in the boot loader storage area is run, the upgrade firmware in the target storage area is obtained, and the application stored in the application storage area is upgraded according to the upgrade firmware.
  • a firmware upgrade method of a camera system including an upgrade end processor and a relay processor, and the method includes:
  • the transit processor is in the process of running an application stored in the application storage area of the relay processor, The transit processor obtains the upgrade firmware of the transit processor sent by the upgrade terminal processor, and writes the upgrade firmware to the first target storage area, where the upgrade firmware of the transit processor is the upgrade end processor from the storage The storage device that upgrades the firmware is read;
  • the relay processor runs a boot loader stored in the boot loader storage area, acquires upgrade firmware in the first target storage area, and upgrades an application stored in the application storage area according to the upgrade firmware.
  • a camera system including an upgrade end processor and a relay processor is provided.
  • the relay processor is used to:
  • an unmanned aerial vehicle comprising the camera system according to any of the above.
  • the upgrade firmware is obtained from the upgrade device, the upgrade firmware is written into the target storage area, and the upgrade firmware according to the target storage area is executed when the boot loader is run.
  • the present disclosure avoids the process of obtaining upgrade firmware from the upgrade device during the upgrade process by writing the upgrade firmware to the target storage area, greatly reducing the time taken for the upgrade, and avoiding the long-term upgrade.
  • the upgrade fails; on the other hand, for the transit processor in the camera system, the upgrade firmware of the relay processor obtained from the upgrade processor is written into the first target storage area, and When the transit processor runs the boot loader, the upgrade firmware is obtained from the first target storage area, and the application of the transfer processor is upgraded according to the upgrade firmware, thereby avoiding the power failure during the firmware upgrade of the transfer processor.
  • the upgrade fails; in another aspect, the present invention also discloses an unmanned aerial vehicle, Unmanned aircraft including the above camera system, camera system in unmanned aircraft firmware upgrade, due to a power failure prevented the upgrade is unsuccessful.
  • the present disclosure can also avoid the process of the user returning the electronic device, the camera system or the unmanned aerial vehicle to each manufacturer for maintenance due to the upgrade failure, and the maintenance rate for these products is also greatly reduced.
  • FIG. 1 is a block diagram schematically showing a system corresponding to a firmware upgrade method of an electronic device of some technologies
  • FIG. 2 schematically illustrates a flowchart of a firmware upgrade method of an electronic device according to an exemplary embodiment of the present disclosure
  • FIG. 3 is a block diagram schematically showing a firmware upgrading method corresponding system of an electronic device according to an exemplary embodiment of the present disclosure
  • FIG. 4 schematically illustrates a block diagram of an electronic device in accordance with an exemplary embodiment of the present disclosure
  • FIG. 5 schematically illustrates a flowchart of a firmware upgrade method of a camera system according to an exemplary embodiment of the present disclosure
  • FIG. 6 schematically illustrates a block diagram of a camera system in accordance with an exemplary embodiment of the present disclosure.
  • the current firmware upgrade method is described by taking an electronic device including a processor as an example, wherein the processor
  • the processor For any modular circuit that can have computing power, specifically, circuitry that can perform corresponding data operations for calling program code in memory.
  • the processor may be a microcontroller MCU, an FPGA, a DSP, or the like.
  • the following is a schematic illustration of a microcontroller MCU as an example. The latter part of this document refers to where the microcontroller MCU can be equivalently replaced using a processor.
  • the memory can be flash
  • the MCU can run the boot loader stored in the flash boot loader (BootLoader) and the application stored in the application store (Application)
  • the boot loader storage area is hereinafter referred to as the Loader area
  • the application storage area is hereinafter referred to as the APP area.
  • the MCU executes the boot loader in the Loader area to complete the firmware upgrade process
  • the MCU executes the application program in the APP area to complete the data operation.
  • the process of specific firmware upgrade can be described as follows: As shown in FIG.
  • the MCU 111 can set a flag bit and then jump to run the boot loader stored in the Loader area to upgrade from the upgrade device.
  • the upgrade firmware is read in 12, and the application stored in the APP area 112 is upgraded by using the read upgrade firmware overlay while reading the upgrade firmware, that is, using the read upgrade firmware to store in the APP area 112.
  • the application overwrites until the upgrade firmware is read and the APP area 112 is over. After the upgrade is successful, the MCU 111 jumps to run the upgraded application stored in the APP area 112.
  • the MCU is running the boot loader, which is obtained from the upgrade device on the one hand, and upgrades the application stored in the APP area with the upgrade firmware on the other hand.
  • This process takes a long time, usually up to the second level or Minute level. If an abnormal power failure occurs during this period, the APP area coverage will not end, resulting in incomplete code in the APP area, which will cause the electronic device to fail to upgrade, making the electronic device unable to operate normally.
  • the present disclosure provides a new firmware upgrade method for an electronic device.
  • FIG. 2 schematically shows a flowchart of a firmware upgrading method of an electronic device of an exemplary embodiment of the present disclosure.
  • the firmware upgrade method may include the following steps:
  • the execution body of the method may be an electronic device, and in particular, the execution body may be a processor of an electronic device, wherein the electronic device may be any device including a processor, wherein For the definition of the processor, please refer to the previous section.
  • the electronic device 31 detects that the upgrade firmware is stored in the upgrade terminal device 32 or detects that the upgrade terminal firmware is sent.
  • the electronic device 31 acquires the upgrade firmware from the upgrade terminal device 32.
  • the upgrade device 32 may be a device that is in communication with the electronic device 31, and the upgrade device 32 may be an electronic device.
  • the devices 31 are independent of each other, and may also be devices configured or installed on the electronic device 31.
  • the upgrade device 32 may be a storage device such as an SD card or other processor.
  • the upgrade terminal device 32 may store the upgrade firmware of the electronic device 31 or send the upgrade firmware to the electronic device 31.
  • an SD card can be installed on the upgrade device 32, and the processor of the upgrade device 32 reads the upgrade firmware stored in the SD card, and sends the upgrade firmware to the electronic device 31.
  • the electronic device 31 writes the upgrade firmware to the target storage area 311 when the upgrade firmware is acquired.
  • the target storage area 311 may be a storage area on the storage device configured on the electronic device 31. Specifically, the target storage area 311 may be a storage area on a flash configured on the electronic device 31.
  • the obtaining the upgrade firmware from the upgrade end device, and writing the upgrade firmware to the target storage area includes: acquiring, from the upgrade end device, multiple data packages of the upgrade firmware, and the The data packets are written directly to the target storage area.
  • the upgrade firmware may include multiple data packages, the upgrade firmware is stored in the form of multiple data packets on the upgrade end device, or the upgrade end sends multiple data packages of the upgrade firmware to the electronic device, and the electronic device may be upgraded.
  • the end device acquires a plurality of data packets and writes the plurality of data packets to the target storage area.
  • the obtaining the upgrade firmware from the upgrade device, and writing the upgrade firmware to the target storage area includes: acquiring, by the upgrade device, multiple data packets of the upgrade firmware, The plurality of data packets of the upgrade firmware are combined into an upgrade firmware, and the upgrade firmware is written to the target storage area.
  • the electronic device may acquire a plurality of data packets of the upgrade firmware from the upgrade terminal device; next, the electronic device may combine the multiple data packets into the upgrade firmware according to a preset rule, for example, may receive Multiple packets arrive at a complete upgrade firmware with preset rules; subsequently, the upgrade firmware is written to the target storage area.
  • the obtaining the upgrade firmware from the upgrade device, and writing the upgrade firmware to the target storage area includes: sending a plurality of data packet request instructions to the upgrade device; after each request for the data packet is sent Obtaining a data packet of the upgrade firmware sent by the upgrade end device.
  • the upgrading the firmware includes the following: the electronic device may send the multiple data packet requesting instructions to the upgrading terminal device, and the upgrade terminal device may send a data packet of the upgrade firmware to the electronic device after receiving the data packet requesting instruction. . For example, if the upgrade firmware consists of 100 data packets, the electronic device can send 100 data packet request instructions to the upgrade terminal device.
  • a resend instruction is sent to the upgrade end device to indicate that the upgrade end device is A packet whose serial number is consecutive to the sequence number of the previous packet starts to be retransmitted.
  • the data packet of each upgrade firmware may include a serial number
  • the electronic device may detect that the serial number of the currently acquired data packet is not continuous with the serial number of the obtained previous data packet.
  • the electronic device may send a resend command to the upgrade device to instruct the upgrade device to start retransmission from the data packet whose serial number is consecutive with the sequence number of the previous data packet.
  • the electronic device may send a resend instruction to the upgrade end device, where the retransmission instruction may include the information with the serial number 30 to indicate The upgrade end device starts resending from the data packet with the sequence number 31, wherein the retransmission command may include the sequence number of the acquired previous data packet, that is, the serial number 30.
  • the electronic device when the application is run, the upgrade firmware is written into the target storage area, the electronic device may jump to run the boot loader stored in the boot loader storage area, When the boot loader is run, the electronic device may acquire upgrade firmware of the target storage area, and upgrade the application of the application storage area by using the upgrade firmware to implement an application stored in an application storage area of the electronic device.
  • the purpose of the program to upgrade is not limited to, the firmware of the target storage area, the electronic device may acquire upgrade firmware of the target storage area, and upgrade the application of the application storage area by using the upgrade firmware to implement an application stored in an application storage area of the electronic device.
  • the obtaining the upgrade firmware in the target storage area, and upgrading the application stored in the application storage area according to the upgrade firmware comprises: acquiring data packets of the plurality of upgrade firmware in the target storage area, according to the The multiple packets are used to upgrade the applications stored in the application store.
  • the electronic device may acquire multiple data packages of the upgrade firmware in the target storage area, and upgrade the application stored in the application storage area according to the multiple data packages of the upgrade firmware, that is, use the firmware in the multiple data packages. Content overrides the application storage application.
  • the firmware upgrade method of the electronic device of the present disclosure may further include a process of verifying the upgrade firmware before upgrading the firmware to ensure the correctness of the upgrade and prevent malicious tampering with the firmware.
  • loading the program acquiring the upgrade firmware in the target storage area, and upgrading the application stored in the application storage area according to the upgrade firmware, when the first verification information and the second verification information match,
  • the boot loader stored in the boot loader storage area is run, the upgrade firmware in the target storage area is obtained, and the application stored in the application storage area is upgraded according to the upgrade firmware.
  • the electronic device may obtain the first verification information of the upgrade firmware from the upgrade terminal device, where the first verification information corresponds to the upgrade firmware; then, after obtaining the upgrade firmware, the electronic device may obtain the The upgrade firmware determines the second verification information; subsequently, the electronic device can determine whether the first verification information matches the second verification information. On one hand, if the first verification information matches the second verification information, the application is upgraded according to the upgrade firmware; on the other hand, if the first verification information does not match the second verification information, it needs to be re-executed.
  • the first check information and the second check information may be MD5 values of the upgrade firmware.
  • the present invention is not limited thereto, and other encryption algorithms may be used to implement data consistency verification. For example, the SHA1 algorithm may be used.
  • the GPG tool implements the above verification process.
  • the application storage area and the boot loader storage area and the target storage area may be storage areas on the same storage device, that is, storage of storage boot loaders and applications and storage electronic devices.
  • the memory that upgrades the firmware is the same memory on the electronic device.
  • the above application storage area and the boot loader storage area and the target storage area may both be storage areas on the same flash flash memory of the electronic device, that is, the storage firmware and the storage firmware acquired by the storage electronic device that store the boot loader and the application.
  • the memory is the same flash memory on the electronic device.
  • the application storage area and the boot loader storage area and the target storage area may also be storage areas on different storage devices, that is, storage and storage electronic devices that store boot loaders and applications.
  • the memory that upgrades the firmware is a different memory on the electronic device.
  • the program storage area and the boot loader storage area and the target storage area may both be storage areas on different flash memories of the electronic device, that is, a memory storing the boot loader and the application and the memory of the upgrade firmware acquired by the storage electronic device. It is a different flash memory on an electronic device.
  • the electronic device when the electronic device runs the application, the electronic device acquires the upgrade firmware from the upgrade terminal device, writes the upgrade firmware into the target storage area, and the electronic device runs the boot loader.
  • the application is upgraded according to the upgrade firmware of the target storage area
  • the present disclosure writes the upgrade firmware to the target storage area by copying the upgrade firmware stored in the target storage area to the application storage area.
  • the process takes very little time, usually at the millisecond level, avoiding the process of getting upgraded firmware from the upgraded device during the process of running the boot loader, greatly reducing the time it takes to upgrade and avoiding the long upgrade process. There is a power outage that causes the upgrade to fail.
  • an electronic device is further provided in the exemplary embodiment.
  • an electronic device 4 may include a processor 41, wherein the processor 41 may be configured to:
  • the upgrade firmware is obtained from the upgraded end device, and the upgrade firmware is written into the target storage area;
  • the boot loader stored in the boot loader storage area is run, the upgrade firmware in the target storage area is obtained, and the application stored in the application storage area is upgraded according to the upgrade firmware.
  • the upgrade firmware is acquired from the upgrade terminal device, the upgrade firmware is written into the target storage area, and when the boot loader is run, the application is performed according to the upgrade firmware of the target storage area.
  • Upgrade the present disclosure avoids the process of obtaining upgrade firmware from the upgrade device during the upgrade process by writing the upgrade firmware to the target storage area, greatly reducing the time taken for the upgrade, and avoiding the interruption due to the long-term upgrade process. The situation that the upgrade failed due to electricity.
  • the obtaining the upgrade firmware from the upgrade end device, and writing the upgrade firmware to the target storage area includes:
  • the obtaining the upgrade firmware in the target storage area, and upgrading the application stored in the application storage area according to the upgrade firmware includes:
  • a scheme of upgrading an application by upgrading a plurality of data packets of the firmware may be implemented.
  • the obtaining the upgrade firmware from the upgrade end device, and writing the upgrade firmware to the target storage area includes:
  • the obtaining, by the upgrade end device, the upgrade firmware data packet sequence includes:
  • each data packet of the upgrade firmware includes a serial number
  • the processor 41 is further configured to:
  • the processor 41 is further configured to:
  • the running boot loader stored in the boot loader storage area acquires the target storage area
  • the upgrade firmware in the upgrade of the application stored in the application store according to the upgrade firmware includes:
  • the application storage area and the boot loader storage area and the target storage area are storage areas on the same storage device.
  • the application storage area and the boot loader storage area are different from the target storage area by a storage area on a storage device.
  • the present disclosure does not define the specific locations of the application storage area, the boot loader storage area, and the target storage area, which helps developers to flexibly store them in conjunction with actual storage conditions.
  • the exemplary embodiments of the present disclosure further provide a firmware upgrade method of a camera system.
  • FIG. 5 schematically shows a flowchart of a firmware upgrade method of a camera system of an exemplary embodiment of the present disclosure.
  • the camera system can include an upgrade side processor and a relay processor.
  • the firmware upgrade method of the camera system may include the following steps:
  • the transit processor acquires an upgrade firmware of the transit processor sent by the upgrade terminal processor during the running of the application stored in the application storage area of the relay processor, and writes the upgrade firmware And entering the first target storage area, wherein the upgrade firmware of the transit processor is the upgrade end processor reads from the storage device storing the upgrade firmware.
  • the transit processor runs a boot loader stored in a boot loader storage area, acquires upgrade firmware in the first target storage area, and stores an application stored in the application storage area according to the upgrade firmware. Upgrade.
  • the upgrade firmware of the relay processor acquired from the upgrade terminal processor is written into the first target storage area, and
  • the transit processor runs the boot loader the upgrade firmware is obtained from the first target storage area, and the application of the transfer processor is upgraded according to the upgrade firmware, thereby avoiding the power failure during the firmware upgrade of the transfer processor. The situation that caused the upgrade to fail.
  • the camera system 6 may include a relay processor 611 and an upgrade processor 62.
  • the camera system may further include a PTZ control processor 612 and an ESC control processor 613;
  • the processor 62 can include an upgrade end processor 62 Corresponding storage device 63.
  • the upgrade side processor 62 can establish a connection with the relay processor 611 by means of wired or wireless transmission, and the relay processor 611 can establish a connection with the upgrade side processor 62 by an external protocol different from the internal protocol.
  • the relay processor 611 may be a transit MCU for at least one of conversion between an internal protocol and an external protocol, and control of an image sensor (not shown) of the camera system, in some embodiments
  • the relay processor 611 can also be used to parse or respond to control commands from the control terminal of the drone when the camera system is disposed on the drone;
  • the pan/tilt control processor 612 can be a gimbal
  • the MCU is used to control the attitude angle of the camera system, and can realize functions such as stabilization and anti-shake;
  • the ESC control processor 613 can be an ESC MCU for controlling the rotation of the motor during the attitude angle control;
  • the processor 62 can be an MCU or a DSP for encoding and completing the storage of the image stream.
  • the storage device 63 can be an SD card, and the upgrade firmware and the pan/tilt of the relay processor 611 can be stored thereon.
  • One or more of the upgrade firmware of the control processor 612 and the upgrade firmware of the ESC control processor 613 are upgraded. It should be understood that each of the relay processor 611, the pan/tilt control processor 612, the ESC control processor 613, and the upgrade terminal processor 62 may be independent chips, and each chip has its own flash memory area. In some embodiments, one or more of the relay processor 611, the pan/tilt control processor 612, the ESC control processor 613, and the upgrade side processor 62 may be disposed on the same chip.
  • the relay processor 611 can obtain the upgrade firmware of the relay processor 611 sent by the upgrade terminal processor 62 during the process of running the application stored in the application storage area of the relay processor. Specifically, the relay processor 611 can read the version number of the upgrade firmware sent by the upgrade processor 62 to the upgrade processor 611 by using a wired or wireless protocol, and compare the obtained version number with the version number of the current firmware of the relay processor 611. And in the case that the obtained version number is compared to the current version number, the relay processor 611 acquires the upgrade firmware of the relay processor 611 from the upgrade side processor 62, and writes the upgrade firmware to the first target storage area. Medium and set a flag.
  • the first target storage area may be, for example, a storage area on a flash memory communicatively coupled to the relay processor 611.
  • the upgrade firmware may be obtained by the upgrade side processor 62 reading from the inserted storage device 63 storing the upgrade firmware.
  • the relay processor 611 can run the boot loader stored in the boot loader storage area, obtain the upgrade firmware from the first target storage area, and execute the application stored in the application storage area of the transfer processor according to the upgrade firmware.
  • the program is upgraded.
  • the relay processor 611 of the camera system 6 in the present disclosure may be the electronic device described above.
  • the corresponding electronic device in the firmware upgrade method The content recorded in the above-mentioned firmware upgrade method of the electronic device and the electronic device can also be applied to the relay processor 611 described herein, and details are not described herein again.
  • the firmware upgrade process of the upgrade side processor 62 will be described.
  • the relay processor 611 determines that the firmware of the upgrade end processor 62 needs to be upgraded, the relay processor 611 sends a first upgrade instruction to the upgrade end processor; the upgrade end processor 62 receives the After the first upgrade instruction, the upgrade firmware of the upgrade terminal processor 62 is obtained from the storage device 63 storing the upgrade firmware, and the application stored in the application storage area of the upgrade terminal processor 62 is performed according to the upgrade firmware. upgrade.
  • the relay processor 611 can determine whether the upgrade end processor 62 needs to upgrade the firmware. Specifically, the relay processor 611 can read the version number of the upgrade firmware of the upgrade terminal processor 62 stored in the storage device 63 storing the upgrade firmware through the upgrade terminal processor 62 through the wired or wireless protocol, and read the upgrade terminal processor 62. The running firmware version number, comparing the two version numbers. When comparing the version number of the upgrade firmware to be higher than the running version number, it indicates that the firmware of the upgrade side processor 62 needs to be upgraded.
  • the relay processor 611 can send a first upgrade instruction to the upgrade side processor 62.
  • the upgrade terminal processor 62 may obtain the upgrade firmware of the upgrade terminal processor 62 from the storage device 63 storing the upgrade firmware, and apply the upgrade firmware to the upgrade terminal processor 62 according to the upgrade firmware.
  • the application stored in the program storage area is upgraded.
  • the upgrade end processor 62 may obtain an upgrade from the storage device 63 storing the upgrade firmware after the operation receives the first upgrade instruction.
  • the firmware of the end processor 62 is upgraded and the upgrade firmware is written to the second target storage area.
  • the second target storage area may be a storage area on the flash memory communicatively coupled to the upgrade side processor 62.
  • the upgrade side processor 62 runs the boot loader of the boot loader storage area of the upgrade side processor, acquires the upgrade firmware in the second target storage area, and according to the upgrade firmware to the application storage area of the upgrade side processor 62.
  • the stored application is upgraded.
  • the firmware upgrade process of the pan/tilt control processor 612 will be described.
  • the pan/tilt control processor 612 is connected to the relay processor 611.
  • the relay processor 611 determines that the firmware of the pan-tilt control processor 612 needs to be upgraded, the relay processor 611 acquires the sent by the upgrade terminal processor.
  • the pan/tilt control firmware of the processor 612 is sent to the pan/tilt control processor 612, wherein the upgrade firmware of the pan/tilt control processor 612 is the storage of the upgrade firmware from the storage upgrade processor 62.
  • the PTZ control processor 612 upgrades the application stored in the application storage area of the PTZ control processor 612 according to the upgrade firmware after receiving the upgrade firmware.
  • the relay processor 611 can determine whether the pan/tilt control processor 612 needs to upgrade the firmware. Specifically, the relay processor 611 can read the version number of the upgrade firmware of the PTZ control processor 612 stored in the storage device 63 storing the upgrade firmware through the upgrade terminal processor 62, and can obtain the PTZ control process through an internal protocol. The version number of the firmware currently running by the controller 612 compares the two version numbers. If the version number of the upgrade firmware is higher than the currently running version number, it indicates that the firmware of the PTZ control processor 612 needs to be upgraded. .
  • the relay processor 611 can obtain the upgrade firmware of the PTZ control processor 612 sent by the upgrade terminal processor 62, and send the upgrade firmware to the PTZ control processor 612, where The upgrade firmware of the pan/tilt control processor 612 is obtained by the upgrade side processor 62 reading from the storage device 63 storing the upgrade firmware.
  • the pan/tilt control processor 612 can upgrade the application stored in the application storage area of the pan/tilt control processor 612 according to the upgrade firmware.
  • the PTZ control processor 612 may write the upgrade firmware to the third target storage area after receiving the upgrade firmware. And set a flag.
  • the third target storage area may be a storage area on the flash memory communicably connected to the PTZ control processor 612.
  • the pan/tilt control processor 612 runs the boot loader stored in the boot loader storage area of the pan/tilt control processor, acquires the upgrade firmware in the third target storage area based on the set flag bit, and controls the pan/tilt according to the upgrade firmware.
  • the application stored in the application storage area of the processor 612 is upgraded.
  • the firmware upgrading process of the ESC control processor 613 will be described.
  • the ESC control processor 613 is connected to the PTZ control processor 612; when the relay processor 611 determines that the firmware of the ESC control processor 613 needs to be upgraded by the PTZ control processor 612, The relay processor 611 obtains the upgrade firmware of the ESC control processor 613 sent by the upgrade terminal processor 62, and sends the upgrade firmware to the ESC control processor 613 through the PTZ control processor 612, wherein the ESC
  • the upgrade firmware of the control processor 613 is obtained by the upgrade processor 62 from the storage device 63 storing the upgrade firmware; after receiving the upgrade firmware, the ESC control processor 613 selects the ESC according to the upgrade firmware.
  • the application stored in the application storage area of the control processor 613 is upgraded.
  • the relay processor 611 can determine whether the firmware of the ESC control processor 613 needs to be upgraded by the PTZ control processor 612. Specifically, the relay processor 611 can acquire the version number of the currently running firmware of the ESC control processor 613 through the PTZ control processor 612, and can read the storage device 63 storing the upgrade firmware through the upgrade end processor 62. The version number of the upgraded firmware of the stored ESC control processor 613 compares the two version numbers. When comparing the version number of the upgrade firmware to be higher than the currently running version number, the ESC control processor is indicated. The firmware of the 613 needs to be upgraded.
  • the relay processor 611 can obtain the upgrade firmware of the ESC control processor 613 sent by the upgrade terminal processor 62, and send the upgrade firmware to the PTZ control processor 612.
  • the upgrade control firmware of the ESC control processor 613 is sent from the storage device 63 storing the upgrade firmware.
  • the ESC control processor 613 can upgrade the application stored in the application storage area of the ESC control processor according to the upgrade firmware.
  • the ESC control processor 613 may write the upgrade firmware to the fourth target storage area after receiving the upgrade firmware.
  • the fourth target storage area may be a flash memory area of the ESC control processor 613.
  • the ESC control processor 613 runs the boot loader stored in the boot loader storage area of the ESC control processor, acquires the upgrade firmware in the fourth target storage area, and applies the upgrade control firmware to the ESC control processor 613.
  • the applications stored in the program store are upgraded.
  • the above describes the process in which the relay processor 611 interacts with the ESC control processor 613 through the PTZ control processor 612.
  • the concept of the present invention may further include the relay processor 611 directly and ESC.
  • the control processor 613 interacts to implement a scheme for upgrading the firmware of the ESC control processor 613.
  • the transit processor can periodically query whether the upgrade is completed; on the other hand, the terms “first”, “second”, “first” are used above. The “third” and “fourth” are for the purpose of distinguishing only, and do not limit the disclosure.
  • the boot loader needs to increase the operation of the entire upgraded Bluetooth protocol, which will cause both the application and the boot loader.
  • Bluetooth protocol parsing code There is a Bluetooth protocol parsing code, and the same code in multiple places will increase the cost of system maintenance and increase the complexity of the boot loader.
  • the firmware upgrade method of the camera system of the present disclosure can effectively reduce the complexity of the boot loader. degree.
  • an exemplary embodiment of the present disclosure also provides a camera system.
  • the camera system 6 of the exemplary embodiment of the present disclosure may include an upgrade end processor 62 and a relay processor 611, wherein the relay processor 611 is configured to:
  • the upgrade firmware of the relay processor 611 sent by the upgrade terminal processor 62 is obtained, and the upgrade firmware is written to the first target storage area.
  • the upgrade firmware of the transfer processor 611 is a storage device of the upgrade end processor 62 to upgrade the firmware from the storage. Set 63 to read;
  • the upgrade firmware of the relay processor acquired from the upgrade terminal processor 62 is written into the first target storage area, and is transited
  • the firmware of the upgrade is obtained from the first target storage area, and the application of the transfer processor 611 is upgraded according to the upgrade firmware, thereby avoiding power failure during the firmware upgrade process of the transfer processor 611. The situation that caused the upgrade to fail.
  • the relay processor 611 is configured to send a first upgrade to the upgrade end processor 62 when the relay processor 611 determines that the firmware of the upgrade end processor 62 needs to be upgraded. instruction;
  • the upgrade end processor 62 is configured to obtain, after the receiving the first upgrade instruction, the upgrade firmware of the upgrade end processor 62 from the storage device 63 storing the upgrade firmware, and the upgrade end processor according to the upgrade firmware
  • the application stored in the 62 application store is upgraded.
  • the upgrade firmware of the upgrade side processor 62 is obtained from the storage device 63 storing the upgrade firmware, and the upgrade end processor is upgraded according to the upgrade firmware Upgrading the applications stored in the application store of 62 includes:
  • the upgrade of the upgrade side processor 62 is obtained from the storage device 63 storing the upgrade firmware.
  • Firmware writing the upgrade firmware to the second target storage area;
  • the upgrade process of the upgrade end processor itself can be implemented, and the upgrade failure may be avoided due to power failure.
  • the camera system 6 further includes a PTZ control processor 612 connected to the relay processor 611;
  • the relay processor 611 is further configured to: when determining that the firmware of the PTZ control processor 612 needs to be upgraded, acquire upgrade firmware of the PTZ control processor 612 sent by the upgrade terminal processor 62, and upgrade the firmware. Sending to the PTZ control processor 612, wherein the upgrade firmware of the PTZ control processor 612 is read by the upgrade end processor 62 from the storage device 63 storing the upgrade firmware;
  • the PTZ control processor 612 is configured to upgrade an application stored in an application storage area of the PTZ control processor 612 according to the upgrade firmware after receiving the upgrade firmware.
  • upgrading an application stored in an application storage area of the PTZ control processor 612 according to the upgrade firmware includes:
  • the upgrade process of the PTZ control processor can be realized, and the situation that the upgrade fails due to power failure can be avoided.
  • the camera system 6 further includes an ESC control processor 613 connected to the PTZ control processor 612;
  • the relay processor 611 is further configured to acquire, when the firmware of the ESC control processor 613 needs to be upgraded by the PTZ control processor 612, acquire the PTZ control processor 612 sent by the upgrade end processor 62.
  • the firmware is upgraded, and the upgrade firmware is sent to the ESC control processor 613 through the PTZ control processor 612, wherein the upgrade firmware of the ESC control processor 613 is the upgrade end processor 62 to store the upgrade firmware from the storage.
  • the ESC control processor 613 is configured to upgrade an application stored in an application storage area of the ESC control processor 613 according to the upgrade firmware after receiving the upgrade firmware.
  • upgrading an application stored in an application storage area of the ESC control processor 613 according to the upgrade firmware includes:
  • the upgrade process of the ESC control processor can be realized, and the situation that the upgrade fails due to the power failure can be avoided.
  • the present disclosure also provides an unmanned aerial vehicle that can include the camera system described above.
  • the upgrade failure due to power failure can be avoided.
  • the present disclosure can also avoid the process of the user returning the electronic device, the camera system or the unmanned aerial vehicle to each manufacturer for maintenance due to the upgrade failure, and the maintenance rate for these products is also greatly reduced.
  • the technical solution according to an embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network.
  • a non-volatile storage medium which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
  • a number of instructions are included to cause a computing device (which may be a personal computer, server, terminal device, or network device, etc.) to perform a method in accordance with an embodiment of the present disclosure.
  • modules or units of equipment for action execution are mentioned in the detailed description above, such division is not mandatory. Indeed, in accordance with embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one of the modules or units described above may be further divided into multiple modules or units.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种固件升级方法、电子设备、相机系统和无人飞行器。该固件升级方法包括:在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中;运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级,由此可以避免异常断电而导致升级失败的情况。

Description

固件升级方法、电子设备、相机系统和无人飞行器 技术领域
本公开涉及计算机技术领域,具体而言,涉及一种固件升级方法、电子设备、相机系统和无人飞行器。
背景技术
电子设备在工作运行期间,可能会出现各种漏洞、兼容性不高、病毒易入侵、不能更好地满足用户要求等问题,这就需要对电子设备的固件进行升级。
然而,在固件升级的过程中,可能出现异常断电的情况,这就会造成升级失败,在这种情况下,可能需要手动利用升级工具对电子设备进行升级补救,过程较为繁琐。另外,如果用户在升级电子设备时出现异常断电且不能重新升级的情况,则需要将电子设备返回制造厂商进行维修,进而可能影响到用户的日常生活和工作。
发明内容
本公开的目的在于提供一种固件升级方法、电子设备、相机系统和无人飞行器,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的一个或者多个问题。
根据本公开的一个方面,提供一种电子设备的固件升级方法,包括:
在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中;
运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
根据本公开的一个方面,提供一种电子设备,包括:处理器,
所述处理器用于:
在运行应用程序存储区中存储的应用程序的过程中,从升级端处理器获取升级固件,将所述升级固件写入到目标存储区中;
运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
根据本公开的一个方面,提供一种相机系统的固件升级方法,所述相机系统包括升级端处理器以及中转处理器,所述方法包括:
所述中转处理器在运行中转处理器的应用程序存储区中存储的应用程序的过程中, 中转处理器获取升级端处理器发送的中转处理器的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器的升级固件是升级端处理器从存储升级固件的存储装置读取得到;
中转处理器运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
根据本公开的一个方面,提供一种相机系统,包括升级端处理器以及中转处理器,
所述中转处理器用于:
在运行中转处理器的应用程序存储区中存储的应用程序的过程中,获取升级端处理器发送的中转处理器的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器的升级固件是升级端处理器从存储升级固件的存储装置读取得到;
运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
根据本公开的一个方面,提供一种无人飞行器,包括根据上述任意一项所述的相机系统。
在本公开的一些实施例所提供的技术方案中,一方面,从升级端设备获取升级固件,将升级固件写入目标存储区中,并在运行引导装载程序时,根据目标存储区的升级固件对应用程序进行升级,本公开通过将升级固件写入目标存储区,避免了在升级过程中从升级端设备获取升级固件的过程,大大减少了升级所花费的时间,可以避免由于长时间的升级过程中出现断电而导致升级失败的情况;另一方面,针对相机系统中的中转处理器,通过将从升级端处理器获取的中转处理器的升级固件写入第一目标存储区,并在中转处理器运行引导装载程序时,从第一目标存储区获取其升级固件了,根据其升级固件对中转处理器的应用程序进行升级,可以避免在中转处理器固件升级过程中由于断电而导致升级失败的情况;再一方面,本发明还公开了一种无人飞行器,该无人飞行器包括上述相机系统,在对无人飞行器的相机系统进行固件升级过程中,可以避免由于断电而导致升级失败的情况。此外,本公开还可以避免由于升级失败,用户将电子设备、相机系统或无人飞行器返回各制造厂商进行维修的过程,对这些产品的维修率也随即大大降低。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示意性示出了一些技术的电子设备的固件升级方法对应系统的方框图;
图2示意性示出了根据本公开的示例性实施方式的电子设备的固件升级方法的流程图;
图3示意性示出了根据本公开的示例性实施方式的电子设备的固件升级方法对应系统的方框图;
图4示意性示出了根据本公开的示例性实施方式的电子设备的方框图;
图5示意性示出了根据本公开的示例性实施方式的相机系统的固件升级方法的流程图;以及
图6示意性示出了根据本公开的示例性实施方式的相机系统的方框图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的步骤。例如,有的步骤还可以分解,而有的步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
下面以包括处理器的电子设备为例对目前的固件升级方法进行说明,其中,处理器 为任何可以具有计算能力的模块化电路,具体地,可以为调用存储器中的程序代码执行相应的数据运算的电路。在实际应用中,所述处理器可以为微控制器MCU、FPGA、DSP等等。下面以微控制器MCU为例来进行示意性说明,本文后面的部分涉及到微控制器MCU的地方可以使用处理器来进行等同地替代。
MCU在运行时,调用存储器中的存储的程序,所述存储器可以为flash,MCU可以运行flash的引导装载程序存储区存储的引导装载程序(BootLoader)和应用程序存储区存储的应用程序(Application),为了说明方便,引导装载程序存储区以下简称Loader区,和应用程序存储区以下简称APP区。MCU执行Loader区中的引导装载程序完成固件升级的过程,MCU执行APP区中的应用程序程序以完成数据的运行。在现有技术中,具体固件升级的过程可以被描述如下:如图1所示,电子设备11的MCU 111在运行APP区112中存储的应用程序时,当发现升级端设备12中存在升级固件时,其中,升级端设备12可以是一个存储装置,例如SD卡,或者是其他的处理器,MCU 111可以设置一个标志位,然后跳转去运行Loader区存储的引导装载程序以从升级端设备12中读取该升级固件,在读取升级固件的同时利用读取到的升级固件覆盖对APP区112中存储的应用程序进行升级,即利用读取到的升级固件对APP区112中存储的应用程序进行覆盖,直至升级固件读取完且APP区112覆盖完为止。升级成功后,MCU 111跳转去运行APP区112存储的升级后的应用程序。
然而,MCU在运行引导装载程序,一方面要从升级端设备获取,另一方面要利用升级固件对APP区中存储的应用程序进行升级,这个过程需要花费较长的时间,通常达到秒级或分钟级。在这段时间内如果遇到异常断电,则会出现APP区覆盖没有结束的情况,导致APP区的代码不完整,会导致电子设备升级失败,使得电子设备无法正常运行。
鉴于此,本公开提供了一种新的电子设备的固件升级方法。
图2示意性示出了本公开的示例性实施方式的电子设备的固件升级方法的流程图。参考图2,所述固件升级方法可以包括以下步骤:
S20.在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中。
在本公开的示例性实施方式中,所述方法的执行主体可以是电子设备,具体地,所述执行主体可以是电子设备的处理器,其中,电子设备可以是包括处理器的任何设备,其中,处理器的定义请参见前述部分。如图3所示,电子设备31在运行应用程序存储区(即APP区311)中存储的应用程序的过程中,当检测到升级端设备32中存储有升级固件或者检测到升级端固件发送的升级固件时,电子设备31从升级端设备32获取升级固件。升级端设备32可以是与电子设备31通讯连接的设备,升级端设备32可以是与电子 设备31相互独立的设备,与也可以是配置或安装在电子设备31上的设备,其中,升级端设备32可以是一个存储装置,例如SD卡,或者是其他的处理器。升级端设备32可以存储有电子设备31的升级固件,或者向电子设备31发送升级固件。在实际应用中,升级端设备32上可以安装SD卡,升级端设备32的处理器读取SD卡中存储的升级固件,并向电子设备31发送所述升级固件。电子设备31在获取到所述升级固件时,将所述升级固件写入到目标存储区311。其中,目标存储区311可以为电子设备31上配置的存储装置上存储区,具体的,目标存储区311可以是电子设备31上配置的一flash上的储存区。
根据本公开的一些实施例,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:从升级端设备获取升级固件的多个数据包,并将所述多个数据包直接写入到目标存储区。具体地,所述升级固件可以包括多个数据包,升级固件以多个数据包的形式存储在升级端设备上,或者升级端向电子设备发送升级固件的多个数据包,电子设备可以从升级端设备获取多个数据包,并将所述多个数据包写入到目标存储区。
根据另外一些实施例,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包组合成升级固件,将所述升级固件写入到目标存储区。具体地,首先,电子设备可以就从升级端设备获取升级固件的多个数据包;接下来,电子设备可以将所述多个数据包按照预设的规则组合成升级固件,例如,可以将接收到的多个数据包以预设的规则合成一个完整的升级固件;随后,将升级固件写入到目标存储区。
具体的,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:向升级端设备发送多个数据包请求指令;在每发送一个所述数据包请求指令后,获取升级端设备发送的所述升级固件的一个数据包。具体地,升级固件包括多个数据包括:电子设备可以向升级端设备发送多个数据包请求指令,升级端设备每接收到一个数据包请求指令后,可以向电子设备发送升级固件的一个数据包。例如,若升级固件由100个数据包组成,则电子设备可以向升级端设备发送100个数据包请求指令。
此外,当检测到当前获取到的升级固件的数据包的序列号与获取到的前一数据包的序列号不连续时,向所述升级端设备发送重发指令以指示所述升级端设备从序列号与前一数据包的序列号连续的数据包开始重发。具体地,每一个升级固件的数据包都可以包括一个序列号,电子设备在获取到数据包时,可以检测当前获取到的数据包的序列号与获取到的前一个数据包的序列号不连续时,在检测出不连续时,电子设备可以向升级端设备发送一重发指令,以指示升级端设备从序列号与前一数据包的序列号连续的数据包开始重发。例如,以序列号为自然数序列为例,当电子设备检测到当前获取的数据包的 序列号为50并且获取到的前一数据包的序列号为30的情况下,电子设备可以向升级端设备发送重发指令,其中,该重发指令可以包含序列号为30的信息,以指示升级端设备从序列号为31的数据包开始重发,其中,所述重发指令中可以包括获取到的前一个数据包的序列号,即序列号30。
S22.运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
在本公开的示例性实施方式中,当在运行所述应用程序,将所述升级固件写入到目标存储区中,电子设备可以跳转去运行引导装载程序存储区中存储的引导装载程序,在运行所述引导装载程序时,电子设备可以获取目标存储区的升级固件,利用所述升级固件对应用程序存储区域的应用程序进行升级,以实现对电子设备的应用程序存储区中存储的应用程序进行升级的目的。
所述获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:获取所述目标存储区中的多个升级固件的数据包,根据所述多个数据包对应用程序存储区中存储的应用程序进行升级。具体地,电子设备可以获取目标存储区中的升级固件的多个数据包,并根据升级固件的多个数据包对应用程序存储区存储的应用程序进行升级,即使用多个数据包中的固件内容对应用程序存储应用程序进行覆盖。
根据本公开的一些实施例,本公开的电子设备的固件升级方法还可以包括在对固件升级之前,对升级固件进行校验的过程,以确保升级的正确性并防止恶意篡改固件。从升级端设备获取所述升级固件的第一校验信息;在获取到所述升级固件后,根据获取到的升级固件确定第二校验信息;所述运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:当所述第一校验信息和第二校验信息匹配时,运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
首先,电子设备可以从升级端设备获取升级固件的第一校验信息,其中,所述第一校验信息与升级固件相对应;接下来,电子设备在获取到升级固件后,可以根据获取到的升级固件确定第二校验信息;随后,电子设备可以判断第一校验信息与第二校验信息是否匹配。一方面,如果第一校验信息与第二校验信息匹配,则根据升级固件对应用程序进行升级;另一方面,如果第一校验信息与第二校验信息不匹配,则需要重新进行升级过程。其中,第一校验信息和第二校验信息可以是该升级固件的MD5值,然而不限于此,还可以采用其他加密算法来实现数据的一致性验证,例如,可以通过SHA1算法、 GPG工具实现上述校验过程。
根据本公开的一些实施例,上述应用程序存储区和引导装载程序存储区与目标存储区可以是同一存储装置上的存储区,即存储引导装载程序和应用程序的存储器与存储电子设备获取到的升级固件的存储器是电子设备上的同一个存储器。例如,上述应用程序存储区和引导装载程序存储区和目标存储区均可以是电子设备的同一flash闪存上的存储区,即存储引导装载程序和应用程序的存储器与存储电子设备获取到的升级固件的存储器是电子设备上的同一个flash闪存。
根据另外一些实施例,上述应用程序存储区和引导装载程序存储区与目标存储区还可以是不同的存储装置上的存储区,即存储引导装载程序和应用程序的存储器与存储电子设备获取到的升级固件的存储器是电子设备上的不同的存储器。例如,上述程序存储区和引导装载程序存储区和目标存储区均可以是电子设备的不同闪存上的存储区,即存储引导装载程序和应用程序的存储器与存储电子设备获取到的升级固件的存储器是电子设备上的不同的flash闪存。
在本公开的示例性实施方式的电子设备的固件升级方法中,电子设备在运行应用程序时,从升级端设备获取升级固件,将升级固件写入目标存储区中,电子设备在运行引导装载程序时,只需要根据目标存储区的升级固件对应用程序进行升级,本公开通过将升级固件写入目标存储区,即只需要将目标存储区存储的升级固件拷贝到应用程序存储区中,这个拷贝的过程耗费的时间很少,通常在毫秒级别,避免了在运行引导装载程序的过程中从升级端设备获取升级固件的过程,大大减少了升级所花费的时间,可以避免由于长时间的升级过程中出现断电而导致升级失败的情况。
进一步的,本示例实施方式中还提供了一种电子设备。
参考图4,根据本公开的示例性实施方式的电子设备4可以包括处理器41,其中,处理器41可以用于:
在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中;
运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
在本公开的示例性实施方式的电子设备中,从升级端设备获取升级固件,将升级固件写入目标存储区中,并在运行引导装载程序时,根据目标存储区的升级固件对应用程序进行升级,本公开通过将升级固件写入目标存储区,避免了在升级过程中从升级端设备获取升级固件的过程,大大减少了升级所花费的时间,可以避免由于长时间的升级过程中出现断电而导致升级失败的情况。
根据本公开的示例性实施例,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包写入到目标存储区;
所述获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
获取所述目标存储区中的所述升级固件的多个数据包,根据所述升级固件的多个数据包对应用程序存储区中存储的应用程序进行升级。
在本实施例中,可以实现通过升级固件的多个数据包对应用程序进行升级的方案。
根据本公开的示例性实施例,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包组合成升级固件,将所述升级固件写入到目标存储区。
在本实施例中,可以实现基于多个数据包组合成的升级固件对应用程序进行升级的方案。
根据本公开的示例性实施例,所述从所述升级端设备获取升级固件数据包序列包括:
向升级端设备发送多个数据包请求指令;
在每发送一个所述数据包请求指令后,获取升级端设备发送的所述升级固件的一个数据包。
通过一个请求指令对应一个数据包的方式,有助于发现在数据包传输过程中可能出现的错误,可以及时对发送过程进行恢复。
根据本公开的示例性实施例,所述升级固件的每一个数据包均包括一个序列号,所述处理器41还用于:
当检测到当前获取到的升级固件的数据包的序列号与获取到的前一数据包的序列号不连续时,向所述升级端设备发送重发指令以指示所述升级端设备从序列号与前一数据包的序列号连续的数据包开始重发。
通过检测序列号是否连续,避免了数据包传输混乱的情况,有助于电子设备对数据包进行整合并执行这些数据包,可以避免升级过程中发生错误。
根据本公开的示例性实施例,所述处理器41还用于:
从升级端设备获取所述升级固件的第一校验信息;在获取到所述升级固件后,根据获取到的升级固件确定第二校验信息;
其中,所述运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区 中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
当所述第一校验信息和第二校验信息匹配时,运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
通过对升级固件进行校验的过程,可以确保升级的正确性并防止恶意篡改固件。
根据本公开的示例性实施例,所述应用程序存储区和引导装载程序存储区与所述目标存储区是同一个存储装置上的存储区。
根据本公开的示例性实施例,所述应用程序存储区和引导装载程序存储区与所述目标存储区是不同的存储装置上的存储区。
本公开未对应用程序存储区、引导装载程序存储区及目标存储区的具体位置进行限定,有助于开发人员结合实际存储情况灵活地对它们进行存储。
此外,进一步的,本公开的示例性实施方式还提供了一种相机系统的固件升级方法。
图5示意性示出了本公开的示例性实施方式的相机系统的固件升级方法的流程图。所述相机系统可以包括升级端处理器以及中转处理器。参考图5,相机系统的固件升级方法可以包括以下步骤:
S50.所述中转处理器在运行中转处理器的应用程序存储区中存储的应用程序的过程中,中转处理器获取升级端处理器发送的中转处理器的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器的升级固件是升级端处理器从存储升级固件的存储装置读取得到。
S52.所述中转处理器运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
在本公开的示例性实施方式的相机系统的固件升级方法中,针对相机系统中的中转处理器,通过将从升级端处理器获取的中转处理器的升级固件写入第一目标存储区,并在中转处理器运行引导装载程序时,从第一目标存储区获取其升级固件了,根据其升级固件对中转处理器的应用程序进行升级,可以避免在中转处理器固件升级过程中由于断电而导致升级失败的情况。
下面将结合图6的方框图对本公开的示例性实施方式的相机系统的固件升级方法进行详细说明。
首先可以对图6所示的相机系统的各组成部分进行说明。具体的,相机系统6可以包括中转处理器611和升级端处理器62,在某些实施例中,所述相机系统还可以包括云台控制处理器612和电调控制处理器613;升级端处理器62可以包括与升级端处理器62 对应的存储装置63。
另外,升级端处理器62可以通过有线或者无线的传输方式与中转处理器611建立连接,所述中转处理器611可以通过区别于所述内部协议的外部协议与升级端处理器62建立连接。
具体的,中转处理器611可以为中转MCU,用于对内部协议与外部协议之间的转换、对相机系统的图像传感器(未示出)的控制中的至少一种,在某些实施例中,当所述相机系统设置在无人机上时,所述中转处理器611还可以用于对来自于无人机的控制终端的控制指令进行解析或响应;云台控制处理器612可以为云台MCU,用于对相机系统的姿态角进行控制,可以实现增稳防抖等功能;电调控制处理器613可以为电调MCU,用于在姿态角控制时对电机的转动进行控制;升级端处理器62可以为MCU或者DSP,用于对图像进行编码与或者完成码流的存储工作,另外,存储装置63可以为一SD卡,其上可以存储有中转处理器611的升级固件、云台控制处理器612的升级固件和电调控制处理器613的升级固件中的一个或多个升级固件。应当理解的是,中转处理器611、云台控制处理器612、电调控制处理器613、升级端处理器62中的每一个均可以是独立的芯片,并且每个芯片均具有各自的闪存区,在某些实施例中,中转处理器611、云台控制处理器612、电调控制处理器613、升级端处理器62中一个或多个可以被设置在相同的芯片上。
接下来,对相机系统6中各部分进行升级的方法分别进行说明。
在本公开的相机系统的固件升级方法的第一实施例中,对中转处理器611的固件升级过程进行说明。
首先,中转处理器611在运行中转处理器的应用程序存储区中存储的应用程序的过程中,可以获取升级端处理器62发送的中转处理器611的升级固件。具体的,中转处理器611可以通过有线或者无线协议读取升级端处理器62发送中转处理器611的升级固件的版本号,将获取的版本号与中转处理器611的当前固件的版本号进行比较,并在比较出获取的版本号比当前版本号高的情况下,中转处理器611从升级端处理器62获取中转处理器611的升级固件,并将该升级固件写入到第一目标存储区中,并设置一标志位。其中,第一目标存储区可以例如为与中转处理器611通信连接的闪存上的存储区。另外,该升级固件可以是升级端处理器62从插入的存储有升级固件的存储装置63读取而得到。
接下来,中转处理器611可以运行引导装载程序存储区中存储的引导装载程序,从第一目标存储区中获取升级固件,并根据该升级固件对中转处理器的应用程序存储区中存储的应用程序进行升级。
应当注意的是,本公开中的相机系统6的中转处理器611可以是上面描述的电子设 备的固件升级方法中对应的电子设备。记录在上述电子设备及电子设备的固件升级方法中的内容也可以应用到此处描述的中转处理器611,在此不再赘述。
在本公开的相机系统的固件升级方法的第二实施例中,对升级端处理器62的固件升级过程进行说明。在所述中转处理器611确定所述升级端处理器62的固件需要升级时,所述中转处理器611向所述升级端处理器发送第一升级指令;所述升级端处理器62在接收到所述第一升级指令后,从存储升级固件的存储装置63中获取升级端处理器62的升级固件,并根据所述升级固件对升级端处理器62的应用程序存储区中存储的应用程序进行升级。
具体的,首先,中转处理器611可以判断升级端处理器62是否需要升级固件。具体的,中转处理器611可以通过有线或者无线协议通过升级端处理器62读取存储升级固件的存储装置63中存储的升级端处理器62的升级固件的版本号,读取升级端处理器62正在运行的固件版本号,将这两个版本号进行比较,在比较出升级固件的版本号比正在运行的版本号高的情况下,则表明升级端处理器62的固件需要升级。
在升级端处理器62的固件需要升级时,中转处理器611可以向升级端处理器62发送第一升级指令。
接下来,升级端处理器62在接收到该第一升级指令后,可以从存储升级固件的存储装置63中获取升级端处理器62的升级固件,并根据升级固件对升级端处理器62的应用程序存储区存储的应用程序进行升级。
具体的,升级端处理器62在运行升级端处理器的应用程序存储区中存储的应用程序的过程中,在运行接收到第一升级指令后,可以从存储升级固件的存储装置63中获取升级端处理器62的升级固件,并将升级固件写入到第二目标存储区。其中,第二目标存储区可以是与升级端处理器62通信连接的闪存上的存储区。随后,升级端处理器62运行升级端处理器的引导装载程序存储区的引导装载程序,获取第二目标存储区中的升级固件,并根据升级固件对升级端处理器62的应用程序存储区中存储的应用程序进行升级。
在本公开的相机系统的固件升级方法的第三实施例中,对云台控制处理器612的固件升级过程进行说明。云台控制处理器612与所述中转处理器611连接,在所述中转处理器611判断所述云台控制处理器612的固件需要升级时,所述中转处理器611获取升级端处理器发送的云台控制处理器612的升级固件,并将所述升级固件发送给云台控制处理器612,其中,所述云台控制处理器612的升级固件是升级端处理器62从存储升级固件的存储装置63中读取得到的;云台控制处理器612在接收到所述升级固件后,根据所述升级固件对云台控制处理器612的应用程序存储区中存储的应用程序进行升级。
具体地,首先,中转处理器611可以判断云台控制处理器612是否需要升级固件。 具体的,中转处理器611可以通过升级端处理器62中读取存储升级固件的存储装置63中存储的云台控制处理器612的升级固件的版本号,并可以通过内部协议获取云台控制处理器612当前运行的固件的版本号,将这两个版本号进行比较,在比较出升级固件的版本号比当前运行的版本号高的情况下,则表明云台控制处理器612的固件需要升级。
在云台控制处理器612的固件需要升级时,中转处理器611可以获取升级端处理器62发送的云台控制处理器612的升级固件,并将升级固件发送给云台控制处理器612,其中,云台控制处理器612的升级固件是升级端处理器62从存储升级固件的存储装置63中读取而得到。
云台控制处理器612在接收到升级固件后,可以根据升级固件对云台控制处理器612的应用程序存储区中存储的应用程序进行升级。
具体的,云台控制处理器612在运行云台控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到升级固件后,可以将升级固件写入到第三目标存储区,并设置一标志位。其中,第三目标存储区可以是与云台控制处理器612通信连接的闪存上的存储区。随后,云台控制处理器612运行云台控制处理器的引导装载程序存储区存储的引导装载程序,基于设置的标志位获取第三目标存储区中的升级固件,并根据升级固件对云台控制处理器612的应用程序存储区中存储的应用程序进行升级。
在本公开的相机系统的固件升级方法的第四实施例中,对电调控制处理器613的固件升级过程进行说明。电调控制处理器613与所述云台控制处理器612连接;在所述中转处理器611通过所述云台控制处理器612判断所述电调控制处理器613的固件需要升级时,所述中转处理器611获取升级端处理器62发送的电调控制处理器613的升级固件,并将所述升级固件通过云台控制处理器612发送给电调控制处理器613,其中,所述电调控制处理器613的升级固件是升级端处理器62从存储升级固件的存储装置63中读取得到的;电调控制处理器613在接收到所述升级固件后,根据所述升级固件对电调控制处理器613的应用程序存储区中存储的应用程序进行升级。
具体地,首先,中转处理器611可以通过云台控制处理器612判断电调控制处理器613的固件是否需要升级。具体的,中转处理器611可以通过云台控制处理器612获取电调控制处理器613的当前运行的固件的版本号,并且可以通过升级端处理器62中读取存储升级固件的存储装置63中存储的电调控制处理器613的升级固件的版本号,将这两个版本号进行比较,在比较出升级固件的版本号比当前运行的版本号高的情况下,则表明电调控制处理器613的固件需要升级。
在电调控制处理器613的固件需要升级时,中转处理器611可以获取升级端处理器62发送的电调控制处理器613的升级固件,并将该升级固件通过云台控制处理器612发 送给电调控制处理器613,其中,电调控制处理器613的升级固件是升级端处理器62从存储升级固件的存储装置63中读取而得到。
电调控制处理器613在接收到升级固件后,可以根据升级固件对电调控制处理器的应用程序存储区中存储的应用程序进行升级。
具体的,电调控制处理器613在运行电调控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到升级固件后,可以将升级固件写入到第四目标存储区。其中,第四目标存储区可以是电调控制处理器613的闪存区。随后,电调控制处理器613运行电调控制处理器的引导装载程序存储区存储的引导装载程序,获取第四目标存储区中的升级固件,并根据升级固件对电调控制处理器613的应用程序存储区中存储的应用程序进行升级。
另外,上述描述了中转处理器611通过云台控制处理器612与电调控制处理器613进行交互的过程,然而,可以理解的是,本发明的构思还可以包括中转处理器611直接与电调控制处理器613进行交互以实现对电调控制处理器613的固件进行升级的方案。
此外,还应当注意的是,一方面,在各设备进行升级的过程中,中转处理器可以定时查询升级是否完成;另一方面,上述采用的术语“第一”、“第二”、“第三”、“第四”仅是为了区分的目的,不表示对本公开内容的限制。
通过上述相机系统的固件升级方法,在实现了分别对中转处理器、云台控制处理器、电调控制处理器和升级端处理器的升级过程的同时,首先,将升级固件拷贝至对应设备的闪存区,并设置一标志位便于确定升级固件的位置;接下来,各设备跳转至引导装载程序区运行引导装载程序,从闪存区中直接获取升级固件。一方面,此过程耗时为毫秒级,避免了目前的一些技术直接从升级端处理器获取升级固件的同时进行升级过程而造成耗时较长的问题,进而避免了由于一些技术升级耗时较长,当异常断电后导致升级失败的问题;另一方面,一些技术中,在升级固件时,引导装载程序需要增加整个升级的蓝牙协议解析等操作,这会造成应用程序与引导装载程序均存在蓝牙协议解析代码,而多处地方同样代码将增加系统维护的成本,并且增加了引导装载程序的复杂度,采用本公开的相机系统的固件升级方法可以有效地降低这种引导装载程序的复杂度。
进一步的,本公开的示例性实施方式还提供了一种相机系统。
仍参考图6,本公开的示例性实施方式的相机系统6可以包括升级端处理器62以及中转处理器611,其中,所述中转处理器611用于:
在运行中转处理器611的应用程序存储区中存储的应用程序的过程中,获取升级端处理器62发送的中转处理器611的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器611的升级固件是升级端处理器62从存储升级固件的存储装 置63读取得到;
运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
在本公开的示例性实施方式的相机系统中,针对相机系统中的中转处理器611,通过将从升级端处理器62获取的中转处理器的升级固件写入第一目标存储区,并在中转处理器611运行引导装载程序时,从第一目标存储区获取其升级固件了,根据其升级固件对中转处理器611的应用程序进行升级,可以避免在中转处理器611固件升级过程中由于断电而导致升级失败的情况。
根据本公开的示例性实施例,所述中转处理器611用于在所述中转处理器611确定所述升级端处理器62的固件需要升级时,向所述升级端处理器62发送第一升级指令;
所述升级端处理器62用于在接收到所述第一升级指令后,从存储升级固件的存储装置63中获取升级端处理器62的升级固件,并根据所述升级固件对升级端处理器62的应用程序存储区中存储的应用程序进行升级。
根据本公开的示例性实施例,在接收到所述第一升级指令后,从存储升级固件的存储装置63中获取升级端处理器62的升级固件,并根据所述升级固件对升级端处理器62的应用程序存储区中存储的应用程序进行升级包括:
在运行升级端处理器62的应用程序存储区中存储的应用程序的过程中,在运行接收到所述第一升级指令后,从存储升级固件的存储装置63中获取升级端处理器62的升级固件,将所述升级固件写入到第二目标存储区;
运行升级端处理器62的引导装载程序存储区存储的引导装载程序,获取所述第二目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
通过上述实施例,可以实现升级端处理器自身的升级过程,并可以避免由于断电而导致升级失败的情况。
根据本公开的示例性实施例,所述相机系统6还包括与所述中转处理器611连接的云台控制处理器612;其中,
所述中转处理器611,还用于在判断所述云台控制处理器612的固件需要升级时,获取升级端处理器62发送的云台控制处理器612的升级固件,并将所述升级固件发送给云台控制处理器612,其中,所述云台控制处理器612的升级固件是升级端处理器62从存储升级固件的存储装置63中读取得到的;
所述云台控制处理器612,用于在接收到所述升级固件后,根据所述升级固件对云台控制处理器612的应用程序存储区中存储的应用程序进行升级。
根据本公开的示例性实施例,在接收到所述升级固件后,根据所述升级固件对云台控制处理器612的应用程序存储区中存储的应用程序进行升级包括:
在运行云台控制处理器612的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第三目标存储区;
运行云台控制处理器612的引导装载程序存储区存储的引导装载程序,获取所述第三目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
通过上述实施例,可以实现云台控制处理器的升级过程,并可以避免由于断电而导致升级失败的情况。
根据本公开的示例性实施例,所述相机系统6还包括与所述云台控制处理器612连接的电调控制处理器613;其中,
所述中转处理器611,还用于在通过所述云台控制处理器612判断所述电调控制处理器613的固件需要升级时,获取升级端处理器62发送的云台控制处理器612的升级固件,并将所述升级固件通过云台控制处理器612发送给电调控制处理器613,其中,所述电调控制处理器613的升级固件是升级端处理器62从存储升级固件的存储装置63中读取得到的;
所述电调控制处理器613,用于在接收到所述升级固件后,根据所述升级固件对电调控制处理器613的应用程序存储区中存储的应用程序进行升级。
根据本公开的示例性实施例,在接收到所述升级固件后,根据所述升级固件对电调控制处理器613的应用程序存储区中存储的应用程序进行升级包括:
在运行电调控制处理器613的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第四目标存储区;
运行电调控制处理器613的引导装载程序存储区存储的引导装载程序,获取所述第四目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
通过上述实施例,可以实现电调控制处理器的升级过程,并可以避免由于断电而导致升级失败的情况。
进一步的,本公开还提供了一种无人飞行器,该无人飞行器可以包括上述相机系统。
在对无人飞行器的相机系统进行固件升级过程中,可以避免由于断电而导致升级失败的情况。
此外,本公开还可以避免由于升级失败,用户将电子设备、相机系统或无人飞行器返回各制造厂商进行维修的过程,对这些产品的维修率也随即大大降低。
应当注意,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
另外,由于本发明实施方式的程序运行性能分析装置的各个功能模块与上述方法发明实施方式中相同,因此在此不再赘述。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。
此外,上述附图仅是根据本发明示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其他实施例。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限。

Claims (31)

  1. 一种电子设备的固件升级方法,其特征在于,包括:
    在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中;
    运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
  2. 根据权利要求1所述的固件升级方法,其特征在于,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
    从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包写入到目标存储区;
    所述获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
    获取所述目标存储区中的所述升级固件的多个数据包,根据所述升级固件的多个数据包对应用程序存储区中存储的应用程序进行升级。
  3. 根据权利要求1所述的固件升级方法,其特征在于,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
    从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包组合成升级固件,将所述升级固件写入到目标存储区。
  4. 根据权利要求2或3所述的固件升级方法,其特征在于,所述从所述升级端设备获取升级固件数据包序列包括:
    向升级端设备发送多个数据包请求指令;
    在每发送一个所述数据包请求指令后,获取升级端设备发送的所述升级固件的一个数据包。
  5. 根据权利要求2或3所述的固件升级方法,其特征在于,所述升级固件的每一个数据包均包括一个序列号,所述方法还包括:
    当检测到当前获取到的升级固件的数据包的序列号与获取到的前一数据包的序列号不连续时,向所述升级端设备发送重发指令以指示所述升级端设备从序列号与前一数据包的序列号连续的数据包开始重发。
  6. 根据权利要求1所述的固件升级方法,其特征在于,所述方法还包括,从升级端设备获取所述升级固件的第一校验信息;在获取到所述升级固件后,根据获取到的升级固件确定第二校验信息;
    所述运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区 中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
    当所述第一校验信息和第二校验信息匹配时,运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
  7. 根据权利要求1所述的固件升级方法,其特征在于,所述应用程序存储区和引导装载程序存储区与所述目标存储区是同一个存储装置上的存储区。
  8. 根据权利要求1所述的固件升级方法,其特征在于,所述应用程序存储区和引导装载程序存储区与所述目标存储区是不同的存储装置上的存储区。
  9. 一种电子设备,其特征在于,包括:处理器,
    所述处理器用于:
    在运行应用程序存储区中存储的应用程序的过程中,从升级端设备获取升级固件,将所述升级固件写入到目标存储区中;
    运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
  10. 根据权利要求9所述的电子设备,其特征在于,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
    从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包写入到目标存储区;
    所述获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
    获取所述目标存储区中的所述升级固件的多个数据包,根据所述升级固件的多个数据包对应用程序存储区中存储的应用程序进行升级。
  11. 根据权利要求9所述的电子设备,其特征在于,所述从升级端设备获取升级固件,将所述升级固件写入到目标存储区中包括:
    从所述升级端设备获取所述升级固件的多个数据包,将所述升级固件的多个数据包组合成升级固件,将所述升级固件写入到目标存储区。
  12. 根据权利要求10或11所述的电子设备,其特征在于,所述从所述升级端设备获取升级固件数据包序列包括:
    向升级端设备发送多个数据包请求指令;
    在每发送一个所述数据包请求指令后,获取升级端设备发送的所述升级固件的一个数据包。
  13. 根据权利要求10或11所述的电子设备,其特征在于,所述升级固件的每一个数据包均包括一个序列号,所述处理器还用于:
    当检测到当前获取到的升级固件的数据包的序列号与获取到的前一数据包的序列号不连续时,向所述升级端设备发送重发指令以指示所述升级端设备从序列号与前一数据包的序列号连续的数据包开始重发。
  14. 根据权利要求9所述的电子设备,其特征在于,所述处理器还用于:
    从升级端设备获取所述升级固件的第一校验信息;在获取到所述升级固件后,根据获取到的升级固件确定第二校验信息;
    其中,所述运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级包括:
    当所述第一校验信息和第二校验信息匹配时,运行引导装载程序存储区中存储的引导装载程序,获取所述目标存储区中的升级固件,根据所述升级固件对应用程序存储区中存储的应用程序进行升级。
  15. 根据权利要求9所述的电子设备,其特征在于,所述应用程序存储区和引导装载程序存储区与所述目标存储区是同一个存储装置上的存储区。
  16. 根据权利要求9所述的电子设备,其特征在于,所述应用程序存储区和引导装载程序存储区与所述目标存储区是不同的存储装置上的存储区。
  17. 一种相机系统的固件升级方法,所述相机系统包括升级端处理器以及中转处理器;其特征在于,所述方法包括:
    所述中转处理器在运行中转处理器的应用程序存储区中存储的应用程序的过程中,中转处理器获取升级端处理器发送的中转处理器的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器的升级固件是升级端处理器从存储升级固件的存储装置读取得到;
    所述中转处理器运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  18. 根据权利要求17所述的固件升级方法,其特征在于,所述固件升级方法还包括:
    在所述中转处理器确定所述升级端处理器的固件需要升级时,所述中转处理器向所述升级端处理器发送第一升级指令;
    所述升级端处理器在接收到所述第一升级指令后,从存储升级固件的存储装 置中获取升级端处理器的升级固件,并根据所述升级固件对升级端处理器的应用程序存储区中存储的应用程序进行升级。
  19. 根据权利要求18所述的固件升级方法,其特征在于,所述升级端处理器在接收到所述第一升级指令后,从存储升级固件的存储装置中获取升级端处理器的升级固件,并根据所述升级固件对升级端处理器的应用程序存储区中存储的应用程序进行升级包括:
    升级端处理器在运行升级端处理器的应用程序存储区中存储的应用程序的过程中,在运行接收到所述第一升级指令后,从存储升级固件的存储装置中获取升级端处理器的升级固件,将所述升级固件写入到第二目标存储区;
    升级端处理器运行升级端处理器的引导装载程序存储区存储的引导装载程序,获取所述第二目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  20. 根据权利要求18所述的固件升级方法,其特征在于,所述相机系统还包括与所述中转处理器连接的云台控制处理器;所述固件升级方法还包括:
    在所述中转处理器判断所述云台控制处理器的固件需要升级时,所述中转处理器获取升级端处理器发送的云台控制处理器的升级固件,并将所述升级固件发送给云台控制处理器,其中,所述云台控制处理器的升级固件是升级端处理器从存储升级固件的存储装置中读取得到的;
    云台控制处理器在接收到所述升级固件后,根据所述升级固件对云台控制处理器的应用程序存储区中存储的应用程序进行升级。
  21. 根据权利要求20所述的固件升级方法,其特征在于,所述云台控制处理器在接收到所述升级固件后,根据所述升级固件对云台控制处理器的应用程序存储区中存储的应用程序进行升级包括:
    云台控制处理器在运行云台控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第三目标存储区;
    云台控制处理器运行云台控制处理器的引导装载程序存储区存储的引导装载程序,获取所述第三目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  22. 根据权利要求20所述的固件升级方法,其特征在于,所述相机系统还包括与所述云台控制处理器连接的电调控制处理器;所述方法还包括:
    在所述中转处理器通过所述云台控制处理器判断所述电调控制处理器的固件需要升级时,所述中转处理器获取升级端处理器发送的云台控制处理器的升级固 件,并将所述升级固件通过云台控制处理器发送给电调控制处理器,其中,所述电调控制处理器的升级固件是升级端处理器从存储升级固件的存储装置中读取得到的;
    电调控制处理器在接收到所述升级固件后,根据所述升级固件对电调控制处理器的应用程序存储区中存储的应用程序进行升级。
  23. 根据权利要求22所述的固件升级方法,其特征在于,
    所述电调控制处理器在接收到所述升级固件后,根据所述升级固件对电调控制处理器的应用程序存储区中存储的应用程序进行升级包括:
    电调控制处理器在运行电调控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第四目标存储区;
    电调控制处理器运行电调控制处理器的引导装载程序存储区存储的引导装载程序,获取所述第四目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  24. 一种相机系统,其特征在于,包括升级端处理器以及中转处理器,
    所述中转处理器用于:
    在运行中转处理器的应用程序存储区中存储的应用程序的过程中,获取升级端处理器发送的中转处理器的升级固件,并将所述升级固件写入到第一目标存储区中,其中,所述中转处理器的升级固件是升级端处理器从存储升级固件的存储装置读取得到;
    运行引导装载程序存储区中存储的引导装载程序,获取所述第一目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  25. 根据权利要求24所述的相机系统,其特征在于,
    所述中转处理器用于在所述中转处理器确定所述升级端处理器的固件需要升级时,向所述升级端处理器发送第一升级指令;
    所述升级端处理器用于在接收到所述第一升级指令后,从存储升级固件的存储装置中获取升级端处理器的升级固件,并根据所述升级固件对升级端处理器的应用程序存储区中存储的应用程序进行升级。
  26. 根据权利要求25所述的相机系统,其特征在于,在接收到所述第一升级指令后,从存储升级固件的存储装置中获取升级端处理器的升级固件,并根据所述升级固件对升级端处理器的应用程序存储区中存储的应用程序进行升级包括:
    在运行升级端处理器的应用程序存储区中存储的应用程序的过程中,在运行 接收到所述第一升级指令后,从存储升级固件的存储装置中获取升级端处理器的升级固件,将所述升级固件写入到第二目标存储区;
    运行升级端处理器的引导装载程序存储区存储的引导装载程序,获取所述第二目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  27. 根据权利要求25所述的相机系统,其特征在于,所述相机系统还包括与所述中转处理器连接的云台控制处理器;其中,
    所述中转处理器,还用于在判断所述云台控制处理器的固件需要升级时,获取升级端处理器发送的云台控制处理器的升级固件,并将所述升级固件发送给云台控制处理器,其中,所述云台控制处理器的升级固件是升级端处理器从存储升级固件的存储装置中读取得到的;
    所述云台控制处理器,用于在接收到所述升级固件后,根据所述升级固件对云台控制处理器的应用程序存储区中存储的应用程序进行升级。
  28. 根据权利要求27所述的相机系统,其特征在于,在接收到所述升级固件后,根据所述升级固件对云台控制处理器的应用程序存储区中存储的应用程序进行升级包括:
    在运行云台控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第三目标存储区;
    运行云台控制处理器的引导装载程序存储区存储的引导装载程序,获取所述第三目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  29. 根据权利要求27所述的相机系统,其特征在于,所述相机系统还包括与所述云台控制处理器连接的电调控制处理器;其中,
    所述中转处理器,还用于在通过所述云台控制处理器判断所述电调控制处理器的固件需要升级时,获取升级端处理器发送的云台控制处理器的升级固件,并将所述升级固件通过云台控制处理器发送给电调控制处理器,其中,所述电调控制处理器的升级固件是升级端处理器从存储升级固件的存储装置中读取得到的;
    所述电调控制处理器,用于在接收到所述升级固件后,根据所述升级固件对电调控制处理器的应用程序存储区中存储的应用程序进行升级。
  30. 根据权利要求29所述的相机系统,其特征在于,在接收到所述升级固件后,根据所述升级固件对电调控制处理器的应用程序存储区中存储的应用程序进行升级包括:
    在运行电调控制处理器的应用程序存储区中存储的应用程序的过程中,在接收到所述升级固件后,将所述升级固件写入到第四目标存储区;
    运行电调控制处理器的引导装载程序存储区存储的引导装载程序,获取所述第四目标存储区中的升级固件,根据所述升级固件对所述应用程序存储区中存储的应用程序进行升级。
  31. 一种无人飞行器,其特征在于,包括根据权利要求24至30任一项所述的相机系统。
PCT/CN2017/108926 2017-11-01 2017-11-01 固件升级方法、电子设备、相机系统和无人飞行器 WO2019084843A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/108926 WO2019084843A1 (zh) 2017-11-01 2017-11-01 固件升级方法、电子设备、相机系统和无人飞行器
CN201780027021.4A CN109416629A (zh) 2017-11-01 2017-11-01 固件升级方法、电子设备、相机系统和无人飞行器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/108926 WO2019084843A1 (zh) 2017-11-01 2017-11-01 固件升级方法、电子设备、相机系统和无人飞行器

Publications (1)

Publication Number Publication Date
WO2019084843A1 true WO2019084843A1 (zh) 2019-05-09

Family

ID=65463393

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108926 WO2019084843A1 (zh) 2017-11-01 2017-11-01 固件升级方法、电子设备、相机系统和无人飞行器

Country Status (2)

Country Link
CN (1) CN109416629A (zh)
WO (1) WO2019084843A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328272B (zh) * 2019-08-05 2024-03-22 浙江宇视科技有限公司 算法升级方法、装置、设备及存储介质
CN112445507A (zh) * 2019-09-05 2021-03-05 阿里巴巴集团控股有限公司 一种设备的升级方法和装置
CN112926063A (zh) * 2020-11-25 2021-06-08 杭州视洞科技有限公司 一种基于sd卡认证的嵌入式设备信息获取方法
CN112905218B (zh) * 2021-02-07 2023-05-26 杭州海康威视数字技术股份有限公司 一种固件升级方法、装置及设备
CN112783535A (zh) * 2021-03-10 2021-05-11 广州优胜汽车科技有限公司 固件升级方法、嵌入式装置及存储介质
CN113946360B (zh) * 2021-12-21 2022-04-19 万帮数字能源股份有限公司 功率转换控制器的引导程序的升级方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6813777B1 (en) * 1998-05-26 2004-11-02 Rockwell Collins Transaction dispatcher for a passenger entertainment system, method and article of manufacture
CN104007996A (zh) * 2014-06-16 2014-08-27 南京融教科技有限公司 一种分布式控制系统的可靠固件升级实现方法
CN104331312A (zh) * 2014-11-24 2015-02-04 东软熙康健康科技有限公司 一种固件升级方法及嵌入式设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6813776B2 (en) * 1998-10-06 2004-11-02 International Business Machines Corporation Method for automatic and semi-automatic event scheduling based on information embedded in multimedia content
CN108920162A (zh) * 2018-06-29 2018-11-30 深圳市道通智能航空技术有限公司 一种无人机系统中的模块升级方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6813777B1 (en) * 1998-05-26 2004-11-02 Rockwell Collins Transaction dispatcher for a passenger entertainment system, method and article of manufacture
CN104007996A (zh) * 2014-06-16 2014-08-27 南京融教科技有限公司 一种分布式控制系统的可靠固件升级实现方法
CN104331312A (zh) * 2014-11-24 2015-02-04 东软熙康健康科技有限公司 一种固件升级方法及嵌入式设备

Also Published As

Publication number Publication date
CN109416629A (zh) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2019084843A1 (zh) 固件升级方法、电子设备、相机系统和无人飞行器
US9652216B2 (en) System and method for providing out-of-band software or firmware upgrades for a switching device
US7809836B2 (en) System and method for automating bios firmware image recovery using a non-host processor and platform policy to select a donor system
US7552217B2 (en) System and method for Automatic firmware image recovery for server management operational code
US9015458B2 (en) Computer system and method for updating basic input/output system by switching between local mode and bypass mode through baseboard management controller
US7783794B2 (en) Remote USB access method
US20090094450A1 (en) Firmware image update and management
EP2372521A2 (en) Remote direct storage access
CN108509215B (zh) 一种系统软件的更换方法、装置、终端设备及存储介质
CN107066300B (zh) 一种存储设备的固件升级方法和存储设备
US9569621B2 (en) Information processing apparatus and information processing apparatus startup control method
US9519786B1 (en) Firmware integrity ensurance and update
CN111813428A (zh) 终端固件的升级方法、装置、电子设备及存储介质
CN104220981A (zh) 用于修改有效固件的固件包
CN111459524A (zh) 软件的升级方法、装置、系统
CN111522571B (zh) 设备升级方法、装置、终端设备及存储介质
CN115098301B (zh) 一种云原生场景下有状态应用的快照生成方法和系统
JP2017078998A (ja) 情報処理装置およびログ管理方法、並びにコンピュータ・プログラム
KR102110340B1 (ko) Plc 통신모듈에서 슬레이브 장치의 eeprom 복구 방법
CN115904831A (zh) 一种服务器固件的启动方法及终端
KR20150110860A (ko) 차량의 펌웨어 업데이트 장치 및 그 방법
CN111158783B (zh) 一种环境变量修改方法、装置、设备及可读存储介质
JP6898527B2 (ja) 電子装置を介したオペレーティングシステムの修復
CN114662082B (zh) 电子设备的访问控制方法、可读介质和电子设备
CN107451035B (zh) 用于计算机装置的错误状态数据提供方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17930587

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17930587

Country of ref document: EP

Kind code of ref document: A1