A software method for batch remote upgrade based on MQTT

Obtaining the unique label of the gateway device through the MQTT protocol and issuing upgrade instructions solves the problem that the existing technology cannot upgrade specific gateway devices, and realizes personalized gateway device management and software upgrades.

CN115766440BActive Publication Date: 2024-12-24GUANGZHOU CANLEAD ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211310647.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-25
Publication Date
2024-12-24
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

The existing technology cannot perform software upgrades for specific gateway devices, resulting in the inability to implement personalized management.

Method used

Through the MQTT protocol, the unique device number of each gateway device is obtained, and upgrade instructions and software packages are issued to the MQTT server according to the target device number specified by the user to realize software upgrades to specific gateway devices.

Benefits of technology

It realizes software upgrades to specific gateway devices, supports personalized management and batch management of gateway devices, avoiding the limitation of simultaneous upgrades of all devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766440B_ABST
    Figure CN115766440B_ABST
Patent Text Reader

Abstract

The present invention discloses a software method for batch remote upgrade based on MQTT, the method comprising: obtaining device labels of multiple gateway devices, each of the device labels is different and the topic subscribed by each gateway device is the MQTT topic corresponding to its own device label; receiving an upgrade instruction, the upgrade instruction includes one or more target device labels specified by a user from the device labels, and the gateway device corresponding to the target device label is used as the target gateway device; publishing the upgrade instruction to an MQTT server, so that the MQTT server sends the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device. Since the MQTT topic subscribed by the gateway device of the present invention is the topic corresponding to its own device label, different upgrade instructions can be published to different MQTT topics based on each device label, so as to realize batch management of gateway devices, and the present invention can be applied to the field of software remote upgrade.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to remote management technology, in particular to a software method based on MQTT batch remote upgrade. Background Art

[0002] With the development of the Internet of Things industry, various gateway devices are increasingly used in different application scenarios. With the changes in hardware technology and application environment requirements, continuous software upgrades are essential. At present, the software upgrade solutions for a large number of gateway devices include: reserving corresponding software interfaces for gateway devices, and then building a remote upgrade server, putting the continuously upgraded program packages on the server, and the gateway device will continuously query whether there are new program packages on the server, and automatically download and update if there are.

[0003] In the software upgrade scheme of the prior art, either all gateway devices are not upgraded, or all gateway devices are upgraded. It is impossible to perform software upgrade on specific gateway devices, resulting in the inability to manage specific gateway devices in a targeted manner. Therefore, a scheme that can perform software upgrade on specific gateway devices is needed. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a software method for batch remote upgrade based on MQTT, which can perform software upgrade on a specific gateway device.

[0005] An aspect of an embodiment of the present invention provides a software method for batch remote upgrade based on MQTT, which is applied to a management terminal and includes:

[0006] Obtain device numbers of multiple gateway devices, each of which is different and each gateway device subscribes to a MQTT topic corresponding to its own device number;

[0007] receiving an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device;

[0008] The upgrade instruction is published to an MQTT server, so that the MQTT server sends the upgrade instruction and a target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device.

[0009] Optionally, it also includes:

[0010] A progress bar from receiving the upgrade instruction to completing the software upgrade of the target gateway device is displayed on the display interface of the management terminal.

[0011] Optionally, it also includes:

[0012] After the target gateway device starts software upgrade, a predicted countdown for completing the software upgrade is displayed on the display interface of the management terminal;

[0013] If the software upgrade of all the target gateway devices is completed within the predicted countdown, a reminder mark indicating successful operation is displayed on the display interface of the management terminal, and the display of the predicted countdown is closed;

[0014] If there is a target gateway device that has not completed the software upgrade within the set time period, after the predicted countdown ends, a reminder mark indicating that the operation was unsuccessful is displayed on the display interface of the management terminal, and a progress bar is marked for the target gateway device that has not completed the software upgrade.

[0015] Optionally, it also includes:

[0016] Receive batch operation instructions;

[0017] The batch operation instruction is published to the MQTT server so that the MQTT server can complete at least one of obtaining the operating information of the target gateway device, restarting the system of the target gateway device, or restarting the software program of the target gateway device through the MQTT topic subscribed by the target gateway device.

[0018] Another aspect of the embodiment of the present invention further provides a software method for batch remote upgrade based on MQTT, which is applied to the target gateway device in the above-mentioned software method for batch remote upgrade based on MQTT, including:

[0019] Receive the upgrade instruction and target package sent by the MQTT server;

[0020] If the upgrade instruction contains a target device number that is consistent with the device number of the own device, verifying the target program package;

[0021] If the target program package meets the verification requirement, the program package to be upgraded in the local computer is replaced with the target program package that meets the verification requirement.

[0022] Optionally, before replacing the local program package to be upgraded with the target program package that meets the verification requirement, the method further includes:

[0023] Back up the local program package to be upgraded.

[0024] Another aspect of the embodiment of the present invention further provides a software device for batch remote upgrade based on MQTT, which is applied to the management terminal in the software method for batch remote upgrade based on MQTT, including:

[0025] A label acquisition unit, used to acquire device labels of multiple gateway devices, each of which is different and each gateway device subscribes to a MQTT topic corresponding to its own device label;

[0026] An instruction receiving unit, configured to receive an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device;

[0027] The instruction publishing unit is used to publish the upgrade instruction to the MQTT server, so that the MQTT server sends the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device.

[0028] Another aspect of the embodiment of the present invention further provides a software device for batch remote upgrade based on MQTT, which is applied to the target gateway device in the software method for batch remote upgrade based on MQTT, including:

[0029] A data receiving unit, used for receiving an upgrade instruction and a target program package sent by an MQTT server;

[0030] A program package verification unit, configured to verify the target program package if a target device label that is consistent with the device label of the own program package exists in the upgrade instruction;

[0031] The program package replacement unit is used to replace the program package to be upgraded locally with the target program package that meets the verification requirement if the target program package meets the verification requirement.

[0032] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;

[0033] The memory is used to store programs;

[0034] The processor executes the program to implement the above method.

[0035] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0036] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0037] The present invention first obtains the device labels of multiple gateway devices, and the device labels of each gateway device are different and unique, and then each gateway device can subscribe to the MQTT topic corresponding to its own device label; the user can select one or more target device labels from the multiple device labels, and determine the upgrade instruction according to the selected target device label, and the management terminal can receive the upgrade instruction and publish the upgrade instruction to the MQTT server, so that the MQTT server can send the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device. Since the MQTT topic subscribed by the gateway device of the present invention is the topic corresponding to its own device label, compared with the prior art that all gateway devices subscribe to the same topic, the present invention can publish different upgrade instructions to different MQTT topics based on each device label, or perform software upgrades on some gateway devices through some MQTT topics in a targeted manner, so as to achieve batch management of gateway devices or management of a certain gateway device individually, instead of all gateway devices being managed together. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 A flowchart of a software method for batch remote upgrade based on MQTT provided in an embodiment of the present invention;

[0040] Figure 2 A flowchart of another software method for batch remote upgrade based on MQTT provided in an embodiment of the present invention;

[0041] Figure 3 A structural block diagram of a software device for batch remote upgrade based on MQTT provided in an embodiment of the present invention;

[0042] Figure 4 A structural block diagram of another software device for batch remote upgrade based on MQTT provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] 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.

[0044] Reference Figure 1The embodiment of the present invention provides a software method for batch remote upgrade based on MQTT, which is applied to a management terminal and specifically includes the following steps:

[0045] Step S100: Acquire device numbers of multiple gateway devices, each of the device numbers is different and the topic subscribed by each gateway device is the MQTT topic corresponding to its own device number.

[0046] Specifically, each gateway device may have its own device number, which may be preset when the gateway device leaves the factory. Moreover, the device number of each gateway device may be different and unique.

[0047] In addition, the MQTT topic subscribed by each gateway device is the MQTT topic corresponding to its own device number, that is, the MQTT topic subscribed by each gateway device is different. Based on this, different instructions can be issued to different MQTT topics. Different gateway devices can receive different instructions and perform corresponding operations, and multiple gateway devices can be managed separately without the need for all gateway devices to be managed together.

[0048] It should be noted that the device number can be input from the input module of the management terminal or read from a pre-stored device number list. Therefore, the process of obtaining the device number may include: obtaining the device number input by the user through the input module, or obtaining the device number stored in an Excel table, or obtaining the device number stored in a database, etc.

[0049] Step S110: receiving an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device.

[0050] Specifically, the user can customize a personalized upgrade plan, select one or more device numbers from the multiple device numbers that have been obtained as target device numbers, and then the management terminal can receive an upgrade instruction determined by the user, which can include the target device number selected by the user.

[0051] Step S120: publishing the upgrade instruction to the MQTT server, so that the MQTT server sends the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device.

[0052] Specifically, after receiving the upgrade instruction, the MQTT server may send the upgrade instruction and the target program package to each target gateway device specified in the upgrade instruction through the MQTT topic subscribed by each target gateway device.

[0053] Different from the existing remote software upgrade solution, the present invention can perform software upgrade on a specific number of gateway devices, thereby realizing personalized upgrade solutions and targeted management.

[0054] In order to let the user know the upgrade status, the present invention can also display a progress bar from receiving the upgrade instruction to completing the software upgrade of the target gateway device on the display interface of the management terminal. The progress bar can be divided into multiple sub-progress bars according to each node, and each time a node is completed, the sub-progress bar corresponding to the node can display completion.

[0055] The above nodes may include: receiving upgrade instructions, the MQTT server sending upgrade instructions and target program packages, and the target gateway device has completed software upgrades.

[0056] The present invention can also add a process of displaying a predicted countdown in the case of displaying a progress bar, which can specifically include:

[0057] S1. After the target gateway device starts software upgrade, a predicted countdown for completing the software upgrade is displayed on the display interface of the management terminal.

[0058] Specifically, the prediction countdown can be freely set by the user. In an optional implementation, the prediction countdown can be determined based on previous upgrade situations.

[0059] S2. If the software upgrade of all the target gateway devices is completed within the predicted countdown, a reminder mark indicating successful operation is displayed on the display interface of the management terminal, and the display of the predicted countdown is closed.

[0060] S3. If there is a target gateway device that has not completed the software upgrade within the set time period, after the predicted countdown ends, a reminder mark indicating that the operation was unsuccessful is displayed on the display interface of the management terminal, and a progress bar is marked for the target gateway device that has not completed the software upgrade.

[0061] Specifically, if some target gateway devices are not online or fail to perform software upgrades, when the predicted countdown ends, a reminder mark indicating that the operation is not completed can be displayed on the display interface of the management terminal, thereby marking the target gateway devices that have not completed the software upgrade and their progress bars. In addition, the location of the target gateway devices that have not completed the software upgrade can also be marked to facilitate repair of the failed target gateway devices.

[0062] In some embodiments of the present invention, the above-mentioned personalized batch software upgrade is implemented by subscribing to the MQTT topic corresponding to the respective device number. The present invention can also implement personalized batch operations by subscribing to the MQTT topic corresponding to the respective device number. Specifically, the following steps can be included:

[0063] S1. Receive batch operation instructions.

[0064] S2. Publish the batch operation instruction to the MQTT server, so that the MQTT server can complete at least one of obtaining the operating information of the target gateway device, restarting the system of the target gateway device, or restarting the software program of the target gateway device through the MQTT topic subscribed by the target gateway device.

[0065] Specifically, through batch operation instructions, the present invention can also view the operation information of a specific gateway device, restart the system or software program, etc. The specific implementation process can refer to the above-mentioned software batch upgrade process, which will not be repeated here.

[0066] Reference Figure 2 The embodiment of the present invention provides another software method based on MQTT batch remote upgrade, which is applied to a target gateway device and specifically includes the following steps:

[0067] Step S200: receiving an upgrade instruction and a target program package sent by the MQTT server.

[0068] Specifically, the upgrade instruction and the target program package sent by the MQTT server through the MQTT topic subscribed by the MQTT server can be received. The received target program package can be encrypted. After receiving the encrypted target program package, it can be parsed to obtain the parsed target program package.

[0069] Step S210: If the upgrade instruction contains a target device number that is consistent with the device number of the own device, the target program package is verified.

[0070] Specifically, the device number included in the upgrade instruction may be checked. If the device number included in the upgrade instruction is consistent with the device number of the device itself, the resolved target program package may be checked in the chassis.

[0071] Step S220: If the target program package meets the verification requirement, the program package to be upgraded in the local computer is replaced with the target program package that meets the verification requirement.

[0072] Specifically, the local program package to be upgraded may be backed up first, and then the local program package to be upgraded may be replaced with the target program package that meets the verification requirement.

[0073] Furthermore, the upgraded software can be restarted after the target program package is replaced. If the operation fails, the backup program can be run. If the operation succeeds, the upgrade can be considered complete.

[0074] Next, the process of batch remote software upgrade of the present invention will be described with specific examples.

[0075] 1> Assume that there are 30 gateway devices that need software upgrades. Each gateway device is defined with a globally unique device number. The device number can be entered into the device management memory of the management terminal by the manufacturer before leaving the factory for subsequent upgrades and management operations.

[0076] 2> Each gateway device can subscribe to the unique MQTT topic of the gateway device.

[0077] 3>Open the management terminal and connect to the server. At this time, the management terminal has subscribed to the feedback information topics of all gateway devices.

[0078] 4> Select the target gateway device menu to be upgraded through the management terminal, and then click the upgrade program button.

[0079] 5> After clicking the Upgrade button, the management terminal reads the upgrade package information for verification and displays the detailed information of the upgrade package on the management interface.

[0080] 6> After verification, the MQTT topics of 30 gateway devices are automatically published in a loop. Each MQTT topic corresponds to a unique device number. After that, the management interface will display 30 gateway device progress bars.

[0081] 7> The progress bar displays the progress of a series of upgrade steps, such as acceptance of upgrade instructions, inspection, and upgrade, according to the feedback information of each gateway device. That is, each operation performed by the gateway device will be fed back to the management terminal, and the feedback information will be displayed to the administrator in a graphical form.

[0082] 8> Start the upgrade. There can be a predicted countdown to determine whether the upgrade has timed out. When the predicted countdown is over, normal gateway devices will be upgraded successfully. If the gateway device cannot be upgraded successfully because it is not online, you do not need to wait any longer. The management terminal can prompt the gateway device that failed to upgrade.

[0083] 9> If there is a gateway device that fails to upgrade, the administrator can view the device information and device number of the gateway device through the display interface of the management terminal, and then repair the gateway device.

[0084] 10> After the faulty gateway device is repaired successfully, the display interface of the management terminal can perform selective upgrade management on all gateway devices. Select the gateway device that has not been successfully upgraded before and upgrade it.

[0085] Reference Figure 3 The embodiment of the present invention provides a software device for batch remote upgrade based on MQTT, which is applied to a management terminal and includes:

[0086] A label acquisition unit, used to acquire device labels of multiple gateway devices, each of which is different and each gateway device subscribes to a MQTT topic corresponding to its own device label;

[0087] An instruction receiving unit, configured to receive an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device;

[0088] The instruction publishing unit is used to publish the upgrade instruction to the MQTT server, so that the MQTT server sends the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device.

[0089] Reference Figure 4 The embodiment of the present invention provides a software device for batch remote upgrade based on MQTT, which is applied to a target gateway device, including:

[0090] A data receiving unit, used for receiving an upgrade instruction and a target program package sent by an MQTT server;

[0091] A program package verification unit, configured to verify the target program package if a target device label that is consistent with the device label of the own program package exists in the upgrade instruction;

[0092] The program package replacement unit is used to replace the program package to be upgraded locally with the target program package that meets the verification requirement if the target program package meets the verification requirement.

[0093] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 and / or Figure 2 The method shown.

[0094] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0095] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0096] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0097] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0098] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0099] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0100] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0101] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0102] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A software method for batch remote upgrade based on MQTT, characterized in that: Applicable to management terminals, including: Obtain device numbers of multiple gateway devices, each of which is different and each gateway device subscribes to a MQTT topic corresponding to its own device number; receiving an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device; Publishing the upgrade instruction to an MQTT server, so that the MQTT server sends the upgrade instruction and a target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device; A progress bar from receiving the upgrade instruction to completing the software upgrade of the target gateway device is displayed on the display interface of the management terminal; wherein the progress bar is divided into multiple sub-progress bars according to each node, and each time a node is completed, the sub-progress bar corresponding to the node is displayed as completed; each node includes: receiving the upgrade instruction, the MQTT server sending the upgrade instruction and the target program package, and the target gateway device has completed the software upgrade; Receive batch operation instructions; Publishing the batch operation instruction to the MQTT server, so that the MQTT server can complete at least one of obtaining the operation information of the target gateway device, restarting the system of the target gateway device, or restarting the software program of the target gateway device through the MQTT topic subscribed by the target gateway device; The method further comprises: After the target gateway device starts software upgrade, a predicted countdown for completing the software upgrade is displayed on the display interface of the management terminal; If the software upgrade of all the target gateway devices is completed within the predicted countdown, a reminder mark indicating successful operation is displayed on the display interface of the management terminal, and the display of the predicted countdown is closed; If there is a target gateway device that has not completed the software upgrade within the set time period, then after the predicted countdown ends, a reminder icon indicating that the operation was unsuccessful will be displayed on the display interface of the management terminal, and a progress bar will be marked for the target gateway device that has not completed the software upgrade; the location of the target gateway device that has not completed the software upgrade will be marked so that the faulty target gateway device can be repaired.

2. A software method for batch remote upgrade based on MQTT, characterized in that: The target gateway device used in the software method for batch remote upgrade based on MQTT according to claim 1 comprises: Receive the upgrade instruction and target package sent by the MQTT server; If the upgrade instruction contains a target device number that is consistent with the device number of the own device, verifying the target program package; If the target program package meets the verification requirement, the program package to be upgraded in the local computer is replaced with the target program package that meets the verification requirement.

3. The software method based on MQTT batch remote upgrade according to claim 2, characterized in that: Before replacing the local program package to be upgraded with the target program package that meets the verification requirement, the method further includes: Back up the local program package to be upgraded.

4. A software device for batch remote upgrade based on MQTT, characterized in that: The management terminal used in the software method for batch remote upgrade based on MQTT according to claim 1 comprises: A label acquisition unit, used to acquire device labels of multiple gateway devices, each of which is different and each gateway device subscribes to a MQTT topic corresponding to its own device label; An instruction receiving unit, configured to receive an upgrade instruction, wherein the upgrade instruction includes one or more target device numbers specified by a user from the device numbers, and the gateway device corresponding to the target device number is used as the target gateway device; An instruction publishing unit, used for publishing the upgrade instruction to the MQTT server, so that the MQTT server sends the upgrade instruction and the target program package for software upgrade to the target gateway device through the MQTT topic subscribed by the target gateway device; The device also includes a unit for displaying a progress bar from receiving the upgrade instruction to completing the software upgrade of the target gateway device on the display interface of the management terminal; wherein the progress bar is divided into multiple sub-progress bars according to each node, and each time a node is completed, the sub-progress bar corresponding to the node displays completion; each node includes: receiving the upgrade instruction, the MQTT server sending the upgrade instruction and the target program package, and the target gateway device has completed the software upgrade; The apparatus further comprises a unit for receiving a batch operation instruction; The apparatus further comprises a unit for publishing the batch operation instruction to the MQTT server, wherein the batch operation instruction is for the MQTT server to complete at least one of obtaining the operation information of the target gateway device, restarting the system of the target gateway device, or restarting the software program of the target gateway device through the MQTT topic subscribed by the target gateway device; The device is also used for: After the target gateway device starts software upgrade, a predicted countdown for completing the software upgrade is displayed on the display interface of the management terminal; If the software upgrade of all the target gateway devices is completed within the predicted countdown, a reminder mark indicating successful operation is displayed on the display interface of the management terminal, and the display of the predicted countdown is closed; If there is a target gateway device that has not completed the software upgrade within the set time period, then after the predicted countdown ends, a reminder icon indicating that the operation was unsuccessful will be displayed on the display interface of the management terminal, and a progress bar will be marked for the target gateway device that has not completed the software upgrade; the location of the target gateway device that has not completed the software upgrade will be marked so that the faulty target gateway device can be repaired.

5. A software device for batch remote upgrade based on MQTT, characterized in that: The target gateway device used in the software method for batch remote upgrade based on MQTT according to claim 1 comprises: A data receiving unit, used for receiving an upgrade instruction and a target program package sent by an MQTT server; A program package verification unit, configured to verify the target program package if a target device label that is consistent with the device label of the own program package exists in the upgrade instruction; The program package replacement unit is used to replace the program package to be upgraded locally with the target program package that meets the verification requirement if the target program package meets the verification requirement.

6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to claim 1 or any one of claims 2 to 3.

7. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to claim 1 or any one of claims 2 to 3.