WO2020124958A1 - 固件升级方法、装置及计算机可读存储介质 - Google Patents

固件升级方法、装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2020124958A1
WO2020124958A1 PCT/CN2019/089078 CN2019089078W WO2020124958A1 WO 2020124958 A1 WO2020124958 A1 WO 2020124958A1 CN 2019089078 W CN2019089078 W CN 2019089078W WO 2020124958 A1 WO2020124958 A1 WO 2020124958A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
target
firmware
upgrade file
device type
Prior art date
Application number
PCT/CN2019/089078
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 WO2020124958A1 publication Critical patent/WO2020124958A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the technical field of air conditioning, and in particular, to a firmware upgrade method, device, and computer-readable storage medium.
  • the air conditioner is generally composed of multiple subsystems, for example, a simplest air conditioner system may be composed of outdoor units, indoor units, remote control and other components, each of which has an independent control device.
  • the existing methods are mainly divided into two types: One method is: put the new programming code in the U disk, change it to a fixed file name, and then insert it into the main control of the component
  • the USB interface of the board after the main control chip on the main control board detects the insertion of the U disk, searches for the file with the fixed file name, and then starts the firmware upgrade. After the upgrade is complete, the main control board restarts and runs the new version of the firmware.
  • Another way is to compress the programming code and its configuration file into one file.
  • the configuration file uses a fixed file name.
  • the main control chip of the component reads the configuration information in the configuration file corresponding to the fixed file name.
  • the configuration information contains the programming code Name (fixed file name) and verification, and upgrade the firmware according to the found code file corresponding to the fixed file name.
  • the burning code search method is relatively fixed, and the field operator cannot modify the file name.
  • each component needs to be burned one by one.
  • the code is stored in the root directory of the U disk and then upgraded, resulting in a cumbersome firmware upgrade process.
  • the main purpose of the present application is to provide a firmware upgrade method, device and computer-readable storage medium, aiming to solve the technical problem of complicated upgrade process of components in the existing air conditioning system.
  • the present application provides a firmware upgrade method, which is applied to an air-conditioning system provided with a wire controller; the firmware upgrade method includes the following steps:
  • the device to be upgraded When receiving the firmware upgrade instruction triggered by the line controller, determine the device to be upgraded corresponding to the firmware upgrade instruction, where the device to be upgraded includes a line controller, an indoor unit, or an outdoor unit;
  • the remote controller When the remote controller is currently connected to an external memory, based on the target device type corresponding to the device to be upgraded, query the external memory to determine whether the upgrade file of the external memory matches the target device type
  • the target upgrade file wherein the upgrade file includes a line controller upgrade file, an indoor unit upgrade file and/or an outdoor unit upgrade file;
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • the external memory is queried based on the target device type corresponding to the device to be upgraded to determine whether a target upgrade file matching the target device type exists in the upgrade file of the external memory
  • the steps include:
  • the target upgrade file is determined based on the upgrade file that matches the target device type.
  • the step of determining the target upgrade file based on the upgrade file matching the target device type includes:
  • the target upgrade file is determined based on the upgrade file with the latest creation time.
  • the upgrade file includes a plurality of
  • the step of determining the target upgrade file based on the upgrade file that matches the target device type includes:
  • the target upgrade file is determined based on the upgrade file corresponding to the version information greater than the second version information, the update file with the latest creation time.
  • the step of determining whether an upgrade file matching the target device type exists in the upgrade file of the external memory based on the target device type corresponding to the device to be upgraded includes:
  • the step of performing a firmware upgrade operation on the device to be upgraded based on the target upgrade file includes:
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • the firmware upgrade method further includes:
  • the second prompt message that there is no target upgrade file in the external storage is output.
  • the remote controller upgrade file includes a remote controller upgrade firmware, a remote controller device type and a remote controller firmware version
  • the indoor unit upgrade file includes an indoor unit upgrade firmware, an indoor device device type and an indoor
  • the firmware version of the unit, the upgrade file of the outdoor unit includes the firmware of the outdoor unit upgrade, the type of the outdoor unit equipment, and the firmware version of the outdoor unit.
  • the firmware upgrading apparatus includes: a memory, a processor, and a firmware upgrade program stored on the memory and executable on the processor.
  • the firmware upgrade program is executed by the processor, the steps of the foregoing firmware upgrade method are implemented.
  • the present application also provides a computer-readable storage medium on which a firmware upgrade program is stored, and when the firmware upgrade program is executed by a processor, the aforementioned firmware upgrade method is implemented step.
  • the present application obtains the device to be upgraded corresponding to the firmware upgrade instruction when receiving the firmware upgrade instruction triggered by the line controller, and then determines whether the line controller is currently connected to an external memory, and then the current line controller
  • the external storage based on the target device type corresponding to the device to be upgraded, query the external storage to determine whether there is a target upgrade file matching the target device type in the upgrade file of the external storage, and then if If it exists, the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file, and the target upgrade file is accurately determined according to the target device type of the device to be upgraded to perform the firmware upgrade.
  • FIG. 1 is a schematic structural diagram of a firmware upgrading apparatus in a hardware operating environment involved in an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a first embodiment of a firmware upgrade method of this application
  • 3 is based on the target device type corresponding to the device to be upgraded in the second embodiment of the firmware upgrade method of the present application, querying the external memory to determine whether the target device type exists in the upgrade file of the external memory The detailed flow chart of the steps of matching the target upgrade file;
  • FIG. 4 is a detailed flowchart of a step of determining the target upgrade file based on the upgrade file that matches the target device type in the third embodiment of the firmware upgrade method of the present application;
  • FIG. 5 is a detailed flowchart of a step of determining the target upgrade file based on the upgrade file that matches the target device type in the fourth embodiment of the firmware upgrade method of the present application;
  • FIG. 6 is a step of determining whether there is an upgrade file in the upgrade file of the external memory that matches the target device type based on the target device type corresponding to the device to be upgraded in the fifth embodiment of the firmware upgrade method of the present application Schematic diagram of detailed process;
  • FIG. 7 is a detailed flowchart of steps of performing a firmware upgrade operation on the device to be upgraded based on the target upgrade file in the sixth embodiment of the firmware upgrade method of the present application.
  • FIG. 1 is a schematic structural diagram of a firmware upgrading apparatus in a hardware operating environment according to an embodiment of the present application.
  • the firmware upgrading apparatus in the embodiment of the present application may be a PC or a remote controller.
  • the firmware upgrading apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as a disk memory.
  • the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
  • the firmware upgrade device may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on.
  • RF Radio Frequency
  • firmware upgrade apparatus does not constitute a limitation on the firmware upgrade apparatus, and may include more or fewer components than shown, or combine certain components, or different components Layout.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a firmware upgrade program.
  • the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server;
  • the user interface 1003 is mainly used to connect to the client (user side) and perform data communication with the client; and
  • the processor 1001 may be used to call a firmware upgrade program stored in the memory 1005.
  • the firmware upgrade apparatus includes: a memory 1005, a processor 1001, and a firmware upgrade program stored on the memory 1005 and executable on the processor 1001, where the processor 1001 calls the memory 1005 to store The firmware upgrade procedure, and do the following:
  • a device to be upgraded When receiving a firmware upgrade instruction triggered by a wire controller, determine a device to be upgraded corresponding to the firmware upgrade instruction, where the device to be upgraded includes a wire controller, an indoor unit, or an outdoor unit;
  • the remote controller When the remote controller is currently connected to an external memory, based on the target device type corresponding to the device to be upgraded, query the external memory to determine whether the upgrade file of the external memory matches the target device type
  • the target upgrade file wherein the upgrade file includes a line controller upgrade file, an indoor unit upgrade file and/or an outdoor unit upgrade file;
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • the target upgrade file is determined based on the upgrade file that matches the target device type.
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • the target upgrade file is determined based on the upgrade file with the latest creation time.
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • the target upgrade file is determined based on the upgrade file corresponding to the version information greater than the second version information, the update file with the latest creation time.
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • processor 1001 can call the firmware upgrade program stored in the memory 1005, and also perform the following operations:
  • the second prompt message that there is no target upgrade file in the external storage is output.
  • FIG. 2 is a schematic flowchart of a first embodiment of a firmware upgrade method according to this application.
  • the firmware upgrade method is applied to an air-conditioning system provided with a remote control, and the air-conditioning system further includes an indoor unit and an outdoor unit.
  • the firmware upgrade method is applied to the remote controller.
  • the programming codes of the remote controller, indoor unit and outdoor unit are all bin files and cannot be distinguished by file extension.
  • the remote controller is responsible for querying the information of the internal and external machines from top to bottom, and can set the parameters.
  • the remote controller is usually installed in a location that is relatively easy for users to reach, so it can be used as an access point for firmware upgrades of indoor units and outdoor units of the air conditioning system, so that the remote controller itself, indoor units, and indoor units can be controlled by the remote controller. It is convenient to upgrade the firmware. Because the outdoor unit is usually placed on the outside, or even hung on the upper level, if you directly upgrade the outdoor unit, you need to disassemble the outdoor unit. The upgrade operation is very dangerous and inconvenient, and the live operation is required during the upgrade process. The control box presents a certain degree of danger to on-site personnel.
  • the remote control is provided with a display screen and buttons for displaying the human-computer interaction page. It can be operated by buttons to easily select which target device to upgrade. For example, the control logic for upgrading the indoor unit will be executed when the indoor unit is selected for the upgrade. When the external unit is upgraded, the control logic for upgrading the outdoor unit is executed.
  • the remote controller has a USB or SD card interface and is connected to the indoor unit by RS485 bus, CAN bus or Homebus.
  • the indoor unit has a main control board, and the main chip of the main control board is responsible for the control logic of the indoor unit. Wired connection with remote controller and external machine, can communicate. Relative to the line controller, the indoor unit is used as the slave; relative to the outdoor unit, the indoor unit is used as the master. The firmware information obtained from the U disk by the remote controller is transmitted to the next level, and the firmware data of the outdoor unit is forwarded through the indoor unit.
  • the indoor unit can also add a USB interface. If the indoor unit also has a USB interface, the obtained firmware data can only be used for the indoor unit itself and the outdoor unit, that is, the firmware data must be transmitted from the master to the slave.
  • the outdoor unit has a main control board, and the main chip of the outdoor unit is responsible for the control logic of the external unit.
  • the outdoor unit receives data from the indoor unit and completes the firmware upgrade process, and is wired to the indoor unit.
  • the firmware upgrade method includes:
  • Step S100 when receiving a firmware upgrade instruction triggered by a wire controller, determine a device to be upgraded corresponding to the firmware upgrade instruction, where the device to be upgraded includes a wire controller, an indoor unit, or an outdoor unit;
  • the device to be upgraded when the online controller is currently connected to the external storage, the device to be upgraded needs to be determined according to the firmware upgrade instruction, and the device to be upgraded includes the line controller, the indoor unit or the outdoor unit, that is, the device that needs to be upgraded is determined Which device is the remote control, indoor unit or outdoor unit?
  • the operator can select the device that needs to be upgraded through the button of the line controller, for example, select to upgrade the line controller, upgrade the indoor unit or upgrade the outdoor unit by the button of the line controller.
  • An indoor unit and/or multiple outdoor units you can choose to upgrade an indoor unit or an outdoor unit.
  • Step S200 Determine whether the remote controller is currently connected to an external memory
  • the remote controller determines whether an external storage is currently connected, for example, whether the remote controller is currently mounted with a U disk, an SD card, or other external storage.
  • Step S300 When the remote controller is currently connected to an external memory, query the external memory based on the target device type corresponding to the device to be upgraded to determine whether the target exists in the upgrade file of the external memory A target upgrade file that matches the device type, where the upgrade file includes a line controller upgrade file, an indoor unit upgrade file, and/or an outdoor unit upgrade file;
  • the target device type of the device to be upgraded is acquired, and according to the target device type, the upgrade file in the external storage is queried to determine whether there is a A target upgrade file that matches the target device type, where the upgrade file includes the device type of the corresponding upgrade device.
  • the line controller upgrade file includes the line controller upgrade firmware, the line controller device type and the line controller firmware version
  • the indoor unit upgrade file includes the indoor unit upgrade firmware, the indoor unit device type and the indoor unit firmware version
  • the The outdoor unit upgrade file includes the outdoor unit upgrade firmware, the outdoor unit device type, and the outdoor unit firmware version.
  • the production method of the upgrade file is as follows: the line controller software compiles to generate the line controller programming code A, the indoor unit software compiles to generate the indoor unit programming code B, The outdoor unit software is compiled to generate the outdoor unit burning code C, and A, B, and C are respectively equipped with control logic corresponding to the new version firmware to realize the new functions required for software upgrade.
  • the bin file synthesis tool to combine A, B, C and the bootloader to generate a bin file (upgrade file), and add some firmware information when generating the upgrade file.
  • the newly generated upgrade file contains the bootloader and application programs (A, B, C ) And firmware information.
  • Firmware information is some information inherent in the application.
  • the firmware information includes device type, software version, and verification information.
  • Bootloader is responsible for loading and booting. After the new firmware program is updated, it is responsible for managing the flash and jumping to the application program (A, B, C).
  • the device type is a characteristic number used for each device (including a remote controller, indoor unit, and/or outdoor unit).
  • the software version is the version information of the software (including the version number), and the software version number is upgraded at the same time as the software is upgraded.
  • the verification information is used to verify the integrity of the burned code to confirm that the burned code is not damaged or maliciously modified to avoid system downtime caused by update errors.
  • the file name of the newly generated upgrade file can be duplicated and named A1, B1, C1, and then the three files are stored in an external memory such as a U disk, and inserted into the remote control, of course, the newly generated upgrade file
  • the file name can be arbitrarily named by the operator.
  • the target device type can be compared with the device type in all the upgrade files in the external memory. If there is a device type consistent with the target device type in all the upgrade files in the storage, then the upgrade file corresponding to the device type consistent with the target device type among the device types in all upgrade files in the external storage is targeted Upgrade file. If there are multiple upgrade files corresponding to the device type consistent with the target device type, determine the target upgrade file among the multiple upgrade files corresponding to the device type consistent with the target device type.
  • the target upgrade file is an upgrade The part of the file corresponding to the target device type.
  • Step S400 if it exists, perform a firmware upgrade operation on the device to be upgraded based on the target upgrade file.
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file, specifically, the device to be upgraded will be determined
  • the maximum number of bytes that can be received split the upgrade file based on the maximum number of bytes to obtain multiple sub-upgrade files, each sub-upgrade file is a frame of data, and the total number of bytes in each sub-upgrade file is less than the The maximum number of bytes, and then send the sub-upgrade files to the device to be upgraded in sequence.
  • the device to be upgraded merges and generates the upgrade file based on the received sub-upgrade files.
  • the verification information of the upgrade file verifies the integrity of the upgrade file. If the upgrade file is complete, the upgrade file is activated to implement the firmware upgrade of the device to be upgraded.
  • the firmware upgrade method further includes: outputting the first prompt message that the external memory is not connected when the remote controller is not currently connected to the external memory; or,
  • the second prompt message that there is no target upgrade file in the external storage is output.
  • step S400 includes: if it exists, determine whether the version information of the target upgrade file is consistent with the current version information corresponding to the device to be upgraded, and if they are not consistent, execute the If the firmware upgrade operation of the device to be upgraded is consistent, a prompt message that the device to be upgraded has been upgraded is output.
  • the wire controller stores the version information and device type of the wire controller, indoor unit and outdoor unit; you can find the current version information corresponding to the device to be upgraded by the target device type.
  • the firmware upgrade method proposed in this embodiment determines the device to be upgraded corresponding to the firmware upgrade instruction when receiving the firmware upgrade instruction triggered by the wire controller, and then determines whether the wire controller is currently connected to an external memory, and then When the remote controller is currently connected to an external memory, based on the target device type corresponding to the device to be upgraded, query the external memory to determine whether the upgrade file of the external memory matches the target device type The target upgrade file, and if it exists, perform the firmware upgrade operation on the device to be upgraded based on the target upgrade file, and implement the firmware upgrade according to the target device type of the device to be upgraded to accurately determine the target upgrade file.
  • multiple upgrade files can be placed in the same external storage.
  • the corresponding target upgrade file can be automatically found, and then the device to be upgraded can be realized.
  • Firmware upgrade no need to manually select a specific bin file for upgrade, and the upgrade overload does not depend on the file name of the upgrade file, to achieve one-click upgrade of the device to be upgraded, simplifying the operation of field personnel, reducing the possibility of upgrade errors, and improving User experience.
  • step S300 includes:
  • Step S310 based on the target device type corresponding to the device to be upgraded, determining whether there is an upgrade file matching the target device type in the upgrade file of the external storage;
  • Step S320 if it exists, determine the target upgrade file based on the upgrade file that matches the target device type.
  • the target device type corresponding to the device to be upgraded when determining the target device type corresponding to the device to be upgraded, and then determining whether there is an upgrade file in the external storage upgrade file that matches the target device type, specifically, Compare the target device type with the device type in all the upgrade files of the external storage. If there is a device type consistent with the target device type in the device types in all the upgrade files of the external storage, determine the upgrade of the external storage There is an upgrade file matching the target device type in the file, and the upgrade file matching the target device type is an upgrade file corresponding to a device type consistent with the target device type among all the upgrade files in the external memory .
  • the target upgrade file is determined according to the upgrade file matching the target device type. Specifically, if the upgrade file matching the target device type includes only one, the upgrade file corresponding to the target device type in the upgrade file matching the target device type The file is a target upgrade file. If there are multiple upgrade files matching the target device type, the target upgrade file is determined among the multiple upgrade files matching the target device type.
  • the firmware upgrade method proposed in this embodiment determines whether an upgrade file matching the target device type exists in the upgrade file of the external memory based on the target device type corresponding to the device to be upgraded, and then if it exists, then The target upgrade file is determined based on the upgrade file that matches the target device type, and then the target upgrade file can be accurately determined according to the target device type of the device to be upgraded to perform firmware upgrade, thereby achieving one-click upgrade of the device to be upgraded, It simplifies the operations of on-site personnel, reduces the possibility of upgrade errors, and improves the user experience.
  • step S320 includes:
  • Step S321 determining the creation moments of multiple upgrade files
  • step S322 among the plurality of upgrade files, the target upgrade file is determined based on the upgrade file with the latest creation time.
  • a plurality of upgrade files that match the target device type are stored in the external memory. Therefore, the upgrade files need to be filtered to determine the target upgrade file.
  • the creation times of multiple upgrade files are obtained, the multiple creation times are compared, and multiple upgrade files are determined
  • the latest upgrade file is created at the latest time, and the target upgrade file is determined according to the latest upgrade file at the creation time.
  • the target upgrade file is the part of the upgrade file at the latest creation time that corresponds to the target device type, that is, the latest at the creation time
  • the upgrade file corresponding to the target device type is obtained from the upgrade file and is used as the target upgrade file.
  • the creation time of the upgrade file may be stored in the upgrade file.
  • the firmware upgrade method proposed in this embodiment by determining the creation time of a plurality of the upgrade files, and then determining the target upgrade file based on the upgrade file with the latest creation time among the plurality of upgrade files, in general, The latest version of the upgrade file has the highest version, so the target upgrade file can be accurately obtained according to the creation time of the upgrade file, thereby improving the accuracy of the target upgrade file and the efficiency of acquisition, and the efficiency of firmware upgrade.
  • step S320 includes:
  • Step S323 Determine the first version information of the plurality of upgrade files and the second version information corresponding to the device to be upgraded;
  • Step S324 it is determined whether there is version information of a version greater than the second version information in the first version information
  • Step S325 if it exists, determine the target upgrade file based on the upgrade file with the latest creation time from the upgrade file corresponding to the version information greater than the second version information.
  • a plurality of upgrade files that match the target device type are stored in the external memory. Therefore, the upgrade files need to be filtered to determine the target upgrade file.
  • the first version information of the multiple upgrade files and the second version information corresponding to the device to be upgraded are obtained, specifically In the upgrade file, the version information of the firmware is included, and the first version information corresponding to the device to be upgraded can be obtained through the upgrade file, and the current version information corresponding to the device to be upgraded can be found by the target device type.
  • the version information of the first version information is greater than the version information of the second version, and if it exists, it is determined based on the upgrade file corresponding to the version information greater than the version information of the second version, the update file with the latest creation time is determined.
  • the target upgrade file, the target upgrade file is the part corresponding to the target device type in the upgrade file at the latest creation time, that is, the part of the upgrade file corresponding to the target device type is obtained from the upgrade file at the latest creation time and is used as the target a.
  • the firmware upgrade method proposed in this embodiment determines the first version information of a plurality of the upgrade files and the second version information corresponding to the device to be upgraded, and then determines whether the first version information has a version greater than the The version information of the second version information, and if there is, then the target upgrade file is determined based on the upgrade file corresponding to the version information greater than the version information of the second version information, so that the target upgrade file can be determined according to the first version
  • the information and the time of creation of the upgrade file accurately obtain the target upgrade file, thereby improving the accuracy of the target upgrade file and the efficiency of acquisition, and the efficiency of firmware upgrade.
  • step S310 includes:
  • Step S311 Acquire the device type corresponding to each upgrade file stored in the external storage
  • Step S312 it is determined whether there is a device type consistent with the target device type in each of the device types, wherein if there is a device type consistent with the target device type in each of the device types, the external memory is determined There is an upgrade file matching the target device type.
  • the upgrade file stored in the external memory includes the device type.
  • the device type When determining the device to be upgraded, when determining the target device type corresponding to the device to be upgraded, and then acquiring the corresponding file corresponding to each upgrade file stored in the external memory Device type, and compare the target device type with the device type in all the upgrade files of the external storage to determine whether there is a device type consistent with the target device type in each device type, if all the upgrade files in the external storage Device type that matches the target device type exists, it is determined that there is an upgrade file matching the target device type in the upgrade file of the external storage, and the upgrade file matching the target device type is the external storage Among the device types in all the upgrade files, there is an upgrade file corresponding to the device type that is consistent with the target device type.
  • the firmware upgrade method proposed in this embodiment can obtain the device type corresponding to each upgrade file stored in the external memory, and then determine whether a device type consistent with the target device type exists in each of the device types.
  • the device type corresponding to the upgrade file determines whether there is a target upgrade file matching the target device type in the upgrade file of the external memory, thereby improving the accuracy of the target upgrade file and the efficiency of acquisition, and the efficiency of firmware upgrade.
  • step S400 includes:
  • Step S410 Obtain verification information corresponding to the target upgrade file, and perform file integrity verification on the target upgrade file based on the verification information;
  • Step S420 when the verification is passed, the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • the verification information corresponding to the target upgrade file is obtained, and file integrity verification is performed on the target upgrade file based on the verification information, specifically, according to the target upgrade file correspondence
  • the file integrity verification algorithm contained in the upgrade file verifies the integrity of the target upgrade file through the verification information, and when the verification is passed, performs a firmware upgrade operation on the device to be upgraded based on the target upgrade file.
  • the firmware upgrade method proposed in this embodiment obtains the verification information corresponding to the target upgrade file, and performs file integrity verification on the target upgrade file based on the verification information, and then when the verification passes, based on the
  • the target upgrade file performs the firmware upgrade operation on the device to be upgraded, which can ensure the integrity of the target upgrade file and avoid using the damaged file to upgrade the firmware and cause the upgraded device to be upgraded to go down.
  • the embodiments of the present application also provide a computer-readable storage medium that stores a firmware upgrade program on the computer-readable storage medium.
  • the firmware upgrade program is executed by a processor, the following operations are implemented:
  • a device to be upgraded When receiving a firmware upgrade instruction triggered by a wire controller, determine a device to be upgraded corresponding to the firmware upgrade instruction, where the device to be upgraded includes a wire controller, an indoor unit, or an outdoor unit;
  • the remote controller When the remote controller is currently connected to an external memory, based on the target device type corresponding to the device to be upgraded, query the external memory to determine whether the upgrade file of the external memory matches the target device type
  • the target upgrade file wherein the upgrade file includes a line controller upgrade file, an indoor unit upgrade file and/or an outdoor unit upgrade file;
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • the target upgrade file is determined based on the upgrade file that matches the target device type.
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • the target upgrade file is determined based on the upgrade file with the latest creation time.
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • the target upgrade file is determined based on the upgrade file corresponding to the version information greater than the second version information, the update file with the latest creation time.
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • the firmware upgrade operation of the device to be upgraded is performed based on the target upgrade file.
  • firmware upgrade program when executed by the processor, the following operations are also implemented:
  • the second prompt message that there is no target upgrade file in the external storage is output.
  • the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above , Disk, CD), including several instructions to make a terminal device (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to perform the method described in each embodiment of the present application.

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)

Abstract

一种固件升级方法,包括:在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设备(S100);确定线控器当前是否连接外部存储器(S200);在线控器当前连接外部存储器时,基于待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件(S300);若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作(S400)。还公开了一种固件升级装置及计算机可读存储介质,实现了根据待升级设备的目标设备类型准确的确定目标升级文件进行固件升级,实现待升级设备的一键升级,简化了现场人员的操作,降低了升级错误的可能性,提升了用户体验。

Description

固件升级方法、装置及计算机可读存储介质
相关申请的交叉引用
本申请基于申请号为201811561183.9,申请日为2018年12月19日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及空调技术领域,尤其涉及一种固件升级方法、装置及计算机可读存储介质。
背景技术
目前,商用空调设备在出厂时就已经烧录好测试合格的软件版本,但是在出现客户定制化的新需求、运行过程中遇到的软件bug、产品功能性升级时,需要进行软件升级。
由于空调一般由多个子系统组成,例如,一个最简单的空调系统可能由室外机、室内机、线控器等部件构成,每个部件都具有独立的控制装置。当控制装置多个子部件均需要升级时,现有的方式主要分为两种:一种方式是:将新烧录代码放到U盘内,更改为固定文件名,然后插入到部件的主控板的USB接口,主控板上的主控芯片检测到U盘插入后,搜索到该固定文件名的文件,然后开始固件升级,升级完成后主控板重启并运行新版本固件。另一种方式是:将烧录代码与其配置文件压缩成一个文件,配置文件采用固定文件名,部件的主控芯片读取固定文件名对应的配置文件中的配置信息,配置信息包含烧录代码名称(固定文件名)和校验,根据寻找到的对应固定文件名的烧录代码文件进行固件升级。
但是,上述方式中烧录代码搜索方式比较固定,并且现场的操作人员不能修改文件名称,在室外机、室内机、线控器中的多个部件需要同时升级时,需要逐个将各个部件烧录代码存入U盘根目录再升级,导致固件升级过程繁琐。
上述内容仅用于辅助理解本申请的技术方案,并不代表承认上述内容是现有技术。
发明内容
本申请的主要目的在于提供一种固件升级方法、装置及计算机可读存储介质,旨在解决现有空调系统中部件升级的过程繁琐的技术问题。
为实现上述目的,本申请提供一种固件升级方法,应用于设有线控器的空调系统;所述固件升级方法包括以下步骤:
在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设 备,其中,所述待升级设备包括线控器、室内机或室外机;
确定所述线控器当前是否连接外部存储器;
在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,其中,所述升级文件包括线控器升级文件、室内机升级文件和/或室外机升级文件;
若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作。
在一实施例中,所述基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件的步骤包括:
基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件;
若存在,则基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件。
在一实施例中,与所述目标设备类型匹配的升级文件包括多个,所述基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤包括:
确定多个所述升级文件的创建时刻;
将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件。
在一实施例中,所述升级文件包括多个,所述基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤包括:
确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息;
确定所述第一版本信息是否存在版本大于所述第二版本信息的版本信息;
若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件。
在一实施例中,所述基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件的步骤包括:
获取所述外部存储器中存储的各个升级文件所对应的设备类型;
确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,其中,若各个所述设备类型中存在与所述目标设备类型一致的设备类型,则确定所述外部存储器中存在与所述目标设备类型匹配的升级文件。
在一实施例中,所述基于所述目标升级文件执行对所述待升级设备的固件升级操作的步骤包括:
获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进 行文件完整性验证;
在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
在一实施例中,所述固件升级方法还包括:
在所述线控器当前未连接外部存储器时,输出未连接外部存储器的第一提示信息;或者,
在所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件时,输出所述外部存储器中无目标升级文件的第二提示信息。
在一实施例中,所述线控器升级文件包括线控器升级固件、线控器设备类型以及线控器固件版本,所述室内机升级文件包括室内机升级固件、室内机设备类型以及室内机固件版本,所述室外机升级文件包括室外机升级固件、室外机设备类型以及室外机固件版本。
此外,为实现上述目的,本申请还提供一种固件升级装置,所述固件升级装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的固件升级程序,所述固件升级程序被所述处理器执行时实现前述的固件升级方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有固件升级程序,所述固件升级程序被处理器执行时实现前述的固件升级方法的步骤。
本申请通过在接收到基于线控器触发的固件升级指令时,获取所述固件升级指令对应的待升级设备,接着确定所述线控器当前是否连接外部存储器,而后在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,然后若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作,实现了根据待升级设备的目标设备类型准确的确定目标升级文件进行固件升级,在空调系统存在多个需要升级的设备时,可将多个升级文件置于同一个外部存储器,通过根据目标设备类型搜索外部存储器的升级文件即可自动寻找对应的目标升级文件,进而实现待升级设备的固件升级,无需人工选择具体的bin文件进行升级,且升级过载不依赖于升级文件的文件名称,实现待升级设备的一键升级,简化了现场人员的操作,降低了升级错误的可能性,提升了用户体验。
附图说明
图1是本申请实施例方案涉及的硬件运行环境中固件升级装置的结构示意图;
图2为本申请固件升级方法第一实施例的流程示意图;
图3为本申请固件升级方法第二实施例中基于所述待升级设备所对应的目标设备类型, 查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件的步骤的细化流程示意图;
图4为本申请固件升级方法第三实施例中基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤的细化流程示意图;
图5为本申请固件升级方法第四实施例中基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤的细化流程示意图;
图6为本申请固件升级方法第五实施例中基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件的步骤的细化流程示意图;
图7为本申请固件升级方法第六实施例中基于所述目标升级文件执行对所述待升级设备的固件升级操作的步骤的细化流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如图1所示,图1是本申请实施例方案涉及的硬件运行环境中固件升级装置的结构示意图。
本申请实施例固件升级装置可以是PC,也可以线控器。如图1所示,该固件升级装置可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
可选地,固件升级装置还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。
本领域技术人员可以理解,图1中示出的固件升级装置结构并不构成对固件升级装置的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及固件升级程序。
在图1所示的固件升级装置中,网络接口1004主要用于连接后台服务器,与后台服务 器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的固件升级程序。
在本实施例中,固件升级装置包括:存储器1005、处理器1001及存储在所述存储器1005上并可在所述处理器1001上运行的固件升级程序,其中,处理器1001调用存储器1005中存储的固件升级程序时,并执行以下操作:
在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设备,其中,所述待升级设备包括线控器、室内机或室外机;
确定所述线控器当前是否连接外部存储器;
在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,其中,所述升级文件包括线控器升级文件、室内机升级文件和/或室外机升级文件;
若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件;
若存在,则基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
确定多个所述升级文件的创建时刻;
将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息;
确定所述第一版本信息是否存在版本大于所述第二版本信息的版本信息;
若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
获取所述外部存储器中存储的各个升级文件所对应的设备类型;
确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,其中,若各 个所述设备类型中存在与所述目标设备类型一致的设备类型,则确定所述外部存储器中存在与所述目标设备类型匹配的升级文件。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进行文件完整性验证;
在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
进一步地,处理器1001可以调用存储器1005中存储的固件升级程序,还执行以下操作:
在所述线控器当前未连接外部存储器时,输出未连接外部存储器的第一提示信息;或者,
在所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件时,输出所述外部存储器中无目标升级文件的第二提示信息。
本申请还提供一种固件升级方法,参照图2,图2为本申请固件升级方法第一实施例的流程示意图。
在本实施例中,该固件升级方法应用于设有线控器的空调系统,该空调系统还包括室内机以及室外机。优选地,在本实施例中,该固件升级方法应用于线控器。
线控器、室内机、室外机烧录代码均是bin文件,无法通过文件扩展名区分。
该线控器作为此空调系统内的主机,从上至下负责查询内机、外机的信息,并可以进行参数设置。该线控器通常设置于用户比较容易接触到的位置,所以可以作为空调系统室内机以及室外机固件升级的接入点,这样通过线控器就可以对线控器本身、室内机、室机进行固件升级,操作较方便。因为室外机通常置于是外侧,甚至外挂在高层之上,如果直接对室外机进行升级需要拆开室外机升级操作起来非常危险且不便,并且升级过程中要带电操作,如果拆开室外机的电控盒,对于现场人员存在一定的危险性。
该线控器设有用于显示人机交互页面的显示屏以及按键,可通过按键操作,可以方便选择升级哪个目标设备,例如选择室升级内机时就会执行升级室内机的控制逻辑,选择室升级外机时就会执行升级室外机的控制逻辑。该线控器带有USB或是SD卡接口,与室内机由RS485总线、CAN总线或Homebus连接。
室内机具有主控板,主控板的主芯片负责室内机的控制逻辑。与线控器、外机有线连接,可进行通信。相对于线控器,室内机作为从机;相对于室外机,室内机作为主机。线控器从U盘内获取的固件信息,向下一级传输,室外机的固件数据通过室内机转发。室内机也可以增加USB接口,如果室内机也具有USB接口,获取的固件数据只能用于室内机本 身和室外机,也就是固件数据要从主向从向下传输。
室外机具有主控板,室外机的主芯片负责外机的控制逻辑。室外机从室内机接收数据并完成固件升级流程,与室内机有线连接。
在本实施例中,该固件升级方法包括:
步骤S100,在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设备,其中,所述待升级设备包括线控器、室内机或室外机;
在本实施例中,在线控器当前连接外部存储器时,根据固件升级指令确定需要进行升级的待升级设备,该待升级设备包括线控器、室内机或室外机,即确定当前需要进行升级的设备为线控器、室内机或室外机中的哪一个。
在本实施例中,操作人员可通过线控器的按键选择当前需要升级的设备,例如,通过线控器的按键选择升级线控器、升级室内机或升级室外机,若该空调系统包括多个室内机和/或多个室外机,则可选择升级某一个室内机或室外机。
步骤S200,确定所述线控器当前是否连接外部存储器;
在本实施例中,在确定待升级设备时,该线控器确定当前是否连接外部存储器,例如,确定该线控器当前是否挂载U盘、SD卡或其他外部存储器。
步骤S300,在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,其中,所述升级文件包括线控器升级文件、室内机升级文件和/或室外机升级文件;
在本实施例中,在线控器当前连接外部存储器时,获取该待升级设备的目标设备类型,并根据该目标设备类型查询外部存储器中的升级文件,确定外部存储器的升级文件中是否存在与该目标设备类型匹配的目标升级文件,其中,升级文件包括对应升级设备的设备类型。
其中,线控器升级文件包括线控器升级固件、线控器设备类型以及线控器固件版本,所述室内机升级文件包括室内机升级固件、室内机设备类型以及室内机固件版本,所述室外机升级文件包括室外机升级固件、室外机设备类型以及室外机固件版本。
其中,在需要同时升级线控器,室内机以及室外机时,升级文件的生产方式如下:线控器软件编译生成线控器烧录代码A、室内机软件编译生成室内机烧录代码B,室外机软件编译生成室外机烧录代码C,A、B、C分别带有对应新版本固件的控制逻辑,实现软件升级所需要的新功能。采用bin文件合成工具,将A、B、C与bootloader合并生成bin文件(升级文件),并在生成升级文件时添加一些固件信息,新生成的升级文件包含bootloader、应用程序(A、B、C)和固件信息。固件信息是应用程序所固有的一些信息,用于固件加载 流程中,老版本固件所需要知道一些新固件的信息,该固件信息包括设备类型、软件版本、校验信息等。Bootloader是负责加载和引导,新固件程序更新之后负责对flash进行管理,并跳转到应用程序(A、B、C)。设备类型是用于各个设备(包括线控器、室内机和/或室外机)的特征号。软件版本为软件的版本信息(包括版本号),软件升级的同时升级软件版本号。校验信息用于烧录代码的完整性校验,确认烧录代码没有损坏或是恶意修改,避免更新错误后造成的系统宕机。新生成的升级文件的文件名可以复制两份并分别命名为A1,B1,C1,而后将三个文件存储于外部存储器例如U盘内,并插入线控器,当然该新生成的升级文件的文件名可以由操作人员进行任意命名。
由于升级文件包括对应的升级设备的设备类型,因此,在得到待升级设备所对应的目标设备类型时,可将该目标设备类型与外部存储器的所有升级文件中的设备类型进行比对,若外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型,则将外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型对应的升级文件作为目标升级文件,若与该目标设备类型一致的设备类型对应的升级文件存在多个,则在多个与该目标设备类型一致的设备类型对应的升级文件中确定目标升级文件,该目标升级文件为升级文件中该目标设备类型对应的部分。
步骤S400,若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作。
在本实施例中,在外部存储器的升级文件中存在与目标设备类型匹配的目标升级文件时,基于目标升级文件执行对所述待升级设备的固件升级操作,具体地,将确定该待升级设备能够接收到的最大字节数,基于该最大字节数拆分升级文件,以获得多个子升级文件,每一个子升级文件均为一帧数据,且每一个子升级文件的字节总数小于该最大字节数,而后依次发送子升级文件至待升级设备,在待升级设备接收完所有的子升级文件时,该待升级设备基于所接收到的子升级文件合并生成升级文件,根据生成的该升级文件的校验信息验证该升级文件的完整性,若该升级文件完整,则激活该升级文件以实现待升级设备的固件升级。
进一步地,在一实施例中,该固件升级方法还包括:在所述线控器当前未连接外部存储器时,输出未连接外部存储器的第一提示信息;或者,
在所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件时,输出所述外部存储器中无目标升级文件的第二提示信息。
进一步地,又一实施例中,该步骤S400包括:若存在,确定目标升级文件的版本信息与待升级设备对应的当前版本信息是否一致,若不一致,则基于所述目标升级文件执行对所述待升级设备的固件升级操作,若一致,则输出待升级设备已升级的提示信息。
其中,线控器存储有线控器、室内机以及室外机的版本信息和设备类型;可通过目标 设备类型查找该待升级设备对应的当前版本信息。
本实施例提出的固件升级方法,通过在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设备,接着确定所述线控器当前是否连接外部存储器,而后在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,然后若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作,实现了根据待升级设备的目标设备类型准确的确定目标升级文件进行固件升级,在空调系统存在多个需要升级的设备时,可将多个升级文件置于同一个外部存储器,通过根据目标设备类型搜索外部存储器的升级文件即可自动寻找对应的目标升级文件,进而实现待升级设备的固件升级,无需人工选择具体的bin文件进行升级,且升级过载不依赖于升级文件的文件名称,实现待升级设备的一键升级,简化了现场人员的操作,降低了升级错误的可能性,提升了用户体验。
基于第一实施例,提出本申请固件升级方法的第二实施例,参照图3,在本实施例中,步骤S300包括:
步骤S310,基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件;
步骤S320,若存在,则基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件。
在本实施例中,在确定待升级设备时,确定该待升级设备所对应的目标设备类型时,而后确定外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件,具体的,将该目标设备类型与外部存储器的所有升级文件中的设备类型进行比对,若外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型,则确定该外部存储器的升级文件中存在与所述目标设备类型匹配的升级文件,与所述目标设备类型匹配的升级文件为外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型对应的升级文件。
而后,根据与目标设备类型匹配的升级文件确定目标升级文件,具体地,若与目标设备类型匹配的升级文件仅包括一个,则该与目标设备类型匹配的升级文件中该目标设备类型对应的升级文件为目标升级文件,若与目标设备类型匹配的升级文件包括多个,则在多个与目标设备类型匹配的升级文件中确定目标升级文件。
本实施例提出的固件升级方法,通过基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件,接着若存在,则基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件,进而能够根 据待升级设备的目标设备类型准确的确定目标升级文件进行固件升级,进而实现待升级设备的一键升级,简化了现场人员的操作,降低了升级错误的可能性,提升了用户体验。
基于第二实施例,提出本申请固件升级方法的第三实施例,参照图4,在本实施例中,与所述目标设备类型匹配的升级文件包括多个,步骤S320包括:
步骤S321,确定多个所述升级文件的创建时刻;
步骤S322,将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件。
外部存储器中存储有多个与所述目标设备类型匹配的升级文件,因此,需要对升级文件进行筛选以确定目标升级文件。
在本实施例中,在外部存储器中存储有多个与所述目标设备类型匹配的升级文件时,获取多个升级文件的创建时刻,对多个创建时刻进行对比,确定多个所述升级文件中创建时刻最晚的升级文件,并根据创建时刻最晚的升级文件确定目标升级文件,该目标升级文件为创建时刻最晚的升级文件中该目标设备类型对应的部分,即在创建时刻最晚的升级文件中获取该目标设备类型对应的部分升级文件并作为目标升级文件。
其中,在生成升级文件时,可在升级文件中存储该升级文件的创建时刻即生成时刻。
本实施例提出的固件升级方法,通过确定多个所述升级文件的创建时刻,接着将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件,一般情况下,最新的升级文件的版本最高,因此能够根据升级文件的创建时刻准确得到目标升级文件,进而提高了目标升级文件的准确性以及获取的效率,提高了固件升级的效率。
基于第二实施例,提出本申请固件升级方法的第四施例,参照图5,在本实施例中,与所述目标设备类型匹配的升级文件包括多个,步骤S320包括:
步骤S323,确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息;
步骤S324,确定所述第一版本信息是否存在版本大于所述第二版本信息的版本信息;
步骤S325,若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件。
外部存储器中存储有多个与所述目标设备类型匹配的升级文件,因此,需要对升级文件进行筛选以确定目标升级文件。
在本实施例中,在外部存储器中存储有多个与所述目标设备类型匹配的升级文件时,获取多个升级文件的第一版本信息,以及待升级设备对应的第二版本信息,具体地,升级文件中均包括固件的版本信息,可通过该升级文件得到待升级设备对应的第一版本信息,并通过目标设备类型查找该待升级设备对应的当前版本信息。
而后,确定第一版本信息是否存在版本大于所述第二版本信息的版本信息,若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件,该目标升级文件为创建时刻最晚的升级文件中该目标设备类型对应的部分,即在创建时刻最晚的升级文件中获取该目标设备类型对应的部分升级文件并作为目标升级文件。
本实施例提出的固件升级方法,通过确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息,接着确定所述第一版本信息是否存在版本大于所述第二版本信息的版本信息,而后若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件,因此能够根据第一版本信息以及升级文件的创建时刻准确得到目标升级文件,进而提高了目标升级文件的准确性以及获取的效率,提高了固件升级的效率。
基于第二实施例,提出本申请固件升级方法的第五实施例,参照图6,在本实施例中,步骤S310包括:
步骤S311,获取所述外部存储器中存储的各个升级文件所对应的设备类型;
步骤S312,确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,其中,若各个所述设备类型中存在与所述目标设备类型一致的设备类型,则确定所述外部存储器中存在与所述目标设备类型匹配的升级文件。
在本实施例中,外部存储器中存储的升级文件包括设备类型,在确定待升级设备时,确定该待升级设备所对应的目标设备类型时,而后获取外部存储器中存储的各个升级文件所对应的设备类型,并将该目标设备类型与外部存储器的所有升级文件中的设备类型进行比对,确定各个设备类型中是否存在与所述目标设备类型一致的设备类型,若外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型,则确定该外部存储器的升级文件中存在与所述目标设备类型匹配的升级文件,与所述目标设备类型匹配的升级文件为外部存储器的所有升级文件中的设备类型中存在与该目标设备类型一致的设备类型对应的升级文件。
需要说明的是,若各个所述设备类型中不存在与所述目标设备类型一致的设备类型,则判定所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件,进而输出所述外部存储器中无目标升级文件的第二提示信息。
本实施例提出的固件升级方法,通过获取所述外部存储器中存储的各个升级文件所对应的设备类型,接着确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,能够根据升级文件所对应的设备类型确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,进而提高目标升级文件的准确性以及获取的效率, 提高了固件升级的效率。
基于第一实施例,提出本申请固件升级方法的第六实施例,参照图7,在本实施例中,步骤S400包括:
步骤S410,获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进行文件完整性验证;
步骤S420,在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
在本实施例中,在确定目标升级文件时,获取该目标升级文件对应的校验信息,并基于该校验信息对所述目标升级文件进行文件完整性验证,具体地,根据目标升级文件对应的升级文件内部所包含文件完整性校验算法通过该验证信息验证目标升级文件的完整性,并在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
本实施例提出的固件升级方法,通过获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进行文件完整性验证,接着在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作,能够确保目标升级文件的完整性,避免使用损坏文件进行固件升级而造成升级后的待升级设备宕机。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有固件升级程序,所述固件升级程序被处理器执行时实现如下操作:
在接收到基于线控器触发的固件升级指令时,确定所述固件升级指令对应的待升级设备,其中,所述待升级设备包括线控器、室内机或室外机;
确定所述线控器当前是否连接外部存储器;
在所述线控器当前连接外部存储器时,基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,以确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的目标升级文件,其中,所述升级文件包括线控器升级文件、室内机升级文件和/或室外机升级文件;
若存在,则基于所述目标升级文件执行对所述待升级设备的固件升级操作。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中是否存在与所述目标设备类型匹配的升级文件;
若存在,则基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
确定多个所述升级文件的创建时刻;
将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息;
确定所述第一版本信息是否存在版本大于所述第二版本信息的版本信息;
若存在,则基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
获取所述外部存储器中存储的各个升级文件所对应的设备类型;
确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,其中,若各个所述设备类型中存在与所述目标设备类型一致的设备类型,则确定所述外部存储器中存在与所述目标设备类型匹配的升级文件。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进行文件完整性验证;
在验证通过时,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
进一步地,所述固件升级程序被处理器执行时还实现如下操作:
在所述线控器当前未连接外部存储器时,输出未连接外部存储器的第一提示信息;或者,
在所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件时,输出所述外部存储器中无目标升级文件的第二提示信息。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说 明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (10)

  1. 一种固件升级方法,其特征在于,应用于设有线控器的空调系统;所述固件升级方法包括以下步骤:
    接收基于线控器触发的固件升级指令,确定所述固件升级指令对应的待升级设备,其中,所述待升级设备包括所述空调系统的线控器、室内机或室外机;
    确定所述线控器连接外部存储器;
    基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,确定所述外部存储器的升级文件中存在与所述目标设备类型匹配的目标升级文件,其中,所述升级文件包括线控器升级文件、室内机升级文件和/或室外机升级文件;
    基于所述目标升级文件执行对所述待升级设备的固件升级操作。
  2. 如权利要求1所述的固件升级方法,其特征在于,所述基于所述待升级设备所对应的目标设备类型,查询所述外部存储器,确定所述外部存储器的升级文件中存在与所述目标设备类型匹配的目标升级文件的步骤包括:
    基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中存在与所述目标设备类型匹配的升级文件;
    基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件。
  3. 如权利要求2所述的固件升级方法,其特征在于,与所述目标设备类型匹配的升级文件包括多个,所述基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤包括:
    确定多个所述升级文件的创建时刻;
    将多个所述升级文件中,基于创建时刻最晚的升级文件确定所述目标升级文件。
  4. 如权利要求2所述的固件升级方法,其特征在于,所述升级文件包括多个,所述基于所述与所述目标设备类型匹配的升级文件确定所述目标升级文件的步骤包括:
    确定多个所述升级文件的第一版本信息,以及所述待升级设备对应的第二版本信息;
    确定所述第一版本信息存在版本大于所述第二版本信息的版本信息;
    基于大于所述第二版本信息的版本信息对应的升级文件中,创建时刻最晚的升级文件确定所述目标升级文件。
  5. 如权利要求2所述的固件升级方法,其特征在于,所述基于所述待升级设备所对应的目标设备类型,确定所述外部存储器的升级文件中存在与所述目标设备类型匹配的升级文件的步骤包括:
    获取所述外部存储器中存储的各个升级文件所对应的设备类型;
    确定各个所述设备类型中是否存在与所述目标设备类型一致的设备类型,其中,各个所述设备类型中存在与所述目标设备类型一致的设备类型,确定所述外部存储器中存在与所述目标设备类型匹配的升级文件。
  6. 如权利要求1所述的固件升级方法,其特征在于,所述基于所述目标升级文件执行对所述待升级设备的固件升级操作的步骤包括:
    获取所述目标升级文件对应的校验信息,并基于所述校验信息对所述目标升级文件进行文件完整性验证;
    确认验证通过,基于所述目标升级文件执行对所述待升级设备的固件升级操作。
  7. 如权利要求1所述的固件升级方法,其特征在于,所述固件升级方法还包括:
    所述线控器当前未连接外部存储器,输出未连接外部存储器的第一提示信息;或者,
    所述外部存储器的升级文件中不存在与所述目标设备类型匹配的目标升级文件,输出所述外部存储器中无目标升级文件的第二提示信息。
  8. 如权利要求1至7任一项所述的固件升级方法,其特征在于,所述线控器升级文件包括线控器升级固件、线控器设备类型以及线控器固件版本,所述室内机升级文件包括室内机升级固件、室内机设备类型以及室内机固件版本,所述室外机升级文件包括室外机升级固件、室外机设备类型以及室外机固件版本。
  9. 一种固件升级装置,其特征在于,所述固件升级装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的固件升级程序,所述固件升级程序被所述处理器执行时实现如权利要求1至7中任一项所述的固件升级方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有固件升级程序,所述固件升级程序被处理器执行时实现如权利要求1至7中任一项所述的固件升级方法的步骤。
PCT/CN2019/089078 2018-12-19 2019-05-29 固件升级方法、装置及计算机可读存储介质 WO2020124958A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811561183.9A CN109656597A (zh) 2018-12-19 2018-12-19 固件升级方法、装置及计算机可读存储介质
CN201811561183.9 2018-12-19

Publications (1)

Publication Number Publication Date
WO2020124958A1 true WO2020124958A1 (zh) 2020-06-25

Family

ID=66115888

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089078 WO2020124958A1 (zh) 2018-12-19 2019-05-29 固件升级方法、装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109656597A (zh)
WO (1) WO2020124958A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656597A (zh) * 2018-12-19 2019-04-19 广东美的暖通设备有限公司 固件升级方法、装置及计算机可读存储介质
CN110795119A (zh) * 2019-09-19 2020-02-14 平安科技(深圳)有限公司 固件升级方法、装置、计算机设备及存储介质
CN111209059B (zh) * 2020-01-14 2023-03-03 中国北方车辆研究所 一种嵌入式软件多版本控制系统及方法
CN111273930A (zh) * 2020-01-21 2020-06-12 深圳市雷赛软件技术有限公司 固件升级控制方法、上位机及固件升级系统
CN111623476B (zh) * 2020-04-27 2022-05-17 海信(山东)空调有限公司 一种空调器室外eeprom中的数据更新方法、装置及存储介质
CN113944991A (zh) * 2020-07-17 2022-01-18 海信(山东)空调有限公司 一种空调器及固件升级方法
CN112035130A (zh) * 2020-08-13 2020-12-04 珠海格力电器股份有限公司 基于工控屏的程序烧录方法、装置和计算机设备
CN112230957A (zh) * 2020-10-16 2021-01-15 深圳市中江天华科技有限公司 一种基于云端和应用桥接的设备升级方法
CN112346768A (zh) * 2021-01-08 2021-02-09 武汉精能电子技术有限公司 一种多芯片平台并机升级方法、装置及电子设备
CN114443083B (zh) * 2021-07-09 2023-04-11 荣耀终端有限公司 系统升级方法、装置、电子设备及存储介质
CN113568640A (zh) * 2021-07-30 2021-10-29 佛山市顺德区美的电子科技有限公司 空调器外机主程序的升级方法、运行控制装置及空调器

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399675A (zh) * 2007-09-25 2009-04-01 海尔集团公司 一种无线控制装置及网络家电系统
CN102170539A (zh) * 2011-05-18 2011-08-31 深圳创维-Rgb电子有限公司 电视机及其开机logo升级方法
CN105988843A (zh) * 2015-02-15 2016-10-05 腾讯科技(深圳)有限公司 移动终端固件升级方法及固件升级装置
EP3168744A1 (en) * 2015-09-24 2017-05-17 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Adapter and adapter upgrade method
CN106789334A (zh) * 2017-01-13 2017-05-31 狼天科技(深圳)有限公司 一种固件升级的方法和设备
CN109656597A (zh) * 2018-12-19 2019-04-19 广东美的暖通设备有限公司 固件升级方法、装置及计算机可读存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101384997A (zh) * 2006-03-01 2009-03-11 安讯士有限公司 用于对多个装置进行升级的方法及系统
JP5790222B2 (ja) * 2011-07-12 2015-10-07 株式会社リコー 通信装置、アップデート方法およびアップデートプログラム
KR20140066535A (ko) * 2012-11-23 2014-06-02 삼성전자주식회사 전자 장치, 펌웨어 업데이트 방법 및 컴퓨터 판독가능 기록매체
CN103118198B (zh) * 2013-02-05 2016-04-13 惠州Tcl移动通信有限公司 移动终端的固件升级方法及系统
CN105135599A (zh) * 2015-08-07 2015-12-09 珠海格力电器股份有限公司 空调固件升级装置和方法
CN108111555B (zh) * 2016-11-25 2021-07-27 斑马智行网络(香港)有限公司 用于控制安装包下载过程的方法及系统
CN106991326A (zh) * 2017-03-02 2017-07-28 深圳怡化电脑股份有限公司 一种设备固件的升级方法及其设备
CN106959830B (zh) * 2017-03-14 2020-07-03 北京三快在线科技有限公司 设备初始化方法、装置及打印设备
CN107291497B (zh) * 2017-06-08 2021-02-05 Tcl通力电子(惠州)有限公司 多固件升级方法、系统及可读存储介质
CN107329784B (zh) * 2017-06-27 2021-01-05 广东美的暖通设备有限公司 固件升级方法和分布式多层系统
CN208737449U (zh) * 2018-08-01 2019-04-12 上海华测导航技术股份有限公司 一种板卡固件升级装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399675A (zh) * 2007-09-25 2009-04-01 海尔集团公司 一种无线控制装置及网络家电系统
CN102170539A (zh) * 2011-05-18 2011-08-31 深圳创维-Rgb电子有限公司 电视机及其开机logo升级方法
CN105988843A (zh) * 2015-02-15 2016-10-05 腾讯科技(深圳)有限公司 移动终端固件升级方法及固件升级装置
EP3168744A1 (en) * 2015-09-24 2017-05-17 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Adapter and adapter upgrade method
CN106789334A (zh) * 2017-01-13 2017-05-31 狼天科技(深圳)有限公司 一种固件升级的方法和设备
CN109656597A (zh) * 2018-12-19 2019-04-19 广东美的暖通设备有限公司 固件升级方法、装置及计算机可读存储介质

Also Published As

Publication number Publication date
CN109656597A (zh) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020124958A1 (zh) 固件升级方法、装置及计算机可读存储介质
CN108196878B (zh) 应用程序安装包的生成方法、装置、电子设备及存储介质
US9021462B2 (en) Systems and methods for provisioning equipment
CN108986821B (zh) 一种设置房间与设备关系的方法和设备
US20160132315A1 (en) Method, Apparatus, and Communication Device for Updating Firmware
CN110955416A (zh) 接口文档生成方法、装置、设备和计算机存储介质
CN110727454A (zh) 智能设备的更新方法及装置、电子设备、存储介质
WO2019140656A1 (zh) 一种固件升级方法、装置、电子设备及控制设备
KR20100063474A (ko) Fota 서비스 제공 방법 및 그 시스템
US20220052866A1 (en) Smart home system control method and apparatus, electronic device
CN104699511B (zh) 插件升级方法及装置
CN114237676B (zh) 一种fpga逻辑更新方法、装置、设备及可读存储介质
CN108958784B (zh) 软件升级控制方法、家电设备、服务器、装置及介质
EP2664988B1 (en) Method, device and system for installing terminal software
US20180206276A1 (en) Bluetooth pairing system and operating method thereof
CN113672441A (zh) 对智能设备的测试方法及装置
CN112115055A (zh) 一种多机自动化测试方法、装置及计算机设备
CN114661330B (zh) 车辆硬件程序更新方法、装置、设备及存储介质
CN109002305B (zh) 一种设备程序的更新方法及其系统
TWI665553B (zh) 具儀器控制功能之轉接裝置及其儀器控制系統與應用於其上的儀器控制方法
CN108491344B (zh) 机器人控制管理方法、系统、机器人和计算机存储介质
KR20150001162A (ko) 스마트 디바이스 및 센서노드 통합 응용프로그램 업데이트 장치 및 방법
CN111752577A (zh) 一种系统版本的升级方法及设备
JP2014217186A (ja) 電子装置、検証方法及び検証プログラム
CN113094064A (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: 19898474

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

Country of ref document: EP

Kind code of ref document: A1