WO2019076037A1 - 升级固件的方法和装置 - Google Patents

升级固件的方法和装置 Download PDF

Info

Publication number
WO2019076037A1
WO2019076037A1 PCT/CN2018/086218 CN2018086218W WO2019076037A1 WO 2019076037 A1 WO2019076037 A1 WO 2019076037A1 CN 2018086218 W CN2018086218 W CN 2018086218W WO 2019076037 A1 WO2019076037 A1 WO 2019076037A1
Authority
WO
WIPO (PCT)
Prior art keywords
firmware
upgrade
server
upgrade file
information
Prior art date
Application number
PCT/CN2018/086218
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 深圳市道通智能航空技术有限公司
Publication of WO2019076037A1 publication Critical patent/WO2019076037A1/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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to firmware upgrade technology, and more particularly to a method and apparatus for upgrading firmware.
  • the traditional UAV firmware upgrade method is that the user downloads the corresponding firmware package on the official website of the drone product, and then copies the downloaded firmware package file to the Secure Digital Memory Card (SDMC), and then the SD card. You can upgrade after you replace the drone.
  • SDMC Secure Digital Memory Card
  • the user has the risk of selecting the wrong firmware, and the firmware upgrade requires multiple steps.
  • the user may forget the operation steps or the operation steps are incorrect, resulting in the upgrade failure, the unmanned aircraft being unable to use, and,
  • the upgrade process is cumbersome and the upgrade efficiency is low.
  • the embodiment of the invention provides a method and a device for upgrading firmware, which enables the device to upgrade the firmware according to the upgrade file sent by the firmware server, which simplifies the user operation and improves the success rate and efficiency of the firmware upgrade.
  • the embodiment of the invention provides a firmware upgrade method, including:
  • the device receives an upgrade file from the firmware server for firmware of the device, the upgrade file being determined by the firmware server according to current version information of the firmware;
  • the device determines whether the upgrade file is successfully received, and if so, upgrades the firmware according to the upgrade file.
  • the method further includes:
  • the device sends the current version information of the firmware to the firmware server.
  • the device sends the current version information of the firmware to the firmware server, including:
  • the device transmits current version information of the upgraded firmware to the firmware server.
  • the method further includes:
  • Whether the device determines whether the upgrade file is successfully received includes:
  • the device determines whether the size of the upgrade file received is the same as the size of the upgrade file in the upgrade information, and if the same, the upgrade file is successfully received; or
  • the device determines whether the MD5 value of the received upgrade file and the MD5 value in the upgrade information are the same. If they are the same, it is determined that the upgrade file is successfully received.
  • the method further includes:
  • the device When it is determined that the upgrade file reception fails, the device sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file.
  • the method further includes:
  • the device prompts the user whether to upgrade the firmware
  • the device upgrades the firmware according to the upgrade file, including:
  • the device After the device detects that the user confirms the upgrade operation, the device upgrades the firmware according to the upgrade file.
  • the method further includes:
  • the device determines whether the firmware is successfully upgraded
  • the device sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file;
  • the device determines that the number of upgrade failures is greater than or equal to a preset threshold, prompting the user that the firmware upgrade fails.
  • the embodiment of the invention provides a firmware upgrade method, including:
  • the firmware server sends an upgrade file for the firmware to the device to cause the device to upgrade the firmware according to the upgrade file.
  • the method further includes:
  • the firmware server receives the current version information of the firmware sent by the device.
  • determining, by the firmware server, whether the firmware needs to be upgraded according to the current version information of the firmware includes:
  • the firmware server determines a current version of the firmware according to current version information of the firmware
  • the firmware server determines whether the current version of the firmware is the latest version
  • the firmware server determines that the firmware needs to be upgraded.
  • the method further includes:
  • the firmware server sends upgrade information of the firmware to the device, and the upgrade information is used by the device to determine whether the firmware is successfully received.
  • the firmware server sends the upgrade file for the firmware to the device, including:
  • the firmware server determines whether the firmware supports cross-version upgrade
  • the firmware server sends an upgrade file for the latest version of the firmware to the device;
  • the firmware server sends an upgrade file for the next version of the firmware to the device.
  • An embodiment of the present invention provides an apparatus, including:
  • a first receiving module configured to receive an upgrade file for firmware of the device from the firmware server, where the upgrade file is determined by the firmware server according to current version information of the firmware;
  • an upgrade module configured to determine whether the upgrade file is successfully received, and if yes, upgrade the firmware according to the upgrade file.
  • the device further includes: a first sending module, configured to send current version information of the firmware to the firmware server.
  • a first sending module configured to send current version information of the firmware to the firmware server.
  • the upgrade module is further configured to:
  • Determining whether the firmware is successfully upgraded if not, sending a request message to the firmware server, the request message is used to request the firmware server to resend the upgrade file; if it is determined that the number of upgrade failures is greater than or equal to the pre- Set a threshold to prompt the user that the firmware upgrade failed.
  • the upgrade module is further configured to:
  • the first sending module is further configured to:
  • Receiving the request message sending a request message to the firmware server, the request message for requesting the firmware server to resend the upgrade file.
  • the upgrade module is specifically configured to:
  • the embodiment of the invention provides a firmware server, including:
  • a second receiving module configured to receive current version information of the firmware sent by the device
  • a processing module configured to determine, according to the current version information of the firmware, whether the firmware needs to be upgraded, and if yes, send a notification message to the second sending module;
  • a second sending module configured to receive the notification message, and send an upgrade file for the firmware to the device, so that the device upgrades the firmware according to the upgrade file.
  • the processing module is specifically configured to determine, according to current version information of the firmware, whether the firmware needs to be upgraded:
  • the second sending module is further configured to:
  • the second sending module is specifically configured to: send, by using the following manner, the upgrade file for the firmware to the device:
  • An embodiment of the present invention provides a device, including a first processor and a first computer readable storage medium, where the first computer readable storage medium stores a first computer program, and the first processor is used to call the The first computer program is described to perform any of the above methods of upgrading firmware.
  • the embodiment of the present invention provides a firmware server, including a second processor and a second computer readable storage medium, where the second computer readable storage medium stores a second computer program, and the second processor is used to invoke The second computer program to perform any of the above methods of upgrading firmware.
  • Embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program for performing the steps of any of the above methods for upgrading firmware when executed by a processor.
  • the device receives an upgrade file for the firmware from a firmware server, where the upgrade file is determined by the firmware server according to current firmware information of the firmware; and the device determines whether the upgrade file is received. Successful, if yes, the firmware is upgraded according to the upgrade file.
  • the device performs firmware upgrade according to the upgrade file sent by the firmware server, which simplifies user operations and improves the success rate and efficiency of the firmware upgrade.
  • FIG. 1 is a flowchart of a method for upgrading firmware according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for upgrading firmware on a device side according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for upgrading firmware on a firmware server side according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a device according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of a firmware server according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of another firmware server according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a system for upgrading firmware according to an embodiment of the present invention.
  • the steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions.
  • a computer system such as a set of computer executable instructions.
  • the steps in the methods described below can be performed using a processor in a device.
  • logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • a first embodiment of the present invention provides a method for upgrading firmware, including:
  • Step 100 The device sends the current version information of the firmware to the firmware server.
  • the device may refer to an Unmanned Aerial Vehicle (UAV); or, the device refers to a remote control device for controlling the UAV. This is not limited here.
  • UAV Unmanned Aerial Vehicle
  • the firmware refers to a hardware driver stored in a memory disposed in the device or an upper layer application executed by the processor. Among them, multiple firmwares can be stored in the memory, and different firmwares can correspond to different hardware.
  • the device may send the current version information of the firmware to the firmware server in any of the following ways.
  • the device periodically sends current version information of the firmware to the firmware server.
  • the device may send the current version information of the firmware to the firmware server according to a preset period.
  • the preset period corresponding to each firmware may be the same or different, and is not limited herein.
  • the firmware of the device to send the current version information may be specified by the firmware server, or is pre-configured, or the device setting triggers the sending condition, and determines the firmware that satisfies the trigger sending condition, and sends the current version information of the firmware to The firmware server is not limited here.
  • the trigger sending condition set by the device may be a preset time threshold after the firmware upgrade, or other conditions, and is not limited herein.
  • the device when receiving the query message from the firmware server, the device sends the current version information of the firmware queried by the query message to the firmware server.
  • the device sends the current version information of the upgraded firmware to the firmware server. Specifically, in one case, if the device needs to be upgraded multiple times to upgrade to the latest version, then after each upgrade succeeds one version, it is also necessary to determine whether to continue the upgrade, that is, the current version information of the firmware after the firmware upgrade is successful. Sended to the firmware server, the firmware server receives the current version information of the firmware to determine whether to proceed with the upgrade.
  • the device can perform a combination of at least two of the above.
  • the device receives the firmware server's query message, carries the firmware required by the firmware server for the query, and the period for the firmware.
  • the device may send the current version information of the firmware indicated by the query message to the firmware server according to the query message according to the query message.
  • the step 100 when the current version information of the firmware of the device is stored in the firmware server, the step 100 may be omitted, and the firmware server may determine whether the firmware needs to be upgraded according to the current version information of the firmware of the device. If the firmware needs to be upgraded, you can send the firmware upgrade file directly to the device.
  • the device may send the current version information of the partial firmware to the firmware server, or may send the current version information of all the firmware to the firmware server.
  • the device sends the current version information of two or more firmwares to the firmware server
  • the current version information of two or more firmwares may be sent to the firmware server one by one, or two or more firmware may be used.
  • the current version information is sent to the firmware server at the same time, and may be sent to the firmware server in other manners, which is not limited in this embodiment of the present invention.
  • Step 101 The firmware server receives current version information of the firmware from the device, determines, according to the current version information of the firmware, whether the firmware needs to be upgraded, and if necessary, sends an upgrade file for the firmware to the device, to The device is caused to upgrade the firmware according to the upgrade file.
  • the firmware server determining whether the firmware needs to be upgraded according to the current version information of the firmware may include:
  • the firmware server determines the current version of the firmware based on the current version information of the firmware; the firmware server determines whether the current version of the firmware is the latest version; if not, the firmware server determines that the firmware needs to be upgraded.
  • the current version information may include a current version number of the firmware or other information that can uniquely identify the version.
  • the firmware server can compare the current version of the firmware obtained from the device with the latest version stored in the firmware server, for example, the version number of the comparison version, etc., to determine whether an upgrade is required, if the version number of the current version is lower than the latest version.
  • the version number determines that the firmware needs to be upgraded; if the version number of the current version is the same as the version number of the latest version, or the version number of the current version is higher than the version number of the latest version, it is determined that the firmware does not need to be upgraded.
  • the firmware server can also compare the current version of the firmware obtained from the device with any version stored in the firmware server, for example, the version number of the comparison version, etc., when the firmware server determines the upgrade file of the firmware stored by itself, When there is a new upgrade file with version information than the current version information of the obtained firmware, it is determined that the firmware needs to be upgraded;
  • the firmware server determines that the upgrade file of the firmware stored by itself does not have a new upgrade file of the version information than the current version information of the obtained firmware, it is determined that the firmware does not need to be upgraded.
  • the method may further include: when the firmware server determines that the firmware needs to be upgraded, sending a notification message for the firmware to the device; the notification message is used to notify the device that the firmware needs to be upgraded, wherein the notification message may include an upgrade.
  • the version number of the file, etc. The device receives the notification message of the firmware server. If the device confirms the upgrade according to the notification message, the device may send a request message to the firmware server, where the request message is used to request to download the upgrade file of the firmware, for example, the request message.
  • the version number of the upgrade file may be included, and the version number may be the same as the version number in the notification message, or different, and is not limited herein; after receiving the request message sent by the device, the firmware server sends the firmware to the device. Upgrade file, the version number of the upgrade file is the same as the version number in the request message.
  • the method may further include:
  • the firmware server can determine whether the firmware in the device supports cross-version upgrade, and if so, send the latest version of the upgrade file to the device; If it is not supported, send the upgrade file of the next version of the current version to the device, and gradually upgrade the firmware to the latest version. For example, after the device successfully upgrades the firmware according to the upgrade file of the next version, the device may send the version information of the next version to the firmware server, that is, perform the third implementation manner described in the foregoing step 100, and cycle the above steps. Until the device upgrades the firmware to the latest firmware version.
  • the firmware server can determine whether the firmware supports cross-version upgrade based on current version information of the firmware sent by the device. For specific implementation, refer to any one or several of the following ways.
  • the firmware server pre-stores the version information of the firmware and whether the cross-version upgrade is supported. In the corresponding relationship, it is found whether the current version information of the firmware supports the cross-version upgrade, and if the cross-version is supported, the cross-version is supported. Upgrade to ensure that the firmware supports cross-version upgrades; if it is found that cross-version upgrades are not supported, then it is determined that the firmware does not support cross-version upgrades.
  • the firmware server pre-stores version information that supports cross-version upgrade, and searches for the current version information of the firmware in the version information that supports cross-version upgrade. If found, it determines that the firmware supports cross-version upgrade; if not, Then make sure the firmware does not support cross-version upgrades.
  • the firmware server pre-stores version information that does not support cross-version upgrade, and searches for the current version information of the firmware in the version information that does not support cross-version upgrade. If found, it determines that the firmware does not support cross-version upgrade; If not, then make sure the firmware supports cross-version upgrades.
  • the request message may specifically include: an identifier of the firmware to be upgraded and information indicating a version to be upgraded, such as a version number of the above version.
  • the process ends.
  • Step 102 The device receives an upgrade file for the firmware from the firmware server, and determines whether the upgrade file is successfully received. If yes, the firmware is upgraded according to the upgrade file.
  • the device can determine whether the upgrade file is successfully received by the received upgrade information.
  • the device may receive the upgrade information before receiving the upgrade file.
  • the upgrade information is carried in the notification message sent by the firmware server.
  • the device may carry the upgrade information when the upgrade file is received.
  • the upgrade information may include at least one or more of an upgrade file size, a message digest algorithm fifth version (MD5, Message Digest Algorithm 5) value, and the like of the upgrade file.
  • MD5 message digest algorithm fifth version
  • MD5 Message Digest Algorithm 5
  • the device can determine whether the upgrade file is successfully received through the received upgrade information.
  • the upgrade information includes the size of the upgrade file, determine whether the size of the upgrade file received and the size of the upgrade file in the upgrade information are the same. If the information is the same, it is determined that the reception is successful. If not, the reception failure is determined.
  • the upgrade information includes the MD5 value of the upgrade file, it is determined whether the MD5 value of the received upgrade file and the MD5 value of the upgrade file in the upgrade information are the same. If they are the same, it is determined that the reception is successful, if not, If the upgrade information includes the above two types of information, the foregoing determination manner may be combined to perform the determination. If the information is the same, it is determined that the upgrade file is successfully received; if at least one is not the same, the judgment is performed. The upgrade file received failed to receive.
  • the upgrade information includes other information, it can also be judged based on other information, which is not limited herein.
  • the original file of the firmware can be erased and the received upgrade file can be written to implement the upgrade.
  • the device when it is determined that the upgrade file fails to be received, the device sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file.
  • the device may determine, according to the upgrade information, whether there is sufficient storage.
  • the space stores the upgrade file to be received. If the device determines that there is not enough storage space, the device may not send a request message to the device. After determining that there is enough space to store the upgrade file to be received, the device sends a request message to the device.
  • determining whether the available storage space of the user meets the storage upgrade file includes:
  • the size of the upgrade file in the upgrade information is determined to be less than or equal to the available storage space of the upgrade information, and the available storage space of the upgrade information is determined to satisfy the storage upgrade file.
  • the upgrade file of the old version is deleted, or the process ends.
  • the method may further include: after the device determines that the upgrade file is successfully received, prompting the user to upgrade the firmware, and after detecting that the user confirms the upgrade operation, upgrading the firmware according to the upgrade file.
  • the device when the device is a drone, since the drone performs the corresponding task under the control of the remote control device, the device can prompt the user whether to upgrade the firmware in the drone through the remote control device.
  • the drone sends a prompt message to the remote control device, and the remote control device prompts the user according to the prompt message; after detecting that the user confirms the upgrade operation, the remote control device sends an instruction for upgrading to the drone; the drone confirms the The firmware is upgraded.
  • the drone sends a prompt message to the remote control device, and the remote control device sends a prompt message to the mobile terminal connected to the remote control device, and the mobile terminal prompts the user according to the prompt message; after detecting that the user confirms the upgrade operation, the mobile terminal sends the prompt message to the remote control device.
  • the remote control device receives an instruction to perform the upgrade, and transmits the received instruction for upgrading to the drone.
  • the process ends when it is detected that the user confirms that the upgrade operation is not performed.
  • the method may further include:
  • the device determines whether the firmware is successfully upgraded, and if not, sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file;
  • the user is prompted to upgrade the firmware. For example, the user is prompted to upgrade the identity of the failed firmware.
  • the device determining whether the firmware is successfully upgraded may include:
  • a firmware device may be networked by the server or other network, such as 5G (5 th Generation) mobile communication network that is not further defined.
  • 5G 5 th Generation
  • the device performs firmware upgrade according to the upgrade file sent by the firmware server, which simplifies user operations and improves the success rate and efficiency of the firmware upgrade.
  • a second embodiment of the present invention further provides a method for upgrading firmware, which is applied to the device side, and includes:
  • Step 200 The device sends the current version information of the firmware to the firmware server.
  • the device may refer to an Unmanned Aerial Vehicle (UAV); or, the device refers to a remote control device for controlling the UAV. This is not limited here.
  • UAV Unmanned Aerial Vehicle
  • the firmware refers to the hardware driver stored in the memory configured in the device. Among them, multiple firmwares can be stored in the memory, and different firmwares can correspond to different hardware.
  • the device may send the current version information of the firmware to the firmware server in any of the following ways.
  • the device periodically sends current version information of the firmware to the firmware server.
  • the device may send the current version information of the firmware to the firmware server according to a preset period.
  • the preset period corresponding to each firmware may be the same or different, and is not limited herein.
  • the firmware of the device to send the current version information may be specified by the firmware server, or is pre-configured, or the device setting triggers the sending condition, and determines the firmware that satisfies the trigger sending condition, and sends the current version information of the firmware to The firmware server is not limited here.
  • the trigger sending condition set by the device may be a preset time threshold after the firmware upgrade, or other conditions, and is not limited herein.
  • the device when receiving the query message from the firmware server, the device sends the current version information of the firmware queried by the query message to the firmware server.
  • the device sends the current version information of the upgraded firmware to the firmware server. Specifically, in one case, if the device needs to be upgraded multiple times to upgrade to the latest version, then after each upgrade succeeds one version, it is also necessary to determine whether to continue the upgrade, that is, the current version information of the firmware after the firmware upgrade is successful. Sended to the firmware server, the firmware server receives the current version information of the firmware to determine whether to proceed with the upgrade.
  • the device can perform a combination of at least two of the above.
  • the device receives the firmware server's query message, carries the firmware required by the firmware server for the query, and the period for the firmware.
  • the device may send the current version information of the firmware indicated by the query message to the firmware server according to the query message according to the query message.
  • the device may send the current version information of the partial firmware to the firmware server, or may send the current version information of all the firmware to the firmware server.
  • the device sends the current version information of two or more firmwares to the firmware server
  • the current version information of two or more firmwares may be sent to the firmware server one by one, or two or more firmware may be used.
  • the current version information is sent to the firmware server at the same time, and may be sent to the firmware server in other manners, which is not limited in this embodiment of the present invention.
  • the device receives the upgrade information of the firmware server, and sends a file download instruction to the firmware server.
  • Step 201 The device receives an upgrade file for the firmware from the firmware server, and determines whether the upgrade file is successfully received. If yes, the firmware is upgraded according to the upgrade file.
  • the device can determine whether the upgrade file is successfully received by the received upgrade information.
  • the device may receive the upgrade information before receiving the upgrade file.
  • the upgrade information is carried in the notification message sent by the firmware server.
  • the device may carry the upgrade information when the upgrade file is received.
  • the upgrade information may include at least one or more of an upgrade file size, a message digest algorithm fifth version (MD5, Message Digest Algorithm 5) value, and the like of the upgrade file.
  • MD5 message digest algorithm fifth version
  • MD5 Message Digest Algorithm 5
  • the device can determine whether the upgrade file is successfully received through the received upgrade information.
  • the upgrade information includes the size of the upgrade file, determine whether the size of the upgrade file received and the size of the upgrade file in the upgrade information are the same. If the information is the same, it is determined that the reception is successful. If not, the reception failure is determined.
  • the upgrade information includes the MD5 value of the upgrade file, it is determined whether the MD5 value of the received upgrade file and the MD5 value of the upgrade file in the upgrade information are the same. If they are the same, it is determined that the reception is successful, if not, If the upgrade information includes the above two types of information, the foregoing determination manner may be combined to perform the determination. If the information is the same, it is determined that the upgrade file is successfully received; if at least one is not the same, the judgment is performed. The upgrade file received failed to receive.
  • the upgrade information includes other information, it can also be judged based on other information, which is not limited herein.
  • the original file of the firmware can be erased and the received upgrade file can be written to implement the upgrade.
  • the device when it is determined that the upgrade file fails to be received, the device sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file.
  • the device may determine, according to the upgrade information, whether there is sufficient storage.
  • the space stores the upgrade file to be received. If the device determines that there is not enough storage space, the device may not send a request message to the device. After determining that there is enough space to store the upgrade file to be received, the device sends a request message to the device.
  • determining whether the available storage space of the user meets the storage upgrade file includes:
  • the size of the upgrade file in the upgrade information is determined to be less than or equal to the available storage space of the upgrade information, and the available storage space of the upgrade information is determined to satisfy the storage upgrade file.
  • the upgrade file of the old version is deleted, or the process ends.
  • the method may further include: after the device determines that the upgrade file is successfully received, prompting the user to upgrade the firmware, and after detecting that the user confirms the upgrade operation, upgrading the firmware according to the upgrade file.
  • the device when the device is a drone, since the drone performs the corresponding task under the control of the remote control device, the device can prompt the user whether to upgrade the firmware in the drone through the remote control device.
  • the drone sends a prompt message to the remote control device, and the remote control device prompts the user according to the prompt message; after detecting that the user confirms the upgrade operation, the remote control device sends an instruction for upgrading to the drone; so that the drone confirms based on the instruction. Upgrade the firmware.
  • the drone sends a prompt message to the remote control device, and the remote control device sends a prompt message to the mobile terminal connected to the remote control device, and the mobile terminal prompts the user according to the prompt message; after detecting that the user confirms the upgrade operation, the mobile terminal sends the prompt message to the remote control device.
  • the remote control device receives an instruction to perform the upgrade, and transmits the received instruction for upgrading to the drone.
  • the remote control device may include a user terminal, a remote controller, or a combination thereof.
  • the user terminal may include a terminal such as a smart phone or a tablet computer, and the remote controller may be used to control operations such as flight of the drone.
  • the remote controller may be configured with an output device such as a display screen to implement the function of prompting the user.
  • the process ends when it is detected that the user confirms that the upgrade operation is not performed.
  • the method may further include:
  • the device determines whether the firmware is successfully upgraded, and if not, sends a request message to the firmware server, where the request message is used to request the firmware server to resend the upgrade file;
  • the user is prompted to upgrade the firmware. For example, the user is prompted to upgrade the identity of the failed firmware.
  • the device determining whether the firmware is successfully upgraded may include:
  • the firmware server and the device can communicate through the Internet of Things or other networks, which is not limited herein.
  • a third embodiment of the present invention further provides a method for upgrading firmware, which is applied to a firmware server side, and includes:
  • Step 300 The firmware server receives current version information of the firmware from the device.
  • Step 301 The firmware server determines, according to the current version information of the firmware, whether the firmware needs to be upgraded, and if necessary, sends an upgrade file for the firmware to the device, so that the device pairs the firmware according to the upgrade file. Upgrade.
  • the firmware server determining whether the firmware needs to be upgraded according to the current version information of the firmware may include:
  • the firmware server determines the current version of the firmware based on the current version information of the firmware; the firmware server determines whether the current version of the firmware is the latest version; if not, the firmware server determines that the firmware needs to be upgraded.
  • the current version information may include a current version number of the firmware or other information that can uniquely identify the version.
  • the firmware server can compare the current version of the firmware obtained from the device with the latest version stored in the firmware server, for example, the version number of the comparison version, etc., to determine whether an upgrade is required, if the version number of the current version is lower than the latest version.
  • the version number determines that the firmware needs to be upgraded; if the version number of the current version is the same as the version number of the latest version, or the version number of the current version is higher than the version number of the latest version, it is determined that the firmware does not need to be upgraded.
  • the firmware server can also compare the current version of the firmware obtained from the device with any version stored in the firmware server, for example, the version number of the comparison version, etc., when the firmware server determines the upgrade file of the firmware stored by itself, When there is a new upgrade file with version information than the current version information of the obtained firmware, it is determined that the firmware needs to be upgraded;
  • the firmware server determines that the upgrade file of the firmware stored by itself does not have a new upgrade file of the version information than the current version information of the obtained firmware, it is determined that the firmware does not need to be upgraded.
  • the method may further include: when the firmware server determines that the firmware needs to be upgraded, sending a notification message for the firmware to the device; the notification message is used to notify the device that the firmware needs to be upgraded, wherein the notification message may include an upgrade.
  • the version number of the file, etc. The device receives the notification message of the firmware server. If the device confirms the upgrade according to the notification message, the device may send a request message to the firmware server, where the request message is used to request to download the upgrade file of the firmware, for example, the request message.
  • the version number of the upgrade file may be included, and the version number may be the same as the version number in the notification message, or different, and is not limited herein; after receiving the request message sent by the device, the firmware server sends the firmware to the device. Upgrade file, the version number of the upgrade file is the same as the version number in the request message.
  • the method may further include:
  • the firmware server can determine whether the firmware in the device supports cross-version upgrade, and if so, send the latest version of the upgrade file to the device; If it is not supported, send the upgrade file of the next version of the current version to the device, and gradually upgrade the firmware to the latest version. For example, after the device successfully upgrades the firmware according to the upgrade file of the next version, the device may send the version information of the next version to the firmware server, that is, perform the third implementation manner described in the foregoing step 100, and cycle the above steps. Until the device upgrades the firmware to the latest firmware version.
  • the firmware server can determine whether the firmware supports cross-version upgrade based on current version information of the firmware sent by the device. For specific implementation, refer to any one or several of the following ways.
  • the firmware server pre-stores the version information of the firmware and whether the cross-version upgrade is supported. In the corresponding relationship, it is found whether the current version information of the firmware supports the cross-version upgrade, and if the cross-version is supported, the cross-version is supported. Upgrade to ensure that the firmware supports cross-version upgrades; if it is found that cross-version upgrades are not supported, then it is determined that the firmware does not support cross-version upgrades.
  • the firmware server pre-stores version information that supports cross-version upgrade, and searches for the current version information of the firmware in the version information that supports cross-version upgrade. If found, it determines that the firmware supports cross-version upgrade; if not, Then make sure the firmware does not support cross-version upgrades.
  • the firmware server pre-stores version information that does not support cross-version upgrade, and searches for the current version information of the firmware in the version information that does not support cross-version upgrade. If found, it determines that the firmware does not support cross-version upgrade; If not, then make sure the firmware supports cross-version upgrades.
  • the request message may specifically include: an identifier of the firmware to be upgraded and information indicating a version to be upgraded, such as a version number of the above version.
  • the process ends.
  • a fourth embodiment of the present invention further provides an apparatus, including:
  • a first sending module 401 configured to send current version information of the firmware to the firmware server
  • a first receiving module 403 configured to receive an upgrade file for the firmware from a firmware server, where the upgrade file is determined by the firmware server according to current version information of the firmware;
  • the upgrade module 405 is configured to determine whether the upgrade file is successfully received, and if yes, upgrade the firmware according to the upgrade file.
  • the upgrading module 405 is further configured to:
  • Determining whether the firmware is successfully upgraded if not, sending a request message to the firmware server, the request message is used to request the firmware server to resend the upgrade file; if it is determined that the number of upgrade failures is greater than or equal to the pre- A threshold is set to prompt the user to fail the upgrade for the firmware.
  • the upgrading module 405 is further configured to:
  • the first sending module 401 is further configured to:
  • Receiving the request message sending a request message to the firmware server, the request message for requesting the firmware server to resend the upgrade file.
  • the upgrading module 405 is specifically configured to:
  • a firmware server including:
  • the second receiving module 501 is configured to receive current version information of the firmware sent by the device.
  • the processing module 503 is configured to determine, according to the current version information of the firmware, whether the firmware needs to be upgraded, and if yes, send a notification message to the second sending module;
  • the second sending module 505 is configured to receive the notification message, and send an upgrade file for the firmware to the device, so that the device upgrades the firmware according to the upgrade file.
  • processing module 503 is specifically configured to determine, according to current version information of the firmware, whether the firmware needs to be upgraded:
  • the second sending module 505 is further configured to:
  • the second sending module 505 is specifically configured to: send the upgrade file for the firmware to the device by using the following manner:
  • a sixth embodiment of the present invention further provides an apparatus, including a first processor 601 and a first computer readable storage medium 603, where the first computer readable storage medium 603 stores a first computer program.
  • the first processor 601 is configured to invoke the first computer program 603 to perform the method of upgrading firmware on any one of the device sides described above.
  • the first computer readable storage medium 603 includes at least one of the following: a flash memory, a hard disk, a multimedia card, and a card type memory (for example, a Secure Digital Memory Card (SD card) or a data register (DX, Data Register). ) Memory, etc., Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), EEPROM (Electrically Erasable Programmable Read Only Memory) EEPROM (Electrically Erasable Programmable Read-Only Memory), Programmable Read-Only Memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • a flash memory for example, a Secure Digital Memory Card (SD card) or a data register (DX, Data Register).
  • SD card Secure Digital Memory Card
  • DX Data Register
  • Memory etc., Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), EEPROM (Electrically Erasable Programmable Read Only Memory) EEPROM (Electrically Erasable Programmable
  • the first processor 601 may be a central processing unit (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviation: NP), a data processor, an image processor, a task processor, etc.
  • CPU central processing unit
  • NP network processor
  • the first processor 601 may further include a hardware chip.
  • the hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (abbreviated as PLD), or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), field-programmable gate array (English: field-programmable gate array, abbreviation: FPGA), general array logic (English: generic array Logic, abbreviation: GAL) or any combination thereof.
  • the processor may also include hardware devices such as a single chip microcomputer.
  • the first processor 601 and the first computer readable storage medium 603 can be connected by a communication bus or other means.
  • the communication bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • the communication bus 802 can be divided into an address bus, a data bus, a control bus, and the like.
  • the device may further include a communication module, and the communication module may include a wired communication module and a wireless communication module.
  • the device can send information to the firmware server or receive data or information (such as an upgrade file) sent by the firmware server through the wireless communication module.
  • the communication module of the device can support the connection with the firmware server.
  • the communication module of the device can support the connection with the firmware server through the wide area network
  • the communication module of the device can be a 5G communication module or other communication module supporting the wide area network. Not limited.
  • the device may also include other hardware devices for implementing specific functions.
  • the remote control device may further include an antenna, a communication device, etc.;
  • the unmanned aerial vehicle may also The camera, the flight controller, the visual controller, and the like may be included, and are not limited herein.
  • a seventh embodiment of the present invention further provides a firmware server, including a second processor 701 and a second computer readable storage medium 703, wherein the second computer readable storage medium 703 stores a second computer.
  • a program the second processor 701 is configured to invoke the second computer program 703 to perform the method of upgrading firmware on any one of the firmware servers described above.
  • the second computer readable storage medium 703 includes at least one of the following: a flash memory, a hard disk, a multimedia card, and a card type memory (for example, a Secure Digital Memory Card (SD card) or a data register (DX, Data Register). ) Memory, etc., Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), EEPROM (Electrically Erasable Programmable Read Only Memory) EEPROM (Electrically Erasable Programmable Read-Only Memory), Programmable Read-Only Memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • a flash memory for example, a Secure Digital Memory Card (SD card) or a data register (DX, Data Register).
  • SD card Secure Digital Memory Card
  • DX Data Register
  • Memory etc., Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), EEPROM (Electrically Erasable Programmable Read Only Memory) EEPROM (Electrically Erasable Programmable
  • the second processor 701 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip.
  • CPU central processing unit
  • controller a controller
  • microcontroller a microcontroller
  • microprocessor or other data processing chip.
  • the above firmware server may also include other hardware modules for implementing specific functions, such as a communication device, and the like, which is not limited herein.
  • An eighth embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program for performing the steps of any of the above methods for upgrading firmware when executed by a processor.
  • a ninth embodiment of the present invention provides a system for upgrading firmware, including an unmanned aerial vehicle 801, a remote control device 803, and a firmware server 805.
  • the UAV 801 and the remote control device 803 can be connected by wireless; the UAV 801 and the firmware server 805 can be connected through a wireless technology or a wireless network; accordingly, the remote control device 803 and the firmware server 805 can be connected. Connect via wireless technology or wireless network.
  • the wireless network or wireless technology used between the UAV 801 and the remote control device 803 may be the same or different from that used between the UAV 801 and the firmware server 805 or between the remote control device 803 and the firmware server 805, and The connection between the above device and the firmware server is not limited.
  • the remote control device 803 can be used to control the flight of the unmanned aerial vehicle 801, and can also receive video or images taken by the unmanned aerial vehicle, etc.; the unmanned aerial vehicle 801 is used to perform corresponding tasks under the control of the remote control device 803, the unmanned aerial vehicle 801 and the remote control
  • Each of the devices 803 may include at least one memory in which one or more firmwares are stored. When the firmware in the memory of the UAV 801 or the remote control device 803 needs to be upgraded, the method performed by the above device may be used for upgrading. .
  • the unmanned aerial vehicle 801 or the remote control device 803 can perform some or all of the steps of the method performed by the foregoing device, and details are not described herein.
  • the firmware server 805 can perform some or all of the steps of the method performed by the firmware server, and details are not described herein.

Landscapes

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

Abstract

一种升级固件的方法和装置,包括:设备将固件的当前版本信息发送给固件服务器(200);设备接收来自固件服务器的针对所述固件的升级文件,判断升级文件是否接收成功,若是,则根据升级文件对固件进行升级(201)。设备根据固件服务器发送的升级文件进行固件升级,简化了用户操作并提高了固件升级的成功率和效率。

Description

升级固件的方法和装置
本申请要求于2017年10月20日提交中国专利局、申请号为201710985049.0、申请名称为“一种升级固件的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及固件升级技术,尤指一种升级固件的方法和装置。
背景技术
传统无人机固件升级方式是用户自己去无人机产品的官网下载对应的固件包,然后将下载的固件包文件拷贝到安全数码存储卡(Secure Digital Memory Card,SDMC)后,然后将SD卡装回无人机后才能升级。
上述方法中,用户存在选错固件的风险,固件升级时需要多个步骤的操作,用户有能遗忘操作步骤或者出现操作步骤错误的情况,导致升级失败,无人机无法使用的情况,并且,升级过程繁琐,升级效率低。
发明内容
本发明实施例提供了一种升级固件的方法和装置,能够使设备根据固件服务器发送的升级文件升级固件,简化了用户操作并提高了固件升级的成功率和效率。
本发明实施例提出了一种固件升级的方法,包括:
设备接收来自所述固件服务器的针对所述设备的固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;
所述设备判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。
可选的,所述方法还包括:
所述设备将固件的当前版本信息发送给固件服务器。
可选的,所述设备将固件的当前版本信息发送给固件服务器包括:
所述设备按照预设频率将所述固件的当前版本信息发送给所述固件服务器;或者,
所述设备在接收到来自所述固件服务器的查询消息时,将所述查询消息查询的固件的当前版本信息发送给所述固件服务器;或者,
所述设备将升级后的固件的当前版本信息发送给所述固件服务器。
可选的,所述方法还包括:
所述设备接收来自所述固件服务器的针对所述固件的升级信息,所述升级信息包括所述升级文件的大小或所述升级文件的MD5值;
所述设备判断所述升级文件是否接收成功包括:
若所述升级信息包括升级文件的大小,所述设备判断接收到的升级文件的大小和所述升级信息中的升级文件的大小是否相同,若相同,确定所述升级文件接收成功;或者,
若所述升级信息包括升级文件的MD5值,所述设备判断所述接收到的升级文件的MD5值和所述升级信息中的MD5值是否相同,若相同,确定所述升级文件接收成功。
可选的,所述方法还包括:
当判断出所述升级文件接收失败时,所述设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
可选的,所述设备判断出所述升级文件接收成功后,所述方法还包括:
所述设备提示用户是否对所述固件进行升级;
所述设备根据升级文件对固件进行升级包括:
所述设备检测到所述用户确认升级操作后,根据所述升级文件对所述固件进行升级。
可选的,所述方法还包括:
所述设备判断所述固件是否升级成功;
若为否,则所述设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;
若所述设备确定升级失败的次数大于或等于预设阈值,提示用户所述固件升级失败。
本发明实施例提出了一种固件升级的方法,包括:
所述固件服务器根据所述固件的当前版本信息判断所述固件是否需要升级;
若为是,则所述固件服务器向所述设备发送针对所述固件的升级文件,以使所述设备根据所述升级文件对所述固件进行升级。
可选的,所述方法还包括:
固件服务器接收到设备发送的固件的当前版本信息。
可选的,所述固件服务器根据所述固件的当前版本信息判断所述固件是否需要升级包括:
所述固件服务器根据所述固件的当前版本信息确定所述固件的当前版本;
所述固件服务器判断所述固件的当前版本是否为最新版本;
若为否,则所述固件服务器确定所述固件需要升级。
可选的,所述方法还包括:
所述固件服务器向所述设备发送所述固件的升级信息,所述升级信息用于由所述设备确定所述固件是否接收成功。
可选的,所述固件服务器向所述设备发送针对所述固件的升级文件包括:
若所述固件服务器中存在针对所述固件的多个升级文件时,所述固件服务器判断所述固件是否支持跨版本升级;
若为是,则所述固件服务器向所述设备发送针对所述固件的最新版本的升级文件;
若为否,则所述固件服务器向所述设备发送针对所述固件的下一个版本的升级文件。
本发明实施例提出了一种设备,包括:
第一接收模块,用于接收来自固件服务器的针对所述设备的固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;
升级模块,用于判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。
可选的,所述设备还包括:第一发送模块,用于将固件的当前版本信息发送给固件服务器。
可选的,所述升级模块还用于:
判断所述固件是否升级成功,若为否,则向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;若确定升级失败的次数大于或等于预设阈值,提示用户所述固件升级失败。
可选的,所述升级模块还用于:
当判断出所述升级文件接收失败时,向所述第一发送模块发送请求消息;
所述第一发送模块还用于:
接收到请求消息,向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
可选的,所述升级模块具体用于:
判断所述升级文件是否接收成功,若是,则提示用户是否对所述固件进行升级;检测到所述用户确认升级操作后,根据所述升级文件对所述固件进行升级。
本发明实施例提出了一种固件服务器,包括:
第二接收模块,用于接收到设备发送的固件的当前版本信息;
处理模块,用于根据所述固件的当前版本信息判断所述固件是否需要升级,若为是,则向第二发送模块发送通知消息;
第二发送模块,用于接收到通知消息,向设备发送针对所述固件的升级文件,以使所述设备根据所述升级文件对所述固件进行升级。
可选的,所述处理模块具体用于采用以下方式实现根据固件的当前版本信息判断固件是否需要升级:
根据所述固件的当前版本信息确定所述固件的当前版本;判断所述固件的当前版本是否为最新版本;若为否,则确定所述固件需要升级。
可选的,所述第二发送模块还用于:
向所述设备发送所述固件的升级信息,所述升级信息用于由所述设备确定所述固件是否接收成功。
可选的,所述第二发送模块具体用于采用以下方式实现所述向所述设备发送针对所述固件的升级文件:
若所述固件服务器中存在针对所述固件的多个升级文件时,判断所述固件是否支持跨版本升级;
若为是,则向所述设备发送针对所述固件的最新版本的升级文件;
若为否,则向所述设备发送针对所述固件的下一个版本的升级文件。
本发明实施例提出了一种设备,包括第一处理器和第一计算机可读存储介质,所述第一计算机可读存储介质中存储有第一计算机程序,所述第一处理器用于调用所述第一计算机程序以执行上述任意一种升级固件的方法。
本发明实施例提出了一种固件服务器,包括第二处理器和第二计算机可读存储介质,所述第二计算机可读存储介质中存储有第二计算机程序,所述第二处理器用于调用所述第二计算机程序以执行上述任意一种升级固件的方法。
本发明实施例提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序用于被处理器执行时实现上述任意一种升级固件的方法的步骤。
本申请实施例中,该设备接收来自固件服务器的针对所述固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;该设备判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。通过本发明实施例的方案,设备根据固件服务器发送的升级文件进行固件升级,简化了用户操作并提高了固件升级的成功率和效率。
附图说明
图1为本发明实施例提供的一种升级固件的方法的流程图;
图2为本发明实施例提供的一种设备侧的升级固件的方法的流程图;
图3为本发明实施例提供的一种固件服务器侧的升级固件的方法的流程图;
图4为本发明实施例提供的一种设备的结构组成示意图;
图5为本发明实施例提供的一种固件服务器的结构组成示意图;
图6为本发明实施例提供的另一种设备的结构组成示意图;
图7为本发明实施例提供的另一种固件服务器的结构组成示意图;
图8为本发明实施例提供的一种升级固件的系统的结构组成示意图。
具体实施方式
下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。例如,下述方法中的步骤可以利用设备中的处理器执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
参见图1,本发明第一实施例提出了一种升级固件的方法,包括:
步骤100、设备将固件的当前版本信息发送给固件服务器。
本申请所描述的实施例中,设备可以是指无人飞行器(Unmanned Aerial  Vehicle,UAV);或者,设备是指用于控制该无人飞行器的遥控设备。在此不予限定。
其中,固件是指配置于设备中的存储器所保存的硬件驱动程序或者是处理器执行的上层应用程序等。其中,存储器中可以保存有多个固件,不同的固件可以对应不同的硬件。
示例性地,设备可以采用以下几种方法中的任意一种将固件的当前版本信息发送给固件服务器。
第一种,设备周期性地将固件的当前版本信息发送给所述固件服务器。其中,设备可以按照预设周期向固件服务器发送固件的当前版本信息,各固件对应的预设周期可以相同或不同,在此不予限定。设备所要发送当前版本信息的固件可以是固件服务器指定的,或者,是预配置的,或者是设备设置触发发送条件,并确定满足该触发发送条件的固件,并将该固件的当前版本信息发送给固件服务器,在此不予限定。其中,设备所设置的触发发送条件可以是固件升级后的预设时间阈值,或者其他条件等,在此不予限定。
第二种,设备在接收到来自固件服务器的查询消息时,将查询消息查询的固件的当前版本信息发送给固件服务器。
第三种,设备将升级后的固件的当前版本信息发送给固件服务器。具体地,一种情况为,如果设备需要进行多次升级才能升级到最新版本,那么,在每升级成功一个版本后,还需要判断是否继续升级,即在固件升级成功后将固件的当前版本信息发送给固件服务器,固件服务器接收到固件的当前版本信息判断是否继续进行升级。
或者,设备可以执行上述至少两种方式的结合。例如,设备接收固件服务器的查询消息中,携带有固件服务器所需查询的固件,以及针对该固件的周期。设备可以根据查询消息,向固件服务器按照该周期发送查询消息所指示的固件的当前版本信息。
本申请实施例中,当固件服务器中存储有该设备的固件的当前版本信息时,则步骤100可以省略执行,固件服务器可以在根据该设备的固件的当前版本信息,来判断该固件是否需要升级,若该固件需要升级,则可以直接向设备 发送该固件的升级文件。
当然,还可以包括其他结合方式,或其他实现方式,在此不予限定。
本实施例中,设备可以将部分固件的当前版本信息发送给固件服务器,也可以将全部固件的当前版本信息发送给固件服务器。当设备将两个或两个以上固件的当前版本信息发送给固件服务器时,可以将两个或两个以上固件的当前版本信息逐个发送给固件服务器,也可以将两个或两个以上固件的当前版本信息同时发送给固件服务器,也可以采用其他方式发送给固件服务器,本发明实施例对此不作限定。
步骤101、固件服务器接收到来自设备的固件的当前版本信息,根据所述固件的当前版本信息判断所述固件是否需要升级,如果需要,则向所述设备发送针对所述固件的升级文件,以使设备根据所述升级文件对所述固件进行升级。
示例性地,固件服务器根据固件的当前版本信息判断固件是否需要升级可以包括:
固件服务器根据固件的当前版本信息确定固件的当前版本;固件服务器判断固件的当前版本是否为最新版本;若为否,则固件服务器确定固件需要升级。
具体地,当前版本信息可以包括固件的当前版本号或其他可以唯一标识版本的信息。固件服务器可以比对从设备中获取的固件的当前版本与固件服务器中所存储的最新版本,例如,比对版本的版本号等,进而判断是否需要升级,若当前版本的版本号低于最新版本的版本号,则确定固件需要升级;若当前版本的版本号与最新版本的版本号相同,或当前版本的版本号高于最新版本的版本号,则确定固件不需要升级。
固件服务器也可以比对从设备中获取的固件的当前版本与固件服务器中所存储的任意一个版本,例如,比对版本的版本号等,当固件服务器判断出自身存储的固件的升级文件中,存在版本信息比获得的固件的当前版本信息新的升级文件时,确定固件需要升级;
当固件服务器判断出自身存储的固件的升级文件中,不存在版本信息比获 得的固件的当前版本信息新的升级文件时,确定固件不需要升级。
可选地,该方法还可以包括:当固件服务器判断出固件需要升级时,向设备发送针对固件的通知消息;该通知消息用于通知设备所述固件需要进行升级,其中,通知消息可以包括升级文件的版本号等。设备接收到固件服务器的通知消息,若设备根据该通知消息确认对该固件进行升级,则设备可以向固件服务器发送请求消息,该请求消息用于请求对固件的升级文件进行下载,例如,请求消息中可以包括请求升级文件的版本号等,该版本号可以与通知消息中的版本号相同,或不同,在此不予限定;固件服务器接收到设备发送的请求消息后,向设备发送针对固件的升级文件,该升级文件的版本号与请求消息中的版本号相同。
可选地,该方法还可以包括:
若固件服务器中的最新版本的固件与设备中当前版本的固件之间跨版本,则固件服务器可以判断设备中的该固件是否支持跨版本升级,如果支持,则向设备发送最新版本的升级文件;如果不支持,则向设备发送当前版本的下一个版本的升级文件,使固件逐步升级至最新版本。例如,在设备根据下一个版本的升级文件对固件升级成功后,设备可以将下一个版本的版本信息发送给固件服务器,即执行上述步骤100中所描述的第三种实现方式,循环上述步骤,直至设备将该固件升级为最新版本的固件。
示例性地,固件服务器可以根据设备发送的固件的当前版本信息来判断固件是否支持跨版本升级。具体实现可以参见以下几种方式中的任意一种或几种结合。
例如,固件服务器中预先存储有固件的版本信息和是否支持跨版本升级之间的对应关系,在对应关系中查找固件的当前版本信息对应的是否支持跨版本升级,如果查找到的是支持跨版本升级,则确定固件支持跨版本升级;如果查找到的是不支持跨版本升级,则确定固件不支持跨版本升级。
又如,固件服务器中预先存储有支持跨版本升级的版本信息,在支持跨版本升级的版本信息中查找固件的当前版本信息,如果查找到,则确定固件支持跨版本升级;如果查找不到,则确定固件不支持跨版本升级。
又如,固件服务器中预先存储有不支持跨版本升级的版本信息,在不支持跨版本升级的版本信息中查找固件的当前版本信息,如果查找到,则确定固件不支持跨版本升级;如果查找不到,则确定固件支持跨版本升级。
其中,请求消息可以具体包括:需要升级的固件的标识和表示升级到的版本的信息,例如上述的版本的版本号等。
可选的,如果固件服务器判断出固件不需要升级,则结束本流程。
步骤102、设备接收来自固件服务器的针对固件的升级文件,判断升级文件是否接收成功,若是,则根据升级文件对固件进行升级。
示例性地,设备可以通过接收的升级信息来判断升级文件是否接收成功。
示例性地,设备可以在接收升级文件之前接收升级信息,例如,升级信息携带在上述固件服务器发送的通知消息中;或者,设备可以在接收升级文件时,该升级文件中携带有升级信息。
其中,升级信息可以包括升级文件的大小、升级文件的消息摘要算法第五版(MD5,Message Digest Algorithm 5)值,等等中的至少一个或多个。
设备通过接收的升级信息来判断升级文件是否接收成功可以通过以下方式来实现:
若升级信息包括升级文件的大小,判断接收到的升级文件的大小和所述升级信息中的升级文件的大小是否相同,若相同,则判断出接收成功,若不相同,则判断出接收失败;或者,若升级信息包括升级文件的MD5值,则判断接收到的升级文件的MD5值和所述升级信息中的升级文件的MD5值是否相同,若相同,则判断出接收成功,若不相同,则判断出接收失败;或者,若升级信息包括上述两种信息,则可以将上述判断方式结合以进行判断,如果均相同,则判断出所述升级文件接收成功;如果至少一个不相同,则判断出所述升级文件接收失败。当然,若升级信息中还包括其他信息,还可以基于其他信息进行判断,在此不予限定。
本步骤中,可以采用将固件的原文件擦除,并写入接收到的升级文件以实现升级。
可选的,当判断出升级文件接收失败时,设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
可选地,在一种实现方式中,若设备在接收到升级文件之前接收到升级信息,例如,上述固件服务器发送的通知消息中携带有升级信息,设备可以根据升级信息判断是否有足够的存储空间存储待接收的升级文件,若设备判断出没有足够的存储空间,则可以不向设备发送请求消息,待确定有足够空间存储待接收的升级文件后,再向设备发送请求消息。
例如,判断自身的可用存储空间是否满足存储升级文件包括:
判断出升级信息中的升级文件的大小小于或等于自身的可用存储空间,确定自身的可用存储空间满足存储升级文件;
判断出升级信息中的升级文件的大小大于自身的可用存储空间,确定自身的可用存储空间不满足存储升级文件。
可选的,当判断出自身的可用存储空间不满足存储升级文件时,删除旧版本的升级文件,或结束本流程。
可选的,该方法还可以包括:设备判断出升级文件接收成功后,提示用户是否对固件进行升级,当检测到用户确认升级操作后,根据升级文件对固件进行升级。
其中,当设备为无人机时,由于无人机在遥控设备的控制下执行对应的任务,因此,设备可以通过遥控设备提示用户是否对无人机中的固件进行升级。
例如,无人机向遥控设备发送提示消息,遥控设备根据该提示消息提示用户;遥控设备检测到用户确认升级操作后,向无人机发送进行升级的指令;无人机基于该指令确认对该固件进行升级。
又如,无人机向遥控设备发送提示消息,遥控设备向与遥控设备连接的移动终端发送提示消息,移动终端根据该提示消息提示用户;移动终端检测到用户确认升级操作后,向遥控设备发送进行升级的指令,遥控设备接收到进行升级的指令,将接收到的进行升级的指令发送给无人机。
可选的,当检测到用户确认不升级操作时,结束本流程。
可选的,该方法还可以包括:
设备判断固件是否升级成功,若为否,则向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;
若所述设备判断升级失败的次数达到预设阈值,提示用户针对所述固件升级失败。例如,提示用户升级失败的固件的标识。
示例性地,设备判断固件是否升级成功可以包括:
获取固件的当前版本信息,判断获得的当前版本信息与升级信息中的版本信息是否相同,如果相同,则确定升级成功;如果不相同,则确定升级失败。
上述方法中,固件服务器和设备可以通过物联网或其他网络,如5G(5 th Generation)移动通信网络进行通信,在此不予限定。
通过本发明实施例的方案,设备根据固件服务器发送的升级文件进行固件升级,简化了用户操作并提高了固件升级的成功率和效率。
参见图2,本发明第二实施例还提出了一种升级固件的方法,应用于设备侧,包括:
步骤200、设备将固件的当前版本信息发送给固件服务器。
本申请所描述的实施例中,设备可以是指无人飞行器(Unmanned Aerial Vehicle,UAV);或者,设备是指用于控制该无人飞行器的遥控设备。在此不予限定。
其中,固件是指配置于设备中的存储器所保存的硬件驱动程序。其中,存储器中可以保存有多个固件,不同的固件可以对应不同的硬件。
示例性地,设备可以采用以下几种方法中的任意一种将固件的当前版本信息发送给固件服务器。
第一种,设备周期性地将固件的当前版本信息发送给所述固件服务器。
其中,设备可以按照预设周期向固件服务器发送固件的当前版本信息,各固件对应的预设周期可以相同或不同,在此不予限定。设备所要发送当前版本信息的固件可以是固件服务器指定的,或者,是预配置的,或者是设备设置触 发发送条件,并确定满足该触发发送条件的固件,并将该固件的当前版本信息发送给固件服务器,在此不予限定。其中,设备所设置的触发发送条件可以是固件升级后的预设时间阈值,或者其他条件等,在此不予限定。
第二种,设备在接收到来自固件服务器的查询消息时,将查询消息查询的固件的当前版本信息发送给固件服务器。
第三种,设备将升级后的固件的当前版本信息发送给固件服务器。具体地,一种情况为,如果设备需要进行多次升级才能升级到最新版本,那么,在每升级成功一个版本后,还需要判断是否继续升级,即在固件升级成功后将固件的当前版本信息发送给固件服务器,固件服务器接收到固件的当前版本信息判断是否继续进行升级。
或者,设备可以执行上述至少两种方式的结合。例如,设备接收固件服务器的查询消息中,携带有固件服务器所需查询的固件,以及针对该固件的周期。设备可以根据查询消息,向固件服务器按照该周期发送查询消息所指示的固件的当前版本信息。
当然,还可以包括其他结合方式,或其他实现方式,在此不予限定。
本实施例中,设备可以将部分固件的当前版本信息发送给固件服务器,也可以将全部固件的当前版本信息发送给固件服务器。当设备将两个或两个以上固件的当前版本信息发送给固件服务器时,可以将两个或两个以上固件的当前版本信息逐个发送给固件服务器,也可以将两个或两个以上固件的当前版本信息同时发送给固件服务器,也可以采用其他方式发送给固件服务器,本发明实施例对此不作限定。
可选的,设备接收到固件服务器的升级信息,向固件服务器发送文件下载指令。
步骤201、设备接收来自固件服务器的针对固件的升级文件,判断升级文件是否接收成功,若是,则根据升级文件对固件进行升级。
示例性地,设备可以通过接收的升级信息来判断升级文件是否接收成功。
示例性地,设备可以在接收升级文件之前接收升级信息,例如,升级信息 携带在上述固件服务器发送的通知消息中;或者,设备可以在接收升级文件时,该升级文件中携带有升级信息。
其中,升级信息可以包括升级文件的大小、升级文件的消息摘要算法第五版(MD5,Message Digest Algorithm 5)值,等等中的至少一个或多个。
设备通过接收的升级信息来判断升级文件是否接收成功可以通过以下方式来实现:
若升级信息包括升级文件的大小,判断接收到的升级文件的大小和所述升级信息中的升级文件的大小是否相同,若相同,则判断出接收成功,若不相同,则判断出接收失败;或者,若升级信息包括升级文件的MD5值,则判断接收到的升级文件的MD5值和所述升级信息中的升级文件的MD5值是否相同,若相同,则判断出接收成功,若不相同,则判断出接收失败;或者,若升级信息包括上述两种信息,则可以将上述判断方式结合以进行判断,如果均相同,则判断出所述升级文件接收成功;如果至少一个不相同,则判断出所述升级文件接收失败。当然,若升级信息中还包括其他信息,还可以基于其他信息进行判断,在此不予限定。
本步骤中,可以采用将固件的原文件擦除,并写入接收到的升级文件以实现升级。
可选的,当判断出升级文件接收失败时,设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
可选地,在一种实现方式中,若设备在接收到升级文件之前接收到升级信息,例如,上述固件服务器发送的通知消息中携带有升级信息,设备可以根据升级信息判断是否有足够的存储空间存储待接收的升级文件,若设备判断出没有足够的存储空间,则可以不向设备发送请求消息,待确定有足够空间存储待接收的升级文件后,再向设备发送请求消息。
例如,判断自身的可用存储空间是否满足存储升级文件包括:
判断出升级信息中的升级文件的大小小于或等于自身的可用存储空间,确定自身的可用存储空间满足存储升级文件;
判断出升级信息中的升级文件的大小大于自身的可用存储空间,确定自身的可用存储空间不满足存储升级文件。
可选的,当判断出自身的可用存储空间不满足存储升级文件时,删除旧版本的升级文件,或结束本流程。
可选的,该方法还可以包括:设备判断出升级文件接收成功后,提示用户是否对固件进行升级,当检测到用户确认升级操作后,根据升级文件对固件进行升级。
其中,当设备为无人机时,由于无人机在遥控设备的控制下执行对应的任务,因此,设备可以通过遥控设备提示用户是否对无人机中的固件进行升级。
例如,无人机向遥控设备发送提示消息,遥控设备根据该提示消息提示用户;遥控设备检测到用户确认升级操作后,向无人机发送进行升级的指令;以使无人机基于该指令确认对该固件进行升级。
又如,无人机向遥控设备发送提示消息,遥控设备向与遥控设备连接的移动终端发送提示消息,移动终端根据该提示消息提示用户;移动终端检测到用户确认升级操作后,向遥控设备发送进行升级的指令,遥控设备接收到进行升级的指令,将接收到的进行升级的指令发送给无人机。
在此,遥控设备可以包括用户终端、遥控器或其结合。用户终端可以包括智能手机、平板电脑等终端,遥控器可以用于控制无人机的飞行等操作。当遥控设备仅包括遥控器时,该遥控器上可以配置有显示屏等输出装置,以实现提示用户的功能。
可选的,当检测到用户确认不升级操作时,结束本流程。
可选的,该方法还可以包括:
设备判断固件是否升级成功,若为否,则向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;
若所述设备判断升级失败的次数达到预设阈值,提示用户针对所述固件升级失败。例如,提示用户升级失败的固件的标识。
其中,设备判断固件是否升级成功可以包括:
获取固件的当前版本信息,判断获得的当前版本信息与升级信息中的版本信息是否相同,如果相同,则确定升级成功;如果不相同,则确定升级失败。
上述方法中,固件服务器和设备可以通过物联网或其他网络进行通信,在此不予限定。
参见图3,本发明第三实施例还提出了一种升级固件的方法,应用于固件服务器侧,包括:
步骤300、固件服务器接收到来自设备的固件的当前版本信息。
步骤301、固件服务器根据所述固件的当前版本信息判断所述固件是否需要升级,如果需要,则向所述设备发送针对所述固件的升级文件,以使设备根据所述升级文件对所述固件进行升级。
示例性地,固件服务器根据固件的当前版本信息判断固件是否需要升级可以包括:
固件服务器根据固件的当前版本信息确定固件的当前版本;固件服务器判断固件的当前版本是否为最新版本;若为否,则固件服务器确定固件需要升级。
具体地,当前版本信息可以包括固件的当前版本号或其他可以唯一标识版本的信息。固件服务器可以比对从设备中获取的固件的当前版本与固件服务器中所存储的最新版本,例如,比对版本的版本号等,进而判断是否需要升级,若当前版本的版本号低于最新版本的版本号,则确定固件需要升级;若当前版本的版本号与最新版本的版本号相同,或当前版本的版本号高于最新版本的版本号,则确定固件不需要升级。
固件服务器也可以比对从设备中获取的固件的当前版本与固件服务器中所存储的任意一个版本,例如,比对版本的版本号等,当固件服务器判断出自身存储的固件的升级文件中,存在版本信息比获得的固件的当前版本信息新的升级文件时,确定固件需要升级;
当固件服务器判断出自身存储的固件的升级文件中,不存在版本信息比获得的固件的当前版本信息新的升级文件时,确定固件不需要升级。
可选地,该方法还可以包括:当固件服务器判断出固件需要升级时,向设备发送针对固件的通知消息;该通知消息用于通知设备所述固件需要进行升级,其中,通知消息可以包括升级文件的版本号等。设备接收到固件服务器的通知消息,若设备根据该通知消息确认对该固件进行升级,则设备可以向固件服务器发送请求消息,该请求消息用于请求对固件的升级文件进行下载,例如,请求消息中可以包括请求升级文件的版本号等,该版本号可以与通知消息中的版本号相同,或不同,在此不予限定;固件服务器接收到设备发送的请求消息后,向设备发送针对固件的升级文件,该升级文件的版本号与请求消息中的版本号相同。
可选地,该方法还可以包括:
若固件服务器中的最新版本的固件与设备中当前版本的固件之间跨版本,则固件服务器可以判断设备中的该固件是否支持跨版本升级,如果支持,则向设备发送最新版本的升级文件;如果不支持,则向设备发送当前版本的下一个版本的升级文件,使固件逐步升级至最新版本。例如,在设备根据下一个版本的升级文件对固件升级成功后,设备可以将下一个版本的版本信息发送给固件服务器,即执行上述步骤100中所描述的第三种实现方式,循环上述步骤,直至设备将该固件升级为最新版本的固件。
示例性地,固件服务器可以根据设备发送的固件的当前版本信息来判断固件是否支持跨版本升级。具体实现可以参见以下几种方式中的任意一种或几种结合。
例如,固件服务器中预先存储有固件的版本信息和是否支持跨版本升级之间的对应关系,在对应关系中查找固件的当前版本信息对应的是否支持跨版本升级,如果查找到的是支持跨版本升级,则确定固件支持跨版本升级;如果查找到的是不支持跨版本升级,则确定固件不支持跨版本升级。
又如,固件服务器中预先存储有支持跨版本升级的版本信息,在支持跨版本升级的版本信息中查找固件的当前版本信息,如果查找到,则确定固件支持跨版本升级;如果查找不到,则确定固件不支持跨版本升级。
又如,固件服务器中预先存储有不支持跨版本升级的版本信息,在不支持 跨版本升级的版本信息中查找固件的当前版本信息,如果查找到,则确定固件不支持跨版本升级;如果查找不到,则确定固件支持跨版本升级。
其中,请求消息可以具体包括:需要升级的固件的标识和表示升级到的版本的信息,例如上述的版本的版本号等。
可选的,如果固件服务器判断出固件不需要升级,则结束本流程。
参见图4,本发明第四实施例还提出了一种设备,包括:
第一发送模块401,用于将固件的当前版本信息发送给固件服务器;
第一接收模块403,用于接收来自固件服务器的针对所述固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;
升级模块405,用于判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。
可选的,所述升级模块405还用于:
判断所述固件是否升级成功,若为否,则向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;若确定升级失败的次数大于或等于预设阈值,提示用户针对所述固件升级失败。
可选的,所述升级模块405还用于:
当判断出所述升级文件接收失败时,并向所述第一发送模块发送请求消息;
所述第一发送模块401还用于:
接收到请求消息,向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
可选的,所述升级模块405具体用于:
判断所述升级文件是否接收成功,若是,则提示用户是否对所述固件进行升级;检测到所述用户确认升级操作后,根据所述升级文件对所述固件进行升级。
参见图5,本发明第五实施例还提出了一种固件服务器,包括:
第二接收模块501,用于接收到设备发送的固件的当前版本信息;
处理模块503,用于根据所述固件的当前版本信息判断所述固件是否需要升级,若为是,则向第二发送模块发送通知消息;
第二发送模块505,用于接收到通知消息,向设备发送针对所述固件的升级文件,以使设备根据所述升级文件对所述固件进行升级。
可选的,所述处理模块503具体用于采用以下方式实现根据固件的当前版本信息判断固件是否需要升级:
根据所述固件的当前版本信息确定所述固件的当前版本;判断所述固件的当前版本是否为最新版本;若为否,则确定所述固件需要升级。
可选的,所述第二发送模块505还用于:
向所述设备发送所述固件的升级信息,所述升级信息用于由所述设备确定所述固件是否接收成功。
可选的,所述第二发送模块505具体用于采用以下方式实现所述向所述设备发送针对所述固件的升级文件:
若所述固件服务器中存在针对所述固件的多个升级文件时,判断所述固件是否支持跨版本升级;
若为是,则向所述设备发送针对所述固件的最新版本的升级文件;
若为否,则向所述设备发送针对所述固件的下一个版本的升级文件。
参见图6,本发明第六实施例还提出了一种设备,包括第一处理器601和第一计算机可读存储介质603,所述第一计算机可读存储介质603中存储有第一计算机程序,所述第一处理器601用于调用所述第一计算机程序603以执行上述任意一种设备侧的升级固件的方法。
其中,第一计算机可读存储介质603至少包括以下的一种:闪存、硬盘、多媒体卡、卡型存储器(例如,安全数码卡(SD卡,Secure Digital Memory Card)或数据寄存器(DX,Data Register)存储器等)、随机访问存储器(RAM, Random Access Memory)、静态随机访问存储器(SRAM,Static Random Access Memory)、只读存储器(ROM,Read Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、磁性存储器、磁盘、光盘等。
其中,第一处理器601可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP),数据处理器,图像处理器,任务处理器等专用处理器中的一种或组合。
其中,第一处理器601还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。当然,处理器还可以包括单片机等硬件装置。
第一处理器601与第一计算机可读存储介质603可以通过通信总线或其他方式连接。其中,通信总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。通信总线802可以分为地址总线、数据总线、控制总线等。
其中,该设备还可以包括通信模块,该通信模块可以包括有线通信模块和无线通信模块。该设备可以通过无线通信模块向固件服务器发送信息或接收固件服务器发送的数据或信息(如升级文件)等。
其中,该设备的通信模块可以支持与固件服务器连接,例如,该设备的通信模块可以支持通过广域网与固件服务器连接,该设备的通信模块可以是5G通信模块或其他支持广域网的通信模块,在此不予限定。
上述设备还可以包含其他的用于实现特定功能的硬件装置,例如,若设备为遥控设备,则该遥控设备还可以包括天线、通信装置等;若设备为无人飞行 器,则该无人飞行器还可以包括摄像头、飞行控制器、视觉控制器等,在此不作限定。
参见图7,本发明第七实施例还提出了一种固件服务器,包括第二处理器701和第二计算机可读存储介质703,所述第二计算机可读存储介质703中存储有第二计算机程序,第二处理器701用于调用所述第二计算机程序703以执行上述任意一种固件服务器侧的升级固件的方法。
其中,第二计算机可读存储介质703至少包括以下的一种:闪存、硬盘、多媒体卡、卡型存储器(例如,安全数码卡(SD卡,Secure Digital Memory Card)或数据寄存器(DX,Data Register)存储器等)、随机访问存储器(RAM,Random Access Memory)、静态随机访问存储器(SRAM,Static Random Access Memory)、只读存储器(ROM,Read Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、磁性存储器、磁盘、光盘等。
其中,第二处理器701可以是中央处理器(CPU,Central Processing Unit)、控制器、微控制器、微处理器、或其他数据处理芯片等。
上述固件服务器还可以包含其他的用于实现特定功能的硬件模块,如通信装置等,在此不作限定。
本发明第八实施例还提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序用于被处理器执行时实现上述任意一种升级固件的方法的步骤。
参见图8,本发明第九实施例提出了一种升级固件的系统,包括:无人飞行器801、遥控设备803和固件服务器805。
其中,无人飞行器801与遥控设备803之间可以通过无线连接;无人飞行器801与固件服务器805之间可以通过无线技术或无线网络进行连接;相应地,遥控设备803与固件服务器805之间可以通过无线技术或无线网络进行连接。其中,无人飞行器801与遥控设备803之间所使用的无线网络或无线技术可以与无人飞行器801与固件服务器805之间或遥控设备803与固件服务器805 之间所使用的相同或不同,并且在此对上述设备与固件服务器之间的连接方式不予限定。
遥控设备803可以用于控制无人飞行器801飞行,还可以接收无人飞行器拍摄的视频或图像等;无人飞行器801用于在遥控设备803的控制下执行相应的任务,无人飞行器801和遥控设备803各自可以包括至少一个存储器,该至少一个存储器中存储有一个或一个以上固件,当无人飞行器801或遥控设备803的存储器中的固件需要升级时,可以采用上述设备所执行的方法进行升级。
其中,无人飞行器801或遥控设备803可以执行上述设备所执行方法的部分或全部步骤,在此不予赘述。
相应地,固件服务器805可以执行上述固件服务器所执行方法的部分或全部步骤,在此不予赘述。
虽然本发明所揭露的实施方式如上,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。

Claims (24)

  1. 一种升级固件的方法,其特征在于,包括:
    设备接收来自所述固件服务器的针对所述设备的固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;
    所述设备判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述设备将固件的当前版本信息发送给固件服务器。
  3. 根据权利要求2所述的方法,其特征在于,所述设备将固件的当前版本信息发送给固件服务器包括:
    所述设备按照预设频率将所述固件的当前版本信息发送给所述固件服务器;或者,
    所述设备在接收到来自所述固件服务器的查询消息时,将所述查询消息查询的固件的当前版本信息发送给所述固件服务器;或者,
    所述设备将升级后的固件的当前版本信息发送给所述固件服务器。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述方法还包括:
    所述设备接收来自所述固件服务器的针对所述固件的升级信息,所述升级信息包括所述升级文件的大小或所述升级文件的MD5值;
    所述设备判断所述升级文件是否接收成功包括:
    若所述升级信息包括升级文件的大小,所述设备判断接收到的升级文件的大小和所述升级信息中的升级文件的大小是否相同,若相同,确定所述升级文件接收成功;或者,
    若所述升级信息包括升级文件的MD5值,所述设备判断所述接收到的升级文件的MD5值和所述升级信息中的MD5值是否相同,若相同,确定所述升级文 件接收成功。
  5. 根据权利要求1-4任意一项所述的方法,其特征在于,所述方法还包括:
    当判断出所述升级文件接收失败时,所述设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述设备判断出所述升级文件接收成功后,所述方法还包括:
    所述设备提示用户是否对所述固件进行升级;
    所述设备根据升级文件对固件进行升级包括:
    所述设备检测到所述用户确认升级操作后,根据所述升级文件对所述固件进行升级。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述方法还包括:
    所述设备判断所述固件是否升级成功;
    若为否,则所述设备向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;
    若所述设备确定升级失败的次数大于或等于预设阈值,提示用户所述固件升级失败。
  8. 一种升级固件的方法,其特征在于,包括:
    所述固件服务器根据设备的固件的当前版本信息判断所述固件是否需要升级;
    若为是,则所述固件服务器向所述设备发送针对所述固件的升级文件,以使所述设备根据所述升级文件对所述固件进行升级。
  9. 根据权利要求8所述的方法,其特征在于,所述固件服务器根据所述固件的当前版本信息判断所述固件是否需要升级包括:
    所述固件服务器根据所述固件的当前版本信息确定所述固件的当前版本;
    所述固件服务器判断所述固件的当前版本是否为最新版本;
    若为否,则所述固件服务器确定所述固件需要升级。
  10. 根据权利要求8或9所述的方法,其特征在于,所述方法还包括:
    所述固件服务器向所述设备发送所述固件的升级信息,所述升级信息用于由所述设备确定所述固件是否接收成功。
  11. 根据权利要求8-10任一项所述的方法,其特征在于,所述固件服务器向所述设备发送针对所述固件的升级文件包括:
    若所述固件服务器中存在针对所述固件的多个升级文件时,所述固件服务器判断所述固件是否支持跨版本升级;
    若为是,则所述固件服务器向所述设备发送针对所述固件的最新版本的升级文件;
    若为否,则所述固件服务器向所述设备发送针对所述固件的下一个版本的升级文件。
  12. 一种设备,其特征在于,包括:
    第一接收模块,用于接收来自固件服务器的针对所述设备的固件的升级文件,所述升级文件是所述固件服务器根据所述固件的当前版本信息确定的;
    升级模块,用于判断所述升级文件是否接收成功,若是,则根据所述升级文件对所述固件进行升级。
  13. 根据权利要求12所述的设备,其特征在于,还包括:
    第一发送模块,用于将固件的当前版本信息发送给固件服务器。
  14. 根据权利要求13所述的设备,其特征在于,所述升级模块还用于:
    判断所述固件是否升级成功,若为否,则向所述固件服务器发送请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件;若确定升级失败的次数大于或等于预设阈值,提示用户所述固件升级失败。
  15. 根据权利要求12-14任一项所述的设备,其特征在于,所述升级模块还用于:
    当判断出所述升级文件接收失败时,向所述第一发送模块发送请求消息;
    所述第一发送模块还用于:
    接收到所述请求消息,向所述固件服务器发送所述请求消息,所述请求消息用于请求所述固件服务器重新发送所述升级文件。
  16. 根据权利要求12-15任一项所述的设备,其特征在于,所述升级模块具体用于:
    判断所述升级文件是否接收成功,若是,则提示用户是否对所述固件进行升级;
    检测到所述用户确认升级操作后,根据所述升级文件对所述固件进行升级。
  17. 一种固件服务器,其特征在于,包括:
    处理模块,用于根据所述固件的当前版本信息判断设备的固件是否需要升级,若为是,则向第二发送模块发送通知消息;
    第二发送模块,用于接收到通知消息,向所述设备发送针对所述固件的升级文件,以使所述设备根据所述升级文件对所述固件进行升级。
  18. 根据权利要求17所述的固件服务器,其特征在于,所述处理模块具体用于采用以下方式实现根据固件的当前版本信息判断固件是否需要升级:
    根据所述固件的当前版本信息确定所述固件的当前版本;判断所述固件的当前版本是否为最新版本;若为否,则确定所述固件需要升级。
  19. 根据权利要求17或18所述的固件服务器,其特征在于,所述第二发送模块还用于:
    向所述设备发送所述固件的升级信息,所述升级信息用于由所述设备确定所述固件是否接收成功。
  20. 根据权利要求17-19任一项所述的固件服务器,其特征在于,所述第二发送模块具体用于采用以下方式实现所述向所述设备发送针对所述固件的升级文件:
    若所述固件服务器中存在针对所述固件的多个升级文件时,判断所述固件是否支持跨版本升级;
    若为是,则向所述设备发送针对所述固件的最新版本的升级文件;
    若为否,则向所述设备发送针对所述固件的下一个版本的升级文件。
  21. 一种设备,包括第一处理器和第一计算机可读存储介质,所述第一计算机可读存储介质中存储有第一计算机程序,其特征在于,所述第一处理器用于调用所述第一计算机程序以执行如权利要求1~7任意一项所述的升级固件的方法。
  22. 一种固件服务器,包括第二处理器和第二计算机可读存储介质,所述第二计算机可读存储介质中存储有第二计算机程序,其特征在于,所述第二处理器用于调用所述第二计算机程序以执行如权利要求8~11任意一项所述的升级固件的方法。
  23. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序用于被处理器执行时实现如权利要求1~7任意一项所述的升级固件的方法的步骤。
  24. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序用于被处理器执行时实现如权利要求8~11任意一项所述的升级固件的方法的步骤。
PCT/CN2018/086218 2017-10-20 2018-05-09 升级固件的方法和装置 WO2019076037A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710985049.0 2017-10-20
CN201710985049.0A CN107608701A (zh) 2017-10-20 2017-10-20 一种升级固件的方法和装置

Publications (1)

Publication Number Publication Date
WO2019076037A1 true WO2019076037A1 (zh) 2019-04-25

Family

ID=61078854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/086218 WO2019076037A1 (zh) 2017-10-20 2018-05-09 升级固件的方法和装置

Country Status (2)

Country Link
CN (1) CN107608701A (zh)
WO (1) WO2019076037A1 (zh)

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110110037A (zh) * 2018-01-19 2019-08-09 北京盛世光明软件股份有限公司 一种硬件设备信息的处理方法和查询方法
CN109144554B (zh) * 2018-06-21 2022-07-08 深圳和而泰数据资源与云技术有限公司 固件升级方法、相关设备、系统及介质
CN110633097A (zh) * 2018-06-21 2019-12-31 新智数字科技有限公司 一种单片机的ota升级方法及装置
CN108958774A (zh) * 2018-07-13 2018-12-07 深圳市道通智能航空技术有限公司 无人机系统中的模块升级方法及待升级模块
CN109213508A (zh) * 2018-08-31 2019-01-15 郑州云海信息技术有限公司 一种机箱管理系统的升级方法、升级系统及相关装置
CN109213509A (zh) * 2018-08-31 2019-01-15 郑州云海信息技术有限公司 一种raid卡的升级方法、升级系统及相关装置
CN109361544A (zh) * 2018-10-30 2019-02-19 深圳市航天华拓科技有限公司 一种定位终端固件方法、装置和计算设备
CN109471654A (zh) * 2018-11-01 2019-03-15 北京华力创通科技股份有限公司 一种版本升级方法及装置
CN109634631A (zh) * 2018-11-01 2019-04-16 北京锦鸿希电信息技术股份有限公司 固件恢复方法、装置、电子设备及固件恢复系统
CN111405543B (zh) * 2019-01-02 2023-04-07 中国移动通信有限公司研究院 一种无线固件升级中的数据包推送下载方法、装置及系统
CN110069405A (zh) * 2019-03-28 2019-07-30 深圳同兴达科技股份有限公司 一种lcd测试方法
CN111309348B (zh) * 2019-05-27 2023-05-02 深圳市鸿合创新信息技术有限责任公司 电子设备的固件升级方法及电子设备
CN112015443A (zh) * 2019-05-31 2020-12-01 百度在线网络技术(北京)有限公司 电子设备的升级方法、装置、电子设备和存储介质
CN110334787B (zh) * 2019-07-01 2023-06-16 百度在线网络技术(北京)有限公司 无人车购物方法、系统、无人车管理平台及无人车
CN110515637A (zh) * 2019-07-12 2019-11-29 湖南新云网科技有限公司 一种程序升级方法、系统及终端设备
CN112394966A (zh) * 2019-08-19 2021-02-23 云丁网络技术(北京)有限公司 设备升级方法、装置、计算机可读介质及设备
CN111752578A (zh) * 2019-09-20 2020-10-09 广州极飞科技有限公司 固件升级管理方法、装置及电子设备
CN110784348A (zh) * 2019-10-23 2020-02-11 迈普通信技术股份有限公司 一种固件升级方法、装置、电子设备及存储介质
CN113055204B (zh) * 2019-12-26 2023-07-25 富联国基(上海)电子有限公司 路由器固件升级方法、服务器及计算机可读存储介质
CN111277435A (zh) * 2020-01-16 2020-06-12 南京大鱼半导体有限公司 升级网络设备的方法、装置、存储介质以及电子设备
CN111538518A (zh) * 2020-04-27 2020-08-14 深圳忆联信息系统有限公司 实现测试机的自动批量测试方法、装置和计算机设备
CN111954040A (zh) * 2020-07-17 2020-11-17 深圳市华曦达科技股份有限公司 一种遥控器升级方法、装置、电子设备及存储介质
CN112540783B (zh) * 2020-12-18 2024-05-24 航天信息软件技术有限公司 客户端升级方法、装置、存储介质及电子设备
CN112615747B (zh) * 2020-12-23 2022-11-29 浪潮思科网络科技有限公司 一种网络设备自动部署配置的方法及装置
CN113238790B (zh) * 2021-05-28 2023-08-29 成都新易盛通信技术股份有限公司 基于sd卡和eeprom的固件程序更新方法及系统
CN114398055B (zh) * 2021-12-31 2023-11-03 南京理控物联技术有限公司 一种单灯控制器固件远程批量升级装置及升级方法
CN114217838B (zh) * 2022-02-22 2022-05-13 深圳市微克科技有限公司 一种智能穿戴的表盘更新方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929669A (zh) * 2012-10-29 2013-02-13 北京开元智信通软件有限公司 一种嵌入式软件升级方法、系统及装置
CN105262627A (zh) * 2015-10-30 2016-01-20 Tcl集团股份有限公司 一种固件升级方法、装置及系统
CN105912340A (zh) * 2016-04-26 2016-08-31 江苏惠通集团有限责任公司 一种主设备、遥控器及对其空中升级的方法
CN106681766A (zh) * 2016-12-26 2017-05-17 广东芬尼克兹节能设备有限公司 远程固件升级控制方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199706B (zh) * 2014-09-11 2018-02-13 福州瑞芯微电子股份有限公司 一种eMMC的固件升级方法及其设备
CN105138358A (zh) * 2015-08-13 2015-12-09 深圳市中兴物联科技有限公司 固件升级装置和方法
CN106648781B (zh) * 2016-12-26 2020-03-13 广东芬尼克兹节能设备有限公司 通信设备远程固件升级方法及系统
CN107122212A (zh) * 2017-04-28 2017-09-01 环球智达科技(北京)有限公司 固件加密方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929669A (zh) * 2012-10-29 2013-02-13 北京开元智信通软件有限公司 一种嵌入式软件升级方法、系统及装置
CN105262627A (zh) * 2015-10-30 2016-01-20 Tcl集团股份有限公司 一种固件升级方法、装置及系统
CN105912340A (zh) * 2016-04-26 2016-08-31 江苏惠通集团有限责任公司 一种主设备、遥控器及对其空中升级的方法
CN106681766A (zh) * 2016-12-26 2017-05-17 广东芬尼克兹节能设备有限公司 远程固件升级控制方法及系统

Also Published As

Publication number Publication date
CN107608701A (zh) 2018-01-19

Similar Documents

Publication Publication Date Title
WO2019076037A1 (zh) 升级固件的方法和装置
JP5989807B2 (ja) ソフトウェアのインストール方法、デバイスおよびシステム
US11003599B2 (en) Method, apparatus and system of managing external devices, memory and unmanned aerial vehicle
CN106250192B (zh) 上位机的软件升级方法及系统
US10002054B2 (en) Method and system for performing automatic system recovery
US8997090B2 (en) Installing an operating system in a host system
US9015694B2 (en) Cloud-based firmware distribution service
WO2017067448A1 (zh) 一种无线固件升级方法、系统及计算机存储介质
CN106325929B (zh) 一种固件升级方法、固件升级装置、冰箱和服务端
EP2456257B1 (en) Method and system for upgrading wireless data card
WO2017161947A1 (zh) 多系统ota升级方法和多系统设备
CN106020875B (zh) 嵌入式终端的固件更新管理方法和装置
US9983791B2 (en) System management controller and method of configuration file backup and recovery
CN104052818A (zh) 一种移动终端的版本升级方法及装置
CN106886436B (zh) 一种Android系统升级的方法和装置
US20140007176A1 (en) System And Method For Upgrading A Multiprocessor Set-Top Box Device With A Monolithic Firmware Image
TW201621647A (zh) 作業系統更新方法
CN110865819B (zh) 一种os的安装方法、服务器和系统
CN103200271A (zh) Arm服务器及其自动化安装系统的方法
WO2017016282A1 (zh) 软件升级方法及装置、计算机存储介质
US11876676B2 (en) Network node firmware update
WO2015176468A1 (zh) 一种智能终端的系统软件恢复的方法及装置
CN111459524A (zh) 软件的升级方法、装置、系统
CN109936609B (zh) 终端链式升级方法、装置及升级管理服务器
CN106293814B (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: 18867955

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: 18867955

Country of ref document: EP

Kind code of ref document: A1