A method, device and storage medium for remote upgrading of multiple control panels of an Internet of Things device

By implementing the remote upgrade method of multi-control board of IoT devices in IoT devices, the security of OTA upgrade and multi-control board upgrade problems are solved, ensuring that the device automatically recovers when the upgrade fails or is abnormal, and the security upgrade of multi-control board is achieved Function.

CN114189440BActive Publication Date: 2024-12-03SHENZHEN TOPBAND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111282778.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2024-12-03
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

Existing OTA upgrades have security problems and multi-control board upgrade problems in IoT devices, especially when the upgrade fails or the execution program is abnormal, the device cannot automatically recover, affecting normal work.

Method used

A remote upgrade method for IoT devices multi-control boards is proposed, including obtaining upgrade commands and information issued by the server, downloading and distributing upgrade firmware to the OTA program area, copying to the execution program area, and performing verification and security during the upgrade process Verification to ensure the security and reliability of the upgrade process and ensure the device automatically recovers in the event of failure.

Benefits of technology

The security upgrade of multiple control boards for IoT devices is realized, ensuring that the device automatically resumes normal operation when the OTA upgrade fails or the program execution is abnormal, and supports the OTA upgrade of multiple control boards, solving the security upgrade problem of multiple control boards for IoT home appliances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114189440B_ABST
    Figure CN114189440B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of Internet of Things technology, and in particular to a remote upgrade method for multiple control panels of Internet of Things devices, including the following steps: obtaining upgrade commands and upgrade information issued by a server; downloading upgrade firmware according to the upgrade command and upgrade information and distributing the upgrade firmware to the OTA program area of ​​the control panel; copying the upgrade firmware from the OTA program area to the execution program area of ​​the control panel; and executing the upgrade firmware in the execution program area. Through the above method, the control panel maintains two copies of the latest executable programs. When the OTA upgrade fails or the execution program is abnormal, the device will automatically recover without affecting normal operation. At the same time, the OTA upgrade function of multiple control panels can also be realized, solving the problem of safe upgrade of multiple control panels of Internet of Things home appliances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of Internet of Things, and in particular relates to a method, device and storage medium for remotely upgrading multiple control panels of Internet of Things equipment. Background Art

[0002] The Internet of Things refers to the use of various information sensors, radio frequency identification technology and other detection devices and technologies to collect all kinds of information about any object and process that needs to be monitored, connected and interacted in real time, and to achieve ubiquitous connection between objects and objects, objects and people through various possible network accesses, and to achieve intelligent perception, identification and management of objects and processes. The Internet of Things is an information carrier based on the Internet, traditional telecommunications networks, etc. It allows all ordinary physical objects that can be independently addressed to form an interconnected network.

[0003] With the widespread use of IoT devices, OTA upgrades have become one of the essential functions of IoT devices. It has effectively solved the changes in the demand for big data statistics, changes in the remote control method of devices, and bug repairs. The security of existing OTA upgrades and the upgrade of multiple control boards of IoT devices have become problems. Summary of the invention

[0004] The embodiment of the present invention provides a remote upgrade method for multiple control boards of an Internet of Things device to solve the problems of OTA upgrade security and multiple control board upgrade of an Internet of Things device in the prior art.

[0005] The embodiment of the present invention is implemented by providing a method for remotely upgrading multiple control boards of an Internet of Things device, the method comprising the following steps:

[0006] Get the upgrade command and upgrade information sent by the server;

[0007] Downloading the upgrade firmware according to the upgrade command and the upgrade information and distributing the upgrade firmware to the OTA program area of ​​the control board;

[0008] Copying the upgrade firmware from the OTA program area to the execution program area of ​​the control board;

[0009] Execute the upgraded firmware in the execution program area.

[0010] A remote upgrade device for multiple control panels of an Internet of Things device, comprising:

[0011] An acquisition unit, used to acquire the upgrade command and upgrade information sent by the server;

[0012] A download distribution unit, configured to download the upgrade firmware according to the upgrade command and the upgrade information and distribute the upgrade firmware to the OTA program area of ​​the control board;

[0013] A copying unit, used to copy the upgrade firmware from the OTA program area to the execution program area of ​​the control board;

[0014] The execution unit is used to execute the upgraded firmware in the execution program area.

[0015] A computer device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0016] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the above method.

[0017] In an embodiment of the present invention, the control board maintains two copies of the latest executable programs. When the OTA upgrade fails or the execution program is abnormal, the device will automatically recover without affecting normal operation. At the same time, the OTA upgrade function of multiple control boards can also be realized to solve the problem of safe upgrade of multiple control boards of IoT home appliances. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required in the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work.

[0019] Figure 1 It is a flow chart of a method for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0020] Figure 2 It is a flow chart of another method for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0021] Figure 3 It is a flowchart of another method for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0022] Figure 4 It is a flowchart of another method for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0023] Figure 5 It is a flowchart of another method for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0024] Figure 6 This is a structural block diagram of a multi-control board remote upgrade device for an Internet of Things device provided by an embodiment of the present invention;

[0025] Figure 7 It is a structural block diagram of another device for remote upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention;

[0026] Figure 8 This is a structural block diagram of another device for remotely upgrading multiple control boards of an Internet of Things device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0028] In existing technologies, the security of OTA upgrades and the upgrade of multiple control boards of IoT devices have become problems

[0029] In order to solve the above problems, the present invention provides a method for remotely upgrading multiple control panels of an Internet of Things device.

[0030] Figure 1 A flowchart of a method for remotely upgrading multiple control boards of an Internet of Things device applicable to an embodiment of the present invention is shown, comprising the following steps:

[0031] Step S101, obtaining the upgrade command and upgrade information sent by the server.

[0032] In an embodiment of the present invention, when an OTA upgrade is required, the terminal first packages the upgrade program and the firmware header to generate the upgrade firmware and uploads it to the server. The server then creates an upgrade task and selects the execution time interval of the upgrade task, and sends the upgrade command and upgrade information at the specified time. The control board responsible for communicating with the server obtains the upgrade instructions and upgrade information issued by the server, which can be an IOT version. The upgrade information contains the identification code of the corresponding control board.

[0033] Step S102: downloading the upgrade firmware according to the upgrade command and the upgrade information and distributing the upgrade firmware to the OTA program area of ​​the control board.

[0034] In the embodiment of the present invention, the control board program running space can be divided into four blocks, the first block is the boot program area, the second block is the execution program area, the third block is the OTA program area, and the fourth block is the program information area. The program information area includes information such as the program version number and the checksum.

[0035] The IOT board communicating with the server downloads the corresponding upgrade firmware from the server according to the upgrade command and upgrade information, and distributes the upgrade firmware to the OTA program area of ​​the corresponding control board. The number of control boards can be one or more. When there are multiple control boards, the IOT board can distribute the upgrade firmware to multiple matching control boards at the same time. The upgrade firmware includes a firmware header and an upgrade program.

[0036] The communication methods by which the IoT board distributes the upgraded firmware to the control board include but are not limited to serial port, USB, SPI, i2c, WiFI, Bluetooth, wired and wireless network, etc.

[0037] Step S103, copying the upgrade firmware from the OTA program area to the execution program area of ​​the control board.

[0038] After the control board receives the upgraded firmware and downloads the upgraded firmware to the OTA program area, the boot program in the boot program area of ​​the control board copies the upgraded firmware in the OTA program area to the execution program area of ​​the control board. Preferably, the boot program in the boot program area can be activated by restarting the device to complete the copying of the upgraded firmware in the OTA program area to the execution program area of ​​the control board.

[0039] Preferably, after receiving the upgraded firmware, the control board can check the upgraded firmware according to the information in the firmware header to determine whether the upgraded firmware is complete. If the upgraded firmware is determined to be complete, the upgraded firmware is copied from the OTA program area to the execution program area of ​​the control board. If the upgraded firmware is determined to be incomplete, an upgrade failure message can be sent to the server through the IOT board, and a corresponding error code can also be attached.

[0040] Step S104, executing the upgraded firmware in the execution program area.

[0041] After the upgrade firmware is copied to the execution program area in the above steps, the control board OTA program upgrade can be completed by executing the upgrade firmware. The upgrade program included in the upgrade firmware.

[0042] Preferably, for the sake of upgrade safety, the upgrade firmware can be verified before execution, and the upgrade can be performed after the verification passes.

[0043] To summarize, through the above-mentioned remote upgrade method for multiple control boards of IoT devices, the control board maintains two latest executable programs. When the OTA upgrade fails or the execution program is abnormal, the device will automatically recover without affecting normal operation. At the same time, the OTA upgrade function of multiple control boards can also be realized to solve the problem of safe upgrade of multiple control boards of IoT home appliances.

[0044] Figure 2 Another flowchart of a method for remotely upgrading multiple control boards of an IoT device applicable to an embodiment of the present invention is shown, wherein step S102 specifically includes:

[0045] Step S1021, downloading the firmware header.

[0046] In the embodiment of the present invention, the upgrade firmware includes a firmware header. After the upgrade command and upgrade information sent by the server are obtained, the upgrade firmware is not downloaded directly, but the firmware header of the upgrade firmware is downloaded first, and the firmware header includes the firmware upgrade information.

[0047] Preferably, for the sake of upgrade safety, after obtaining the upgrade command and upgrade information issued by the server, the security of the obtained upgrade information is verified before downloading the firmware header. If the verification passes, the firmware header can be downloaded. If the verification fails, the upgrade failure information is fed back to the server, and the fault code can also be fed back.

[0048] Step S1022: determining whether the upgraded firmware is legal based on the firmware header and the upgrade information.

[0049] In order to further improve the upgrade security, after downloading the firmware header, the legality can be determined by verifying whether the upgrade information obtained from the server is consistent with the firmware upgrade information in the firmware header. If legal, the process proceeds to step S1023; if not, the process proceeds to step S301 to feedback the upgrade failure information to the server, and also feedback the fault code.

[0050] Step S1023: determining whether the upgraded firmware matches the control board according to the firmware header and the upgrade information.

[0051] The acquired upgrade information includes the identification code of the corresponding control board. The identification code of the control board to be upgraded can be read and compared with the identification code in the upgrade information to determine whether the two are consistent. If they are consistent, the process proceeds to step S1024; if they are inconsistent, the process proceeds to step S301 to feedback upgrade failure information to the server, and also feedback a fault code.

[0052] Step S1024, downloading the upgrade firmware and distributing the upgrade firmware to the OTA program area of ​​the control board.

[0053] When the above verifications are passed, the upgrade firmware is downloaded and distributed to the OTA program area of ​​the above-mentioned matching control board, and the control board can be one or more. In the embodiment of the present invention, the IOT board that communicates with the server and the control board is used to download and distribute the upgrade firmware, and one IOT board can correspond to multiple control boards.

[0054] Preferably, in order to facilitate management, downloading the upgrade firmware or distributing the upgrade firmware has a timeout detection. When it is determined that the downloading of the upgrade firmware or the distribution of the upgrade firmware has timed out, the upgrade firmware is downloaded or distributed again.

[0055] Figure 3 A flowchart of another method for remotely upgrading multiple control boards of an IoT device applicable to an embodiment of the present invention is shown, wherein step S103 specifically includes:

[0056] Step S1031, judging whether the current device mode is the OTA upgrade mode according to the boot program in the boot program area.

[0057] In the embodiment of the present invention, it is also necessary to judge the device mode, which may include normal mode, OTA upgrade mode, fault mode, etc. The control board includes a boot program area, and the boot program in the boot program area searches for the device mode to judge whether the device is running in the OTA upgrade mode. If so, it goes to step S1032; if not, it goes to step S401.

[0058] Step S1032, copying the upgrade firmware from the OTA program area to the execution program area.

[0059] In the embodiment of the present invention, in order to improve the security of the upgrade, the upgrade firmware is not directly executed from the OTA program area, but the upgrade firmware is copied from the OTA program area to the execution program area and then executed.

[0060] Preferably, OTA upgrades can be performed at different stages according to different device modes. For example, in normal mode, the execution partition firmware is first checked. If it passes, the device is started normally, and then the version number is reported to the server. If the check fails, the upgrade firmware in the OTA program area is checked, and the subsequent steps are the same as in the OTA upgrade mode; in OTA upgrade mode, the OTA partition upgrade firmware is first checked. If it passes, the upgrade firmware is copied to the execution program area. If it fails, the normal mode is entered. If it passes, the upgrade firmware is copied from the OTA program area to the execution program area. Copy failure can be reported to the server; in fault mode, a request is sent to the server, and the upgrade failure information requests the upgrade command to be reissued.

[0061] Preferably, the integrity of the upgrade firmware is checked before entering the OTA upgrade mode. The firmware header contains a firmware check code, and the integrity can be determined by calculating whether the check code of the downloaded upgrade firmware is consistent with the check code contained in the firmware header. If they are consistent, the OTA upgrade mode is started; if they are inconsistent, the upgrade failure information is fed back to the server, and the fault code can also be fed back.

[0062] Figure 4 A flowchart of another method for remotely upgrading multiple control boards of an Internet of Things device applicable to an embodiment of the present invention is shown, and the method further includes:

[0063] Step S201, obtaining the number of failures of copying the upgrade firmware from the OTA program area to the execution program area.

[0064] In the embodiment of the present invention, when the control board is OTA upgraded, the upgrade firmware may fail to be copied from the OTA program area to the execution program area. The boot program in the boot program area copies the upgrade firmware from the OTA program area to the execution program area and records the number of failures after verification fails.

[0065] Step S202: When the number of failures exceeds a preset number, an upgrade failure message is sent to the server.

[0066] When the preset number of failures is obtained, it is determined that there is no valid executable program, and an upgrade failure message is sent to the server. The preset number of times can be set in advance. For example, if the preset number of failures is 3, an upgrade failure message is sent to the server.

[0067] Step S203: request the server to resend the upgrade command.

[0068] After sending the upgrade failure information to the server, you can also actively request the server to resend the upgrade command so that you can perform the OTA upgrade again.

[0069] Preferably, the control board can detect whether the execution program is damaged each time it is started. If it is damaged and there is no program in the OTA program area, the control board can actively request the server to send an upgrade command.

[0070] Figure 5 A flowchart of another method for remotely upgrading multiple control boards of an Internet of Things device applicable to an embodiment of the present invention is shown, and the method further includes:

[0071] Step S105, obtaining the new version number after upgrading.

[0072] After completing the upgrade and restarting, obtain and record the new version number after the upgrade. The new version number can be recorded in the program information area of ​​the control panel.

[0073] Step S106: Send the new version number to the server.

[0074] The upgraded new version number is sent to the IOT board. After the IOT board uploads the new version number to the server, the server determines whether the upgrade is successful. If successful, the upgrade is completed. If failed, the upgrade command can be sent again.

[0075] Figure 6 The structure block diagram of a multi-control board remote upgrade device for an Internet of Things device applicable to an embodiment of the present invention is shown, comprising:

[0076] The acquisition unit 601 is used to acquire the upgrade command and upgrade information sent by the server.

[0077] In an embodiment of the present invention, when an OTA upgrade is required, the terminal first packages the upgrade program and the firmware header to generate the upgrade firmware and uploads it to the server. The server then creates an upgrade task and selects the execution time interval of the upgrade task, and sends the upgrade command and upgrade information at the specified time. The acquisition unit 601 obtains the upgrade instructions and upgrade information issued by the server, which is the control board responsible for communicating with the server, which can be an IOT version. The upgrade information contains the identification code of the corresponding control board.

[0078] The download distribution unit 602 is used to download the upgrade firmware according to the upgrade command and the upgrade information and distribute the upgrade firmware to the OTA program area of ​​the control board.

[0079] In the embodiment of the present invention, the control board program running space can be divided into four blocks, the first block is the boot program area, the second block is the execution program area, the third block is the OTA program area, and the fourth block is the program information area. The program information area includes information such as the program version number and the checksum.

[0080] The IOT board in the download distribution unit 602 that communicates with the server downloads the corresponding upgrade firmware from the server according to the upgrade command and upgrade information, and distributes the upgrade firmware to the OTA program area of ​​the corresponding control board. The number of control boards can be one or more. When there are multiple control boards, the IOT board can distribute the upgrade firmware to multiple matching control boards at the same time. The upgrade firmware includes a firmware header and an upgrade program.

[0081] The communication methods by which the IoT board distributes the upgraded firmware to the control board include but are not limited to serial port, USB, SPI, i2c, WiFI, Bluetooth, wired and wireless network, etc.

[0082] The copying unit 603 is used to copy the upgrade firmware from the OTA program area to the execution program area of ​​the control board.

[0083] After the control board receives the upgraded firmware and downloads the upgraded firmware to the OTA program area, the boot program of the boot program area of ​​the control board of the copy unit 603 copies the upgraded firmware of the OTA program area to the execution program area of ​​the control board. Preferably, the boot program of the boot program area can be activated by restarting the device to complete the copying of the upgraded firmware of the OTA program area to the execution program area of ​​the control board.

[0084] Preferably, after receiving the upgraded firmware, the control board can check the upgraded firmware according to the information in the firmware header to determine whether the upgraded firmware is complete. If the upgraded firmware is determined to be complete, the upgraded firmware is copied from the OTA program area to the execution program area of ​​the control board. If the upgraded firmware is determined to be incomplete, an upgrade failure message can be sent to the server through the IOT board, and a corresponding error code can also be attached.

[0085] The execution unit 604 is used to execute the upgraded firmware in the execution program area.

[0086] After the upgrade firmware is copied to the execution program area in the above steps, the upgrade firmware can be executed by the execution unit 604 to complete the control board OTA program upgrade. The upgrade program included in the upgrade firmware.

[0087] Preferably, for the sake of upgrade safety, the execution unit 604 may verify the upgrade firmware before executing the upgrade firmware, and then perform the upgrade after the verification passes.

[0088] To summarize, through the above-mentioned remote upgrade method for multiple control boards of IoT devices, the control board maintains two latest executable programs. When the OTA upgrade fails or the execution program is abnormal, the device will automatically recover without affecting normal operation. At the same time, the OTA upgrade function of multiple control boards can also be realized to solve the problem of safe upgrade of multiple control boards of IoT home appliances.

[0089] Figure 7 The structural block diagram of another IoT device multi-control board remote upgrade device applicable to an embodiment of the present invention is shown, and the download distribution unit 602 specifically includes:

[0090] The firmware header download module 6021 is used to download the firmware header.

[0091] In the embodiment of the present invention, the upgrade firmware includes a firmware header. After obtaining the upgrade command and upgrade information sent by the server, the firmware header download module 6021 does not directly download the upgrade firmware, but first downloads the firmware header of the upgrade firmware, which includes the firmware upgrade information.

[0092] Preferably, for the sake of upgrade safety, after obtaining the upgrade command and upgrade information issued by the server, the security of the obtained upgrade information is verified before downloading the firmware header. If the verification passes, the firmware header can be downloaded. If the verification fails, the upgrade failure information is fed back to the server, and the fault code can also be fed back.

[0093] The first judgment module 6022 is used to judge whether the upgraded firmware is legal according to the firmware header and the upgrade information.

[0094] In order to further improve the upgrade security, after downloading the firmware header, the first judgment module 6022 can also verify whether the upgrade information obtained from the server is consistent with the firmware upgrade information in the firmware header to determine whether it is legal. If it is legal, it can proceed to the next step; if it is not legal, it will feedback the upgrade failure information to the server, and can also feedback the fault code.

[0095] The second judgment module 6023 is used to judge whether the upgraded firmware matches the control board according to the firmware header and the upgrade information.

[0096] The acquired upgrade information includes the identification code of the corresponding control board. The second judgment module 6023 can read the identification code of the control board to be upgraded and compare it with the identification code in the upgrade information to determine whether the two are consistent. If they are consistent, the next step is entered; if they are inconsistent, the upgrade failure information is fed back to the server, and the fault code can also be fed back.

[0097] The download distribution module 6024 is used to download the upgrade firmware and distribute the upgrade firmware to the OTA program area of ​​the control board.

[0098] When the above checks are all passed, the download distribution module 6024 downloads the upgrade firmware and distributes the upgrade firmware to the OTA program area of ​​the above-mentioned matching control board, and the control board can be one or more. In the embodiment of the present invention, the IOT board that communicates with the server and the control board downloads and distributes the upgrade firmware, and one IOT board can correspond to multiple control boards.

[0099] Preferably, in order to facilitate management, downloading the upgrade firmware or distributing the upgrade firmware has a timeout detection. When it is determined that the downloading of the upgrade firmware or the distribution of the upgrade firmware has timed out, the upgrade firmware is downloaded or distributed again.

[0100] like Figure 7 The structure block diagram of the remote upgrade device for multiple control boards of IoT devices is shown, and the copy unit 603 specifically includes:

[0101] The mode determination module 6031 is used to determine whether the current device mode is the OTA upgrade mode according to the boot program in the boot program area.

[0102] In the embodiment of the present invention, the mode determination module 6031 determines the device mode, which may include normal mode, OTA upgrade mode, fault mode, etc. The control board includes a boot program area, and the boot program in the boot program area searches for the device mode to determine whether the device is running in the OTA upgrade mode. If so, the process proceeds to step S1032.

[0103] The copy module 6032 is used to copy the upgrade firmware from the OTA program area to the execution program area.

[0104] In the embodiment of the present invention, in order to improve the security of the upgrade, the upgrade firmware is not directly executed from the OTA program area, but the copy module 6032 copies the upgrade firmware from the OTA program area to the execution program area and then executes it.

[0105] Preferably, OTA upgrades can be performed at different stages according to different device modes. For example, in normal mode, the execution partition firmware is first checked. If it passes, the device is started normally, and then the version number is reported to the server. If the check fails, the upgrade firmware in the OTA program area is checked, and the subsequent steps are the same as the OTA upgrade mode; in OTA upgrade mode, the OTA partition upgrade firmware is first checked. If it passes, the upgrade firmware is copied to the execution program area. If it fails, the normal mode is entered. If it passes, the upgrade firmware is copied from the OTA program area to the execution program area. Copy failure can be reported to the server; in fault mode, a request is sent to the server, and the upgrade failure information requests the upgrade command to be reissued.

[0106] Preferably, the integrity of the upgrade firmware is checked before entering the OTA upgrade mode. The firmware header contains a firmware check code, and the integrity can be determined by calculating whether the check code of the downloaded upgrade firmware is consistent with the check code contained in the firmware header. If they are consistent, the OTA upgrade mode is started; if they are inconsistent, the upgrade failure information is fed back to the server, and the fault code can also be fed back.

[0107] Figure 8 A structural block diagram of another multi-control board remote upgrade device for an Internet of Things device applicable to an embodiment of the present invention is shown, and further includes:

[0108] The failure number acquisition unit 701 is used to acquire the failure number of copying the upgrade firmware from the OTA program area to the execution program area.

[0109] In the embodiment of the present invention, when the control board is OTA upgraded, the upgrade firmware may fail to be copied from the OTA program area to the execution program area. The boot program in the boot program area copies the upgrade firmware from the OTA program area to the execution program area and fails to verify. The failure number acquisition unit 701 will record the failure number.

[0110] The failure information sending unit 702 is used to send upgrade failure information to the server when the number of failures exceeds a preset number.

[0111] After obtaining the preset number of failures, it is determined that there is no valid executable program, and the failure information sending unit 702 sends the upgrade failure information to the server. The preset number of times can be set in advance. For example, if the failure is set to 3 times in advance, the upgrade failure information is sent to the server.

[0112] The upgrade command sending unit 703 is used to request the server to resend the upgrade command.

[0113] After sending the upgrade failure information to the server, you can also actively request the server to resend the upgrade command so that you can perform the OTA upgrade again.

[0114] Preferably, the control board can detect whether the execution program is damaged each time it is started. If it is damaged and there is no program in the OTA program area, the control board can actively request the server to send an upgrade command.

[0115] Figure 8 A structural block diagram of another multi-control board remote upgrade device for an Internet of Things device applicable to an embodiment of the present invention is shown, and further includes:

[0116] The new version number obtaining unit 605 is used to obtain the new version number after the upgrade.

[0117] After the upgrade is completed and the system is restarted, the new version number acquisition unit 605 acquires and records the new version number after the upgrade. The new version number may be recorded in the program information area of ​​the control board.

[0118] The new version number sending unit 606 is used to send the new version number to the server.

[0119] The new version number sending unit 606 sends the upgraded new version number to the IOT board. After the IOT board uploads the new version number to the server, the server determines whether the upgrade is successful. If successful, the upgrade is completed. If failed, the upgrade command can be continued.

[0120] The present invention also proposes a computer device, comprising a processor, wherein the processor is used to execute the above-mentioned method for remotely upgrading multiple control panels of an Internet of Things device.

[0121] The computer device provided in the embodiment of the present invention also includes a memory. Exemplarily, the computer program can be divided into one or more modules, one or more modules are stored in the memory, and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the multi-control board remote upgrade device of the Internet of Things device.

[0122] Those skilled in the art will appreciate that the above-mentioned description of the remote upgrade device for multiple control boards of an IoT device is merely an example and does not constitute a limitation on the remote upgrade device for multiple control boards of an IoT device. The device may include more or fewer components than described above, or a combination of certain components, or different components, for example, input and output devices, network access devices, buses, etc.

[0123] The processor may be a central processing unit (CPU), or other general-purpose processors, microcontroller units (MCU), digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the multi-control board remote upgrade device for the Internet of Things device, and uses various interfaces and lines to connect various parts of the multi-control board remote upgrade device for the Internet of Things device.

[0124] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the above charger by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0125] If the module / unit integrated in the multi-control board remote upgrade device of the above-mentioned Internet of Things device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the unit functions in the above-mentioned embodiments, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the functions of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0126] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A remote upgrade method for multiple control panels of IoT devices. It is characterized in that The steps include: Get the upgrade command and upgrade information sent by the server; Download the upgrade firmware according to the upgrade command and the upgrade information, and determine whether the upgrade firmware is legal according to the firmware header and the upgrade information in the upgrade firmware; If yes, determine whether the upgrade firmware matches the control board according to the firmware header and the upgrade information; if yes, download the upgrade firmware and distribute the upgrade firmware to the OTA program area of ​​the control board, the control board includes a boot program area, an execution program area, an OTA program area and a program information area; Activate the boot program in the boot program area by restarting the device to copy the upgrade firmware in the OTA program area to the execution program area of ​​the control board; judge the current device mode according to the boot program in the boot program area, if the current device mode is normal mode, first check the execution partition firmware, if it passes, start the device normally, and then report the version number to the server, if the check fails, check the upgrade firmware in the OTA program area, if it passes, copy the upgrade firmware from the OTA program area to the execution program area; If the current device mode is the OTA upgrade mode, first check the upgrade firmware in the OTA program area, if it fails, enter the normal mode, if it passes, copy the upgrade firmware from the OTA program area to the execution program area; If the current device mode is a failure mode, send an upgrade failure message to the server, requesting to resend the upgrade command; Execute the upgraded firmware in the execution program area.

2. The method for remotely upgrading multiple control panels of an Internet of Things device according to claim 1, It is characterized in that The method further comprises: Obtaining the number of failures in copying the upgrade firmware from the OTA program area to the execution program area; When the number of failures exceeds a preset number, sending an upgrade failure message to the server; and / or Request the server to resend the upgrade command.

3. The method for remotely upgrading multiple control panels of an Internet of Things device according to claim 1, It is characterized in that After the step of executing the upgraded firmware of the execution program area, the following steps are further included: Get the new version number after upgrading; The new version number is sent to the server.

4. A remote upgrade device for multiple control panels of IoT devices, It is characterized in that include: An acquisition unit, used to acquire the upgrade command and upgrade information sent by the server; A download distribution unit, used for downloading the upgrade firmware according to the upgrade command and the upgrade information, and judging whether the upgrade firmware is legal according to the firmware header and the upgrade information in the upgrade firmware; If yes, determine whether the upgrade firmware matches the control board according to the firmware header and the upgrade information; if yes, download the upgrade firmware and distribute the upgrade firmware to the OTA program area of ​​the control board, the control board includes a boot program area, an execution program area, an OTA program area and a program information area; A copying unit is used to activate the boot program in the boot program area by restarting the device to copy the upgrade firmware in the OTA program area to the execution program area of ​​the control board; judge the current device mode according to the boot program in the boot program area, if the current device mode is normal mode, first check the execution partition firmware, if it passes, start the device normally, and then report the version number to the server, if the check fails, check the upgrade firmware in the OTA program area, if it passes, copy the upgrade firmware from the OTA program area to the execution program area; If the current device mode is the OTA upgrade mode, first check the upgrade firmware in the OTA program area, if it fails, enter the normal mode, if it passes, copy the upgrade firmware from the OTA program area to the execution program area; If the current device mode is a failure mode, sending an upgrade failure message to the server to request reissuance of an upgrade command; The execution unit is used to execute the upgraded firmware in the execution program area.

5. The multi-control board remote upgrade device for IoT devices according to claim 4, It is characterized in that The device also includes: A failure number acquisition unit, used to acquire the number of failures of copying the upgrade firmware from the OTA program area to the execution program area; a failure information sending unit, configured to send an upgrade failure message to a server when the number of failures exceeds a preset number; and / or The upgrade command sending unit is used to request the server to resend the upgrade command.

6. The multi-control board remote upgrade device for IoT devices according to claim 4, It is characterized in that The device also includes: A new version number obtaining unit, used to obtain the new version number after the upgrade; The new version number sending unit is used to send the new version number to the server.

7. A computer device, It is characterized in that The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method according to any one of claims 1 to 3.