Software upgrading method and device for Internet of Things equipment

By recording and running scripts on the IoT management platform, the problem of low efficiency in upgrading IoT devices is solved, and automated upgrades are achieved, efficiency is improved and the complexity and error rate of manual operations are reduced.

CN119201163APending Publication Date: 2024-12-27ZHEJIANG HUAXIAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411231402.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The software upgrade efficiency of IoT devices is inefficient, resulting in cumbersome testing and error-prone, and the existing technology lacks effective solutions.

Method used

By obtaining the configuration information of the target IoT device on the Internet of Things management platform, recording the operation process of the target account on the platform elements, generating scripts, and running the scripts according to the configuration information to automatically upgrade the software.

Benefits of technology

The automation software upgrade of IoT devices has been realized, the upgrade efficiency has been improved, the complexity and error rate of manual operations have been reduced, and time and labor costs have been saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201163A_ABST
    Figure CN119201163A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a software upgrading method and device for Internet of Things equipment. The method comprises the steps that target configuration information of target Internet of Things equipment is acquired on an Internet of Things management platform; in response to an operation that the target account performs software upgrading on the target Internet of Things equipment on the Internet of Things management platform, recording an operation process of the target account on each element in the Internet of Things management platform through a script to obtain a target script; and running the target script according to the target configuration information to perform software upgrading on the target Internet of Things equipment. According to the invention, the problem of low software upgrading efficiency of the Internet of Things equipment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a method and apparatus for software upgrading of an Internet of Things device. Background Art

[0002] With the development of technology, the application of IoT devices is becoming more and more popular. IoT devices can achieve interconnection between devices and between devices and cloud platforms through the network. Among them, remote upgrade can easily realize the software version update of IoT devices, which is an important function of IoT devices.

[0003] When testing IoT devices, it is necessary to test their remote upgrade performance. The most basic test item is the stress upgrade test. The upgrade times during the stress upgrade test are very frequent, and multiple repeated operations are required, which takes a long time and is inefficient. Ordinary manual testing will face the problems of cumbersome operations, boring processes and easy errors.

[0004] There is currently no effective solution to the above problems. Summary of the invention

[0005] The embodiments of the present invention provide a method and apparatus for software upgrading of an Internet of Things device, so as to at least solve the problem of low software upgrading efficiency of the Internet of Things device in the related art.

[0006] According to one embodiment of the present invention, a method for software upgrading of an Internet of Things device is provided, comprising: acquiring target configuration information of a target Internet of Things device on an Internet of Things management platform, wherein the Internet of Things management platform is used to perform software upgrading on multiple Internet of Things devices, the multiple Internet of Things devices include the target Internet of Things device, and the target configuration information includes relevant information for performing the software upgrading on the target Internet of Things device; in response to an operation of performing the software upgrading on the target Internet of Things device by a target account on the Internet of Things management platform, recording the operation process of the target account on each element in the Internet of Things management platform through a script to obtain a target script; and running the target script according to the target configuration information to perform the software upgrading on the target Internet of Things device.

[0007] In an exemplary embodiment, running the target script according to the target configuration information to perform the software upgrade on the target IoT device includes: reading the target upgrade number in the target configuration information; running the target script according to the target upgrade number to perform the software upgrade on the IoT device for the target upgrade number of times.

[0008] In an exemplary embodiment, the target script is run according to the target upgrade number to perform the software upgrade of the IoT device for the target upgrade number, including: performing the software upgrade of the IoT device for the i-th time in the following manner, wherein i is greater than or equal to 1 and less than or equal to the target upgrade number: upon determining that the IoT management platform enters an upgrade interface, reading a web page positioning unit in the target configuration information, wherein the web page positioning unit includes a web page positioning parameter; running the target script, and driving the web page positioning unit according to the operation process of the target script to perform the software upgrade of the IoT device for the i-th time.

[0009] In an exemplary embodiment, the target script is run, and the web page positioning unit is driven according to the operation process of the target script to perform the i-th software upgrade on the Internet of Things device, including: when the software upgrade of the Internet of Things device is performed for the i-1th time, and the i-1th software upgrade successfully upgrades the Internet of Things device from the first version to the second version, reading the first upgrade package of the first version from the target configuration information; running the target script, using the first upgrade package to drive the web page positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the second version to the first version; when the software upgrade of the Internet of Things device is performed for the i-1th time, and the i-1th software upgrade fails to upgrade the Internet of Things device from the first version to the second version, reading the second upgrade package of the second version from the target configuration information; running the target script, using the second upgrade package to drive the web page positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the first version to the second version.

[0010] In an exemplary embodiment, after running the target script and driving the web page positioning unit according to the operation process of the target script to perform the i-th software upgrade on the IoT device, the method further includes: obtaining the total duration of the i-th software upgrade on the target IoT device from the target script; reading a preset upgrade duration threshold in the target configuration information; and determining that the i-th software upgrade has failed if the total duration of the i-th software upgrade is greater than the preset upgrade duration threshold.

[0011] In an exemplary embodiment, the method further includes: when the number of times the software upgrade is performed on the target IoT device reaches the target upgrade number, stopping the software upgrade on the IoT device; obtaining a target log from the target script, wherein the target log records the number of times the software upgrade is successfully performed on the IoT device and the number of times the software upgrade fails on the IoT device.

[0012] In an exemplary embodiment, obtaining target configuration information of a target IoT device on an IoT management platform includes: obtaining a target identity of the target IoT device; determining the target configuration information from a plurality of configuration information stored on the IoT management platform according to the target identity, wherein each of the configuration information includes an identity of the IoT device corresponding to the target configuration information.

[0013] According to another embodiment of the present invention, there is provided a software upgrade apparatus for an Internet of Things device, comprising: an acquisition module, for acquiring target configuration information of a target Internet of Things device on an Internet of Things management platform, wherein the Internet of Things management platform is used to perform software upgrades on multiple Internet of Things devices, the multiple Internet of Things devices include the target Internet of Things device, and the target configuration information includes relevant information for performing the software upgrade on the target Internet of Things device; a response module, for responding to an operation of a target account performing the software upgrade on the target Internet of Things device on the Internet of Things management platform, by recording the operation process of the target account on each element in the Internet of Things management platform through a script to obtain a target script; and a running module, for running the target script according to the target configuration information to perform the software upgrade on the target Internet of Things device.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0015] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] According to yet another embodiment of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0017] Through the present invention, the Internet of Things management platform is used to perform software upgrades on the Internet of Things device, the target configuration information of the target Internet of Things device is obtained on the Internet of Things management platform, and in response to the target account performing software upgrades on the target Internet of Things device on the Internet of Things management platform, the target account's operation process on each element in the Internet of Things management platform is recorded through a script to obtain a target script; the target script is run according to the target configuration information to perform software upgrades on the target Internet of Things device. The purpose of automatically upgrading the software of the Internet of Things device is achieved. Therefore, the problem of low software upgrade efficiency of the Internet of Things device in the related art can be solved, and the effect of improving the software upgrade efficiency of the Internet of Things device can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for upgrading software of an Internet of Things device according to an embodiment of the present invention;

[0019] Figure 2 is a flowchart of a software upgrade method for an Internet of Things device according to an embodiment of the present invention;

[0020] Figure 3 is an overall flow chart according to an embodiment of the present invention;

[0021] Figure 4 4 is a structural block diagram of a software upgrade device for an Internet of Things device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0024] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for upgrading software of an Internet of Things device according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the software upgrade method of the Internet of Things device in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0027] In this embodiment, a method for upgrading the software of the Internet of Things device running on the above mobile terminal is provided. Figure 2 is a flowchart of a software upgrade method for an Internet of Things device according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0028] Step S202, obtaining target configuration information of a target IoT device on an IoT management platform, wherein the IoT management platform is used to perform software upgrades on a plurality of IoT devices, the plurality of IoT devices include the target IoT device, and the target configuration information includes relevant information for performing software upgrades on the target IoT device;

[0029] Among them, the above-mentioned Internet of Things management platform can perform software upgrades on multiple Internet of Things devices. When performing software upgrades on target Internet of Things devices, the target configuration information of the target Internet of Things devices is obtained. The target configuration information may be information entered by the user on the Internet of Things management platform, including but not limited to: the model of the Internet of Things device, the duration of the upgrade (corresponding to a preset upgrade duration threshold), the name of the upgrade package (used to find the upgrade package of the corresponding version, such as the first upgrade package of the first version, the second upgrade package of the second version, the first version may be a new version, and the second version may be the original version), and the number of upgrades (including the target upgrade number).

[0030] The IoT management platform can perform software upgrades on multiple IoT devices, and the IoT management platform can store target configuration information for multiple IoT devices. Through the identity of the IoT device, the target configuration information of the target IoT device can be found in the multiple target configuration information stored in the IoT management platform. Specifically, the target configuration information of the target IoT device can be obtained on the IoT management platform in the following ways:

[0031] Obtain a target identity of the target IoT device; determine the target configuration information from a plurality of configuration information stored in the IoT management platform according to the target identity, wherein each of the configuration information includes an identity of the IoT device corresponding to the target configuration information.

[0032] Step S204, in response to the target account performing an operation of upgrading the software of the target IoT device on the IoT management platform, the target account's operation process on each element in the IoT management platform is recorded by a script to obtain a target script;

[0033] The target account may be an account that the user logs in to on the IoT management platform. The user performs software upgrades on the IoT device on the IoT management platform according to the actual operation of the IoT device software upgrade. In the process of the user performing software upgrades on the IoT management platform by clicking and inputting, the user's operation process on each element on the IoT management platform is recorded through a script. The operation on each element includes but is not limited to inputting a string in the input box of the IoT management platform, clicking a button, etc. The above target script may be saved as a readable configuration file.

[0034] Step S206: Run the target script according to the target configuration information to perform software upgrade on the target IoT device.

[0035] Since the operation records of IoT platform upgrades are saved as readable configuration files, they can be directly imported when performing stress testing next time. This realizes the automatic recording process and network element configuration, which is universal on different IoT management network platforms. It improves the software upgrade efficiency of IoT devices.

[0036] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0037] Through the above steps, the Internet of Things management platform is used to perform software upgrades on the Internet of Things device, the target configuration information of the target Internet of Things device is obtained on the Internet of Things management platform, and in response to the target account performing software upgrades on the target Internet of Things device on the Internet of Things management platform, the target account's operation process on each element in the Internet of Things management platform is recorded through a script to obtain a target script; the target script is run according to the target configuration information to perform software upgrades on the target Internet of Things device. The purpose of automatically upgrading the software of the Internet of Things device is achieved. Therefore, the problem of low software upgrade efficiency of the Internet of Things device in the related technology can be solved, and the effect of improving the software upgrade efficiency of the Internet of Things device can be achieved.

[0038] As an optional implementation, running a target script according to the target configuration information to perform software upgrade on the target IoT device includes:

[0039] Read the target upgrade times in the target configuration information; run the target script according to the target upgrade times to perform software upgrades on the IoT device for the target upgrade times. When the number of software upgrades on the target IoT device reaches the target upgrade times, stop performing software upgrades on the IoT device; obtain a target log from the target script, wherein the target log records the number of successful software upgrades on the IoT device and the number of failed software upgrades on the IoT device.

[0040] For example, the software of an IoT device may be upgraded for the i-th time in the following manner, where i is greater than or equal to 1 and less than or equal to the target upgrade number:

[0041] When it is determined that the Internet of Things management platform enters the upgrade interface, a web page positioning unit is read in the target configuration information, wherein the web page positioning unit includes a web page positioning parameter;

[0042] Run the target script and drive the webpage positioning unit according to the operation process of the target script to perform the i-th software upgrade on the IoT device, including:

[0043] In the case where the software of the Internet of Things device is upgraded for the i-1th time, and the i-1th software upgrade successfully upgrades the Internet of Things device from the first version to the second version, reading a first upgrade package of the first version from the target configuration information; running the target script, and using the first upgrade package to drive the webpage positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the second version to the first version;

[0044] In the case where the software of the Internet of Things device has been upgraded for the i-1th time and the i-1th software upgrade fails to upgrade the Internet of Things device from the first version to the second version, a second upgrade package of the second version is read from the target configuration information; the target script is run, and the second upgrade package is used to drive the web page positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the first version to the second version.

[0045] After performing the i-th software upgrade on the IoT device, the method further includes: obtaining the total duration of the i-th software upgrade on the target IoT device from the target script; reading a preset upgrade duration threshold in the target configuration information; and determining that the i-th software upgrade has failed if the total duration of the i-th software upgrade is greater than the preset upgrade duration threshold.

[0046] like Figure 3 This is an overall flow chart according to an embodiment of the present invention. The method can implement scripts through Python language and automated testing framework, can simulate the function of users operating browsers through scripts, and implement automated testing of remote upgrade success rate, and mainly includes the following steps:

[0047] Step S301, the user inputs the target configuration information related to the remote upgrade into the script according to the IoT management platform corresponding to the IoT device, including but not limited to the identity of the IoT device (for example, the model of the IoT device), the duration of the software upgrade (corresponding to the preset upgrade duration threshold), the upgrade package name, the number of upgrades (corresponding to the target number of upgrades), etc., to create a software upgrade task for the IoT device on the IoT management platform.

[0048] The upgrade related parameter unit can configure the program version information, upgrade times (usually more than 100 times), and upgrade timeout; the result recording unit needs to configure the log document saving path.

[0049] Step S302, Python can be used to implement the script, and the specific operation process of the user performing the software upgrade operation on the target IoT device on the IoT platform and the elements that need to be operated in sequence on the platform (such as inputting a string into an input box, clicking a button, etc.) can be recorded through the script recording method. According to the recorded operation process and network elements, the pressure upgrade automation script (corresponding to the target script) is generated by dynamically generating codes in Python.

[0050] The software upgrade operation records of the user on the physical network device on the IoT platform are saved as readable configuration files, which can be directly imported when the next software upgrade stress test is performed. The above steps can realize the automated recording process and network element configuration, which can improve the universality of this method on different IoT platforms.

[0051] Step S303: After switching the browser to the remote upgrade interface of the IoT management platform, run the target script. The target script will take over the browser instead of the user operation. First, the script will issue a remote upgrade instruction to the corresponding target IoT device according to the target configuration information.

[0052] The pressure upgrade automation script is based on Selenium and WebDriver. According to the user operation process, it locates the network elements through the front-end method (including but not limited to xpath, class_name, etc.) and performs operations (including but not limited to inputting characters, refreshing, selecting, and clicking). Through the operation, it simulates the user's front-end operation and replaces manual repeated operations.

[0053] After issuing the remote upgrade instruction to the target IoT device, the target script polls the IoT management platform for the upgrade progress. When the upgrade is completed, the target script will request the upgrade results and logs from the IoT management platform. And initiate the next upgrade request based on the upgrade result. If the first version upgraded this time (for example, it can be a new version) and the result is "upgrade successful", the second version (for example, it can be an old version) will be upgraded next time. If the first version upgraded this time (for example, it can be a new version) and the result is "upgrade failed", the first version will continue to be upgraded next time. If the upgrade duration exceeds the preset time (corresponding to the preset upgrade duration threshold), the target script still finds that the upgrade is in an "unfinished" state, and the script records the upgrade as "upgrade failed".

[0054] The pressure upgrade automation script (target script) will record the number of upgrades and the upgrade results after completing one upgrade task. The upgrade related information is obtained through Selenium positioning, and the upgrade results, upgrade time, and failure reasons are obtained by parsing the HTML content of the web page through beautifulsoup.

[0055] Step S306, when the target upgrade times in the target configuration information are reached, the pressure upgrade automation script (target script) will count the upgrade results, the time taken for a single upgrade (including the total duration of the i-th software upgrade), and the reasons for failure, and organize them into an Excel document through the openpyxl component and save them in the local path, and notify the relevant personnel of the test results by email through the stmplib dependency library. After the script determines that the required upgrade times have been reached, the script outputs the number of failures, successes, and success rate of the remote upgrade, and organizes the logs of the failed upgrade into a report file for analyzing the reasons for the failure.

[0056] This test solution can save the complicated manual operations required for remote upgrade stress testing of IoT devices, greatly saving manpower and time costs. In addition, this automated testing method can comprehensively record the key information of each upgrade process, and in the scenario of stress testing, more accurate and easier to process data can be obtained, which is conducive to subsequent analysis.

[0057] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment 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 a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0058] In this embodiment, a software upgrade device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0059] Figure 4 is a structural block diagram of a software upgrade device for an Internet of Things device according to an embodiment of the present invention, such as Figure 4 As shown, the device comprises:

[0060] An acquisition module 402 is used to acquire target configuration information of a target IoT device on an IoT management platform, wherein the IoT management platform is used to perform software upgrades on multiple IoT devices, the multiple IoT devices include the target IoT device, and the target configuration information includes relevant information for performing the software upgrade on the target IoT device;

[0061] A response module 404 is used to respond to the target account performing the software upgrade operation on the target IoT device on the IoT management platform, and to obtain a target script by recording the operation process of the target account on each element in the IoT management platform through a script;

[0062] The running module 406 is used to run the target script according to the target configuration information to perform the software upgrade on the target IoT device.

[0063] In an exemplary embodiment, the above-mentioned device is also used to read the target upgrade number in the target configuration information; run the target script according to the target upgrade number to perform the software upgrade of the Internet of Things device for the target upgrade number.

[0064] In an exemplary embodiment, the above-mentioned device is also used to perform the i-th software upgrade on the Internet of Things device in the following manner, wherein i is greater than or equal to 1 and less than or equal to the target upgrade number: when it is determined that the Internet of Things management platform enters the upgrade interface, reading a web page positioning unit in the target configuration information, wherein the web page positioning unit includes a web page positioning parameter; running the target script, and driving the web page positioning unit according to the operation process of the target script to perform the i-th software upgrade on the Internet of Things device.

[0065] In an exemplary embodiment, the above-mentioned device is also used to, in the case where the software upgrade of the Internet of Things device is performed for the i-1th time and the i-1th software upgrade successfully upgrades the Internet of Things device from the first version to the second version, read the first upgrade package of the first version from the target configuration information; run the target script, and use the first upgrade package to drive the web page positioning unit according to the operation process of the target script to upgrade the Internet of Things device from the second version to the first version; in the case where the software upgrade of the Internet of Things device is performed for the i-1th time and the i-1th software upgrade fails to upgrade the Internet of Things device from the first version to the second version, read the second upgrade package of the second version from the target configuration information; run the target script, and use the second upgrade package to drive the web page positioning unit according to the operation process of the target script to upgrade the Internet of Things device from the first version to the second version.

[0066] In an exemplary embodiment, the above-mentioned device is also used to obtain the total duration of the i-th software upgrade of the target IoT device from the target script; read the preset upgrade duration threshold in the target configuration information; and determine that the i-th software upgrade has failed when the total duration of the i-th software upgrade is greater than the preset upgrade duration threshold.

[0067] In an exemplary embodiment, the above-mentioned device is also used to stop performing the software upgrade on the IoT device when the number of times the software upgrade is performed on the target IoT device reaches the target upgrade number; and obtain a target log from the target script, wherein the target log records the number of successful software upgrades on the IoT device and the number of failed software upgrades on the IoT device.

[0068] In an exemplary embodiment, the above-mentioned device is also used to obtain the target identity of the target Internet of Things device; determine the target configuration information from multiple configuration information stored in the Internet of Things management platform according to the target identity, wherein each of the configuration information includes the identity of the Internet of Things device corresponding to the target configuration information.

[0069] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0070] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0071] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0072] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0073] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0074] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0075] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0076] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0077] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A software upgrade method for an Internet of Things device, characterized in that: include: Acquire target configuration information of a target IoT device on an IoT management platform, wherein the IoT management platform is used to perform software upgrades on multiple IoT devices, the multiple IoT devices include the target IoT device, and the target configuration information includes relevant information for performing the software upgrade on the target IoT device; In response to the target account performing the software upgrade operation on the target IoT device on the IoT management platform, recording the operation process of the target account on each element in the IoT management platform through a script to obtain a target script; The target script is run according to the target configuration information to perform the software upgrade on the target IoT device.

2. The method according to claim 1, characterized in that Running the target script according to the target configuration information to perform the software upgrade on the target IoT device includes: Read the target upgrade times in the target configuration information; The target script is run according to the target upgrade number to perform the software upgrade for the IoT device for the target upgrade number of times.

3. The method according to claim 2, characterized in that Running the target script according to the target upgrade times to perform the software upgrade for the IoT device for the target upgrade times includes: The software of the IoT device is upgraded for the i-th time in the following manner, wherein i is greater than or equal to 1 and less than or equal to the target upgrade number: When it is determined that the Internet of Things management platform enters the upgrade interface, a web page positioning unit is read in the target configuration information, wherein the web page positioning unit includes a web page positioning parameter; Run the target script and drive the web page positioning unit according to the operation process of the target script to perform the i-th software upgrade on the Internet of Things device.

4. The method according to claim 3, characterized in that Running the target script and driving the webpage positioning unit according to the operation process of the target script to perform the i-th software upgrade on the IoT device includes: In the case where the software of the Internet of Things device is upgraded for the i-1th time, and the i-1th software upgrade successfully upgrades the Internet of Things device from the first version to the second version, reading a first upgrade package of the first version from the target configuration information; running the target script, and using the first upgrade package to drive the webpage positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the second version to the first version; In the case where the software of the Internet of Things device has been upgraded for the i-1th time and the i-1th software upgrade fails to upgrade the Internet of Things device from the first version to the second version, a second upgrade package of the second version is read from the target configuration information; the target script is run, and the second upgrade package is used to drive the web page positioning unit according to the operation process of the target script, so that the Internet of Things device is upgraded from the first version to the second version.

5. The method according to claim 3 or 4, characterized in that: After running the target script and driving the webpage positioning unit according to the operation process of the target script to perform the i-th software upgrade on the IoT device, the method further includes: Obtaining the total duration of performing the i-th software upgrade on the target IoT device from the target script; Reading the preset upgrade duration threshold in the target configuration information; When the total duration of the i-th software upgrade is greater than the preset upgrade duration threshold, it is determined that the i-th software upgrade has failed.

6. The method according to claim 2, characterized in that The method further comprises: When the number of times the software upgrade is performed on the target IoT device reaches the target upgrade number, stopping the software upgrade on the IoT device; A target log is obtained from the target script, wherein the target log records the number of times the software upgrade of the IoT device is successfully performed and the number of times the software upgrade of the IoT device is failed.

7. The method according to claim 1, characterized in that Obtain the target configuration information of the target IoT device on the IoT management platform, including: Obtaining a target identity of the target IoT device; The target configuration information is determined from a plurality of configuration information stored in the Internet of Things management platform according to the target identity, wherein each of the configuration information includes an identity of an Internet of Things device corresponding to the target configuration information.

8. A software upgrade device for an Internet of Things device, characterized in that: include: An acquisition module, configured to acquire target configuration information of a target IoT device on an IoT management platform, wherein the IoT management platform is configured to perform software upgrades on a plurality of IoT devices, the plurality of IoT devices including the target IoT device, and the target configuration information includes relevant information for performing the software upgrade on the target IoT device; A response module, configured to respond to the target account performing the software upgrade operation on the target IoT device on the IoT management platform, and to obtain a target script by recording the operation process of the target account on each element in the IoT management platform through a script; A running module is used to run the target script according to the target configuration information to perform the software upgrade on the target Internet of Things device.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.