Methods and apparatus for upgrading software of Internet of Things (IoT) devices, storage media and electronic devices

By installing and activating upgrades sequentially according to their priority in IoT devices, the problem of failures caused by multiple software upgrades interfering with each other was resolved, ensuring the normal operation of the devices.

CN115981684BActive Publication Date: 2026-11-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111205838.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2026-11-17
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

During the software upgrade process of IoT devices, the upgrade process is interrupted by multiple independent software decisions, resulting in software upgrade failure and consequently, device service unavailability.

Method used

By receiving software upgrade tasks, the system installs upgrade software packages sequentially according to the upgrade priority of each IoT device's software, and performs the upgrade activation operation after the installation is completed, ensuring that each software is successfully upgraded in priority order.

Benefits of technology

The sequential upgrade of software for multiple IoT devices was achieved, avoiding upgrade failures and ensuring the normal operation of device services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115981684B_ABST
    Figure CN115981684B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, storage medium, and electronic device for upgrading software in Internet of Things (IoT) devices. The method includes: receiving a software upgrade task, wherein the software upgrade task instructs at least two IoT device software programs to be upgraded, the IoT device software being control software running in the IoT device; sequentially installing upgrade software data packages for each IoT device software program according to its respective upgrade priority, obtaining an installation result, wherein the installation result indicates whether the software version of the IoT device software has been replaced with the upgraded version; and performing an upgrade activation operation on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation. This invention solves the technical problem of software upgrade failure caused by mutual interference in software upgrades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of the Internet of Things (IoT), and more specifically, to a method and apparatus for upgrading IoT device software, a storage medium, and an electronic device. Background Technology

[0002] Currently, when upgrading the software of IoT devices, multiple software programs are often updated simultaneously. However, since software upgrades are decided independently without considering whether they will affect other software upgrades, multiple simultaneous upgrades may disrupt each other's upgrade processes, leading to upgrade failures and making the IoT devices unavailable.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a method and apparatus for upgrading the software of Internet of Things (IoT) devices, a storage medium, and an electronic device, to at least solve the technical problem of software upgrade failure caused by mutual interference in software upgrades.

[0005] According to one aspect of the present invention, a method for upgrading software in an Internet of Things (IoT) device is provided, comprising: receiving a software upgrade task, wherein the software upgrade task is used to instruct the upgrading of software in at least two IoT devices, the IoT device software being control software running in the IoT device; sequentially installing upgrade software data packages of the IoT device software according to the upgrade priority corresponding to each of the IoT device software, and obtaining an installation result, wherein the upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version; performing an upgrade activation operation on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation.

[0006] According to another aspect of the present invention, an Internet of Things (IoT) device software upgrade apparatus is also provided, comprising: a receiving unit, configured to receive a software upgrade task, wherein the software upgrade task is configured to instruct the upgrading of at least two IoT device software, wherein the IoT device software is control software running in the IoT device; an installation unit, configured to sequentially install the upgrade software data package of the IoT device software according to the upgrade priority corresponding to each of the IoT device software, thereby obtaining an installation result, wherein the upgrade priority is configured to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is configured to indicate whether the software version of the IoT device software has been replaced with the upgraded version; and an execution unit, configured to perform an upgrade activation operation on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation.

[0007] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described Internet of Things device software upgrade method at runtime.

[0008] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described IoT device software upgrade method.

[0009] According to another aspect of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described Internet of Things device software upgrade method through the computer program.

[0010] In this embodiment of the invention, a method is adopted to receive software upgrade tasks corresponding to at least two IoT device software, install upgrade software data packages sequentially according to the upgrade priority of each IoT device software, and perform an upgrade activation operation on the IoT device software whose upgrade is completed according to the installation result. By sequentially installing upgrade software data packages according to the upgrade priority determined by the upgrade cost of at least two IoT device software, and performing an upgrade activation operation on the IoT device software whose upgrade is completed after obtaining the installation result, the upgrade is activated by performing an upgrade activation operation on the IoT device software whose upgrade is completed. This achieves the goal of sequentially installing upgrade data packages according to the priority determined by the upgrade cost, and activating the upgrade of at least two IoT device software through a single upgrade activation operation after installation. This achieves the technical effect of sequentially upgrading multiple IoT device software in a single software upgrade task and activating the upgrade of multiple IoT device software through a single upgrade activation operation, avoiding the upgrade failure phenomenon caused by multiple software upgrades, and thus solving the technical problem of software upgrade failure caused by mutual interference of software upgrades. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0012] Figure 1 This is a schematic diagram of an application environment for an optional IoT device software upgrade method according to an embodiment of the present invention;

[0013] Figure 2 This is a flowchart illustrating an optional IoT device software upgrade method according to an embodiment of the present invention.

[0014] Figure 3 This is a flowchart illustrating an optional IoT device software upgrade method according to an embodiment of the present invention.

[0015] Figure 4 This is a flowchart illustrating an optional IoT device software upgrade method according to an embodiment of the present invention.

[0016] Figure 5 This is an interactive timing diagram of an optional IoT device software upgrade method according to an embodiment of the present invention;

[0017] Figure 6 This is a timing diagram illustrating an optional IoT device software upgrade method according to an embodiment of the present invention;

[0018] Figure 7This is a schematic diagram of an optional IoT device software upgrade apparatus according to an embodiment of the present invention;

[0019] Figure 8 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present invention;

[0020] Figure 9 This is a schematic diagram of the structure of an optional computer system according to an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] According to one aspect of the present invention, a method for upgrading the software of an Internet of Things (IoT) device is provided. Optionally, the above-described IoT device software upgrade method may be applied to, but is not limited to, applications such as... Figure 1 In the environment shown, IoT device 102 interacts with server 112 via network 110. IoT device 102 sends software information corresponding to its installed software to server 112 via network 110. After processing the software information and determining that the software needs to be upgraded, server 112 sends a software upgrade data packet to IoT device 112 via network 110, so that IoT device 102 can use the software upgrade data packet to upgrade the software in IoT device 102.

[0024] The software upgrade of IoT device 102 is not limited to executing S102 to S106 sequentially. The process includes: receiving a software upgrade task; the software upgrade task instructing at least two IoT device software programs to be upgraded (the IoT device software being the control software running within the IoT device); sequentially installing upgrade software data packages; installing upgrade software data packages for each IoT device software according to its respective upgrade priority; and obtaining installation results. The installation results indicate whether the software version of the IoT device software has been replaced with the upgraded version. Finally, performing an upgrade activation operation. An upgrade activation operation is performed on the IoT device software whose upgrade was indicated by the installation results, applying the upgraded version to the IoT device software after the upgrade activation operation.

[0025] Optionally, in this embodiment, the aforementioned IoT device can be a terminal device with multiple control software installed, including but not limited to at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart home devices, etc. The aforementioned network can include, but is not limited to: wired networks and wireless networks. The wired network includes: local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes: Bluetooth, Wi-Fi, and other networks that enable wireless communication. The aforementioned server can be a single server, a server cluster consisting of multiple servers, or a cloud server. The above is merely an example, and no limitations are imposed in this embodiment.

[0026] As an optional implementation method, such as Figure 2 As shown, the above-mentioned IoT device software upgrade method includes:

[0027] S202, receives software upgrade task.

[0028] In step S202 above, the software upgrade task is used to instruct the software of at least two IoT devices to be upgraded, where the IoT device software is the control software running in the IoT devices.

[0029] Optionally, the software upgrade task is not limited to a software upgrade task triggered when the software version installed on the IoT device is lower than the software version stored in the server corresponding to the IoT device. To facilitate software upgrades for IoT devices, the software upgrade task is not limited to being triggered periodically at preset times, automatically triggered when the number of software programs to be upgraded in the software upgrade task exceeds a preset threshold, or triggered by a software upgrade command.

[0030] Optionally, if the automatically triggered software upgrade task includes only one upgrade task for the software to be upgraded, it is not limited to performing an upgrade operation on one software to be upgraded or delaying the upgrade task of one software to be upgraded to the next software upgrade task, so that the software upgrade task includes upgrade tasks for two or more software to be upgraded.

[0031] Optionally, the control software running in the IoT device includes application software and native software. Application software is not limited to software installed in the IoT device as an application installation package, and native software is not limited to control software corresponding to the operating system or firmware of the IoT device, such as the control software corresponding to the camera device in the IoT device.

[0032] S204. According to the upgrade priority of each IoT device software, install the upgrade software data package of the IoT device software in sequence to obtain the installation result.

[0033] In step S204 above, the upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version.

[0034] Upgrade costs include at least one piece of information indicating the upgrade cost of IoT device software, but are not limited to operational cost information indicating the upgrade activation procedure, operational timeliness cost information indicating the upgrade activation procedure, and installation cost information indicating the difficulty and / or duration of installing the upgrade software package. When upgrade cost information includes multiple pieces of information, the upgrade priority is not limited to an upgrade order determined based on at least one piece of upgrade cost information.

[0035] Optionally, the upgrade order of at least two IoT device software programs in the software upgrade task is determined based on the upgrade priority of each IoT device software program. The upgrade order of the IoT device software programs determines the installation order of the upgrade software data packages for the IoT device software programs, and the upgrade software data packages for each of the at least two IoT device software programs are installed sequentially according to the installation order.

[0036] S206, Perform the upgrade activation operation on the IoT device software whose installation result indicates that the upgrade has been completed.

[0037] In step S204 above, the upgraded version of the IoT device software is applied after the upgrade activation operation. The upgrade activation operation is used to activate the upgrade of the IoT device software whose installation results indicate an upgrade is complete, after at least two IoT devices in the software upgrade task have obtained the corresponding installation results. After the upgrade activation operation is completed, the upgraded version of the software whose installation results indicate an upgrade is complete runs on the IoT device; before the upgrade activation operation is completed, the original version of the software whose installation results indicate an upgrade is complete runs on the IoT device. It should be noted that the upgrade activation operation is ineffective for software whose installation results indicate an incomplete upgrade. That is, for software whose installation results indicate an incomplete upgrade, only the original version can run after the upgrade activation operation.

[0038] Optionally, if the upgrade process is interrupted, the system checks whether the upgrade operation for each IoT device's software has been completed based on the upgrade cost information for each device in the software upgrade task. If the upgrade operation is completed, it is determined that the IoT device is running the upgraded version of the software. If the upgrade operation is not completed, it is determined that the IoT device is running the original version of the software.

[0039] Optionally, the specific form of the upgrade activation operation is not limited here, and is not limited to requiring no operation and simply restarting the corresponding application and the IoT device. If the upgrade activation operation requires no operation, it is not limited to automatically completing the software upgrade task after the upgrade software package at the bottom of the upgrade priority list among at least two IoT device software programs has obtained its installation result. If the upgrade activation operation involves restarting the IoT device, after the upgrade software package at the bottom of the upgrade priority list among at least two IoT device software programs has obtained its installation result, restarting the IoT device completes the upgrade activation for software whose installation result indicates upgrade completion. On the restarted IoT device, the upgraded version runs for software whose installation result indicates upgrade completion, and the original version runs for software whose installation result indicates incomplete upgrade.

[0040] In this embodiment, the method involves receiving software upgrade tasks corresponding to at least two IoT device software programs, sequentially installing upgrade software data packages according to the upgrade priority of each IoT device software program, and performing an upgrade activation operation on the IoT device software whose upgrade is completed as indicated by the installation result. By determining the installation of upgrade software data packages according to the upgrade priority of at least two IoT device software programs, and performing an upgrade activation operation on the upgraded IoT device software after obtaining the installation result, the upgrade of at least two IoT device software programs is made effective. This achieves the goal of sequentially installing upgrade data packages according to upgrade priority and realizing the upgrade of at least two IoT device software programs through a single upgrade activation operation after installation. This realizes the technical effect of sequentially upgrading multiple IoT device software programs in a single software upgrade task and completing the upgrade of multiple IoT device software programs through a single upgrade activation operation, avoiding the upgrade failure phenomenon caused by multiple software upgrades, and thus solving the technical problem of software upgrade failure caused by mutual interference of software upgrades.

[0041] As an optional implementation method, such as Figure 3 As shown, the upgrade software packages for each IoT device are installed sequentially according to their respective upgrade priorities, resulting in the following installation outcomes:

[0042] S302, according to the upgrade priority, each of the at least two IoT device software programs is used as the current IoT device software in turn;

[0043] S304, Receive the current upgrade software data packet of the current IoT device software;

[0044] S306, Install the current upgrade software package and get the current installation result;

[0045] S308, if the current installation result indicates that the software version of the current IoT device software has been replaced with the upgraded version, determine that the current IoT device software has completed the upgrade, and obtain the next IoT device software as the current IoT device software.

[0046] Optionally, if the upgrade priority of each of the at least two IoT device software programs indicated in the software upgrade task is determined and the upgrade order is established, then each IoT device software program is installed sequentially as the current IoT device software, and the corresponding installation result is obtained. If the installation result of the current IoT device software is obtained, the next IoT device software program in the upgrade order is selected as the current IoT device software, and the upgrade software package is installed, and the corresponding installation result is obtained.

[0047] Optionally, the upgrade software data package is not limited to being received from the IoT server corresponding to the IoT device, the software server corresponding to the IoT device software, or the cache of the IoT device. Upon receiving the upgrade software data package for the current IoT device software, the current upgrade software data package is installed on the IoT device, and the installation result is obtained. After processing the current IoT device software based on the installation result, the next IoT device software is obtained.

[0048] In this embodiment, each of the at least two IoT device software programs is installed sequentially according to upgrade priority. After obtaining the installation result of the current IoT device software, the next IoT device software is processed. After all the IoT device software programs are installed, the upgrade of multiple IoT device software programs is completed through a single upgrade activation operation. This avoids the phenomenon of software upgrade failure caused by the simultaneous installation and upgrade of multiple IoT device software programs, where the current activation operation affects the upgrade of other IoT device software programs. The problem of simultaneous upgrade of multiple IoT device software programs is solved by upgrading priority.

[0049] As an optional implementation, after installing the current upgrade software package and obtaining the current installation result, the following steps are also included:

[0050] S1, if the current installation result indicates that the software version of the current IoT device software has not been replaced with the upgraded version, it is determined that the current IoT device software has not been upgraded.

[0051] S2, if the current IoT device software has not been upgraded, remove the current IoT device software from the software upgrade task.

[0052] Optionally, and not limited to, setting an installation threshold for the current IoT device software can indicate the maximum number of times the current IoT device software can be installed. If the current IoT device software is successfully installed within the installation threshold, a current installation result indicating that the current IoT device software upgrade is complete is obtained. If the current IoT device software is not successfully installed within the installation threshold, a current installation result indicating that the current IoT device software upgrade is not complete is obtained.

[0053] Optionally, if the current installation result indicates that the current IoT device software has not been upgraded, the process may include, but is not limited to, adding the current IoT device software to the next software upgrade task or removing the current IoT device software from the current software upgrade task. If the current IoT device software is removed from the current software upgrade task, the next IoT device software in the current software upgrade task may be obtained as the current IoT device software.

[0054] In this embodiment, after determining the current installation result of the IoT device software, if the installation result indicates that the upgrade is incomplete, the current IoT device software is removed from the software upgrade task, and the next IoT device software is obtained as the current IoT device software to continue processing the upgrades of the remaining IoT device software in this software upgrade task. This avoids delaying the upgrade of other IoT device software due to incomplete upgrades of IoT device software.

[0055] As an optional implementation, after receiving the software upgrade task, the method further includes: determining the upgrade priority of the IoT device software based on the upgrade cost information corresponding to each IoT device software, wherein the upgrade cost information includes one of the following: the operation mode information of the upgrade activation operation, the activation time information of the upgrade activation operation, and the installation time of the upgrade software data package.

[0056] Optionally, the operation mode information for the upgrade activation operation indicates the operation method, such as no operation required, restarting the corresponding application, or restarting the IoT device. The activation operation timeliness information indicates the timeliness of the upgrade activation operation after the upgrade software package installation is complete. For example, the upgrade activation operation may be performed within a first time period after installation, within a second time period after installation, or without timeliness requirements. The first and second time periods can be different levels of timeliness requirements; for example, the first time period may be measured in seconds, and the second time period in calendar days. If the activation operation timeliness information indicates no timeliness requirement, the original version of the IoT device software runs on the IoT device before the activation operation is completed, and the upgraded version of the IoT device software runs on the IoT device after the activation operation is completed. The installation timeliness of the upgrade software package indicates the installation timeliness of the upgrade software package corresponding to the IoT device software.

[0057] Optionally, the operation mode information and the effective time information of the upgrade operation are not limited to having a corresponding relationship. For example, if the operation mode information indicates that no operation is required, the effective time information is not limited to "none".

[0058] The upgrade cost information for IoT device software running on IoT devices is not limited to that shown in Table 1 below. Table 1 records the software type, software name, activation procedure, operation time, and installation duration.

[0059] Table 1

[0060]

[0061]

[0062] Table 1 above shows the upgrade cost information for each IoT device software. Based on this information, the upgrade priority of each IoT device software in the software upgrade task can be determined, resulting in an upgrade ranking.

[0063] In this embodiment, the upgrade priority of the IoT device software is determined by the upgrade cost information of each IoT device software in the software upgrade task. The upgrade software data package of the IoT device software is then installed sequentially according to the upgrade priority to avoid upgrade conflicts between the various IoT device software and ensure that the upgrades of the various IoT device software do not affect each other, thereby ensuring the successful upgrade of the IoT device software.

[0064] As an optional implementation, determining the upgrade priority of IoT device software based on the upgrade cost information corresponding to each IoT device software includes:

[0065] S1, if the upgrade cost information includes effective operation timeliness information, sort at least two IoT device software according to the effective operation timeliness information to obtain a first sorting result. The effective operation timeliness information is used to indicate the waiting time for the IoT device software to be installed and the upgrade to take effect. The longer the waiting time, the higher the upgrade priority. The first sorting result is determined as the upgrade priority.

[0066] S2, if the upgrade cost information includes operation mode information, sort the software of at least two IoT devices according to the operation mode information to obtain a second sorting result. In the operation mode information, the upgrade priority corresponding to the no-prompt mode is higher than the upgrade priority corresponding to the application activation mode, and the upgrade priority corresponding to the application activation mode is higher than the upgrade priority corresponding to the device activation mode. The second sorting result is determined as the upgrade priority.

[0067] S3, if the upgrade cost information includes installation time, sort the software of at least two IoT devices according to the installation time to obtain a third sorting result, where the shorter the installation time, the higher the upgrade priority; determine the third sorting result as the upgrade priority;

[0068] S4. When the upgrade cost information includes at least two of the following: effective operation timeliness information, operation mode information, and installation duration, the reference priority of effective operation timeliness information is higher than that of operation mode information, and the reference priority of operation mode information is higher than that of installation duration.

[0069] Optionally, the "no-prompt mode" in the operation mode information is not limited to the "no operation required" mentioned above, and the "application activation mode" is not limited to instructing the corresponding application of the software to perform an operation to achieve the upgrade, such as restarting the application as mentioned above. The "device activation mode" is not limited to instructing the corresponding application of the software to perform an upgrade, such as restarting the device as mentioned above. The upgrade priority of the "no-prompt mode" is higher than that of the "application activation mode," and the upgrade priority of the "application activation mode" is higher than that of the "device activation mode." That is to say, IoT device software with the "no-prompt mode" in the operation mode information is ranked before IoT device software with the "application activation mode" in the upgrade sorting, and IoT devices with the "application activation mode" are ranked before IoT device software with the "device activation mode" in the upgrade sorting.

[0070] Optionally, if the upgrade cost information includes one of the following: effective operation timeliness information, operation mode information, and installation duration, the upgrade priority of each IoT device software in the software upgrade task is determined according to the effective operation timeliness information, operation mode information, or installation duration included in the upgrade cost information. If the upgrade cost information includes any two or three of the following: effective operation timeliness information, operation mode information, and installation duration, the upgrade priority of each IoT device software in the software upgrade task is determined according to the following: the reference priority of effective operation timeliness information is higher than the reference priority of operation mode information, and the reference priority of operation mode information is higher than the reference priority of installation duration. The reference priority is used to indicate the reference order of the three parameters included in the upgrade cost information: effective operation timeliness information, operation mode information, and installation duration. If the upgrade cost information includes effective operation timeliness information, the IoT device software is sorted first according to the effective operation timeliness information. If the effective operation timeliness information is the same, the IoT device software is sorted according to the operation mode information. If both the effective operation timeliness information and the operation mode information are the same, the IoT device software is sorted according to the installation duration.

[0071] For example, when the upgrade cost information includes effective operation timeliness and operation mode information, the IoT devices are first sorted according to the effective operation timeliness information. If the effective operation timeliness information is the same, the final order of the IoT device software is determined according to the operation mode information. Similarly, when the upgrade cost information includes effective operation timeliness, operation mode information, and installation time, the IoT devices are first sorted according to the effective operation timeliness information. If the effective operation timeliness information is the same, the order of the IoT device software is determined according to the operation mode information. If both the effective operation timeliness and operation mode information are the same, the final order of the IoT device software is determined according to the installation time. Taking the software upgrade task including the five software listed in Table 1 as a specific example, firstly, according to the operation timeliness, the priority of the upgrade without timeliness is higher than that without timeliness requirements, which is higher than the first time limit. Therefore, the priority of the chip firmware is higher than that of the face recognition application and the system ROM. The priority of the face recognition application and the system ROM is higher than that of the camera firmware and the dock scanner firmware. For the face recognition application and the system ROM, according to the operation mode information, the priority of restarting the application is higher than that of restarting the device. Therefore, the priority of the face recognition application is higher than that of the system ROM. For the camera firmware and the facial recognition app firmware, assuming the operation mode information is the same, and based on the installation time (T1 < T3), and following the rule that shorter installation times have higher priority, the camera firmware has a higher priority than the facial recognition app firmware. Therefore, the upgrade priority of the above five software programs, determined based on the upgrade activation information, is: chip firmware, facial recognition application, system ROM, camera firmware, and facial recognition app firmware.

[0072] In this embodiment, the upgrade priority of multiple IoT device software is determined by the upgrade effectiveness information of each IoT device in the software upgrade task, and a reference priority is determined for multiple parameters in the upgrade effectiveness information. The method for confirming the upgrade priority of IoT device software is clarified, ensuring the accuracy of the upgrade priority of IoT device software, thereby ensuring that the software of multiple IoT devices is installed and upgraded in sequence according to the upgrade priority, and the software upgrade is completed.

[0073] As an optional implementation method, such as Figure 4 As shown, the above-mentioned operations for performing upgrades on IoT device software that indicate the upgrade is complete include:

[0074] S402, determine the target operating mode with the lowest activation priority from the IoT device software that indicates the upgrade has been completed based on the installation results;

[0075] S404, Perform the upgrade activation operation according to the target operation mode.

[0076] Optionally, upon obtaining the installation results of the various IoT device software included in the software upgrade task, the target operating mode with the lowest activation priority among the IoT device software whose upgrade was indicated by the installation results is determined. The target operating mode with the lowest activation priority is not limited to the operating mode with the lowest activation priority in the operating mode information of each IoT device software. For example, if the activation priority of the "No Operation Required" operating mode is higher than that of the "Application Activation Mode," and the activation priority of the "Application Activation Mode" is higher than that of the "Device Activation Mode," then among "No Operation Required," "Application Activation Mode," and "Device Activation Mode," the lowest activation priority is the "Device Activation Mode."

[0077] Optionally, if the software upgrade task includes multiple IoT device software programs whose operation mode information is set to "device effective mode," the activation operation corresponding to the device effective mode, i.e., restarting the device, will be used as the upgrade activation operation. If the software upgrade task does not include multiple IoT device software programs whose operation mode information is set to "device effective mode," but does include IoT device software programs whose operation mode information is set to "application effective mode," the activation operation corresponding to the application effective mode, i.e., restarting the application, will be used as the upgrade activation operation. It should be noted that if multiple IoT device software programs whose installation results indicate a complete upgrade include multiple operation mode information indicating "application effective mode," the upgrade activation operation is not limited to including multiple application restart operations. If multiple application restart operations do not interfere with each other, multiple application restart operations can be executed simultaneously, or they can be executed sequentially according to the upgrade priority of the multiple IoT device software programs.

[0078] Optionally, when the software upgrade task includes multiple operating mode information indicating the device's effective mode, i.e., the upgrade effective operation is to restart the IoT device software, the upgrade priorities of the multiple IoT device software included in the software upgrade task are determined by the operation timeliness information and installation duration. When multiple IoT device software indicating the device's effective mode are involved, the initial upgrade priority of the multiple IoT device software is determined according to the upgrade cost information, and the installation duration and operating timeliness are used to determine whether there are upgrade conflicts among the multiple IoT device software indicating the device's effective mode. This is not limited to determining whether the installation duration is greater than the duration in the operating timeliness, such as the first duration in Table 1. If upgrade conflicts exist, the IoT device software included in this software upgrade task is determined from the two or more IoT devices with upgrade conflicts, and the other conflicting IoT device software is transferred to other software upgrade tasks, such as the next software upgrade task. For example, the initial upgrade priorities of the five IoT device software in Table 1 determined based on the upgrade effective information are: chip firmware, facial recognition application, system ROM, camera firmware, and dock scanner firmware. However, since the installation time T3 of the scanning dock firmware is longer than the first time required for the operation time of the camera firmware, it is determined that there is an upgrade conflict between the camera firmware and the scanning dock firmware. It is necessary to remove the upgrade of either the camera firmware or the scanning dock firmware from this software upgrade task. For example, if the upgrade of the scanning dock firmware is removed from this software upgrade task according to the upgrade priority, then this software upgrade task will ultimately include 4 IoT device software, and the corresponding upgrade priorities are: chip firmware, face recognition application, system ROM, and camera firmware.

[0079] Optionally, and not limited to, a single software upgrade task may include only one operating mode information indicating the device's effective mode—that is, the IoT device software whose upgrade operation involves restarting the device—to ensure the successful completion of the software upgrade task. The IoT device software included in the software upgrade task that indicates the device's effective mode is not limited to one randomly selected from multiple IoT device software indicating effective modes, determined according to upgrade priority. For example, a single software upgrade task may include only the three IoT device software programs listed in Table 1: chip firmware, facial recognition application, and dock scanning firmware. Alternatively, a single software upgrade task may include only the three IoT device software programs listed in Table 1: chip firmware, facial recognition application, and system ROM.

[0080] Taking a software upgrade task that includes the upgrade of software A (chip firmware) and software B (camera firmware) as an example, the upgrade activation information for the chip firmware and camera firmware is shown in Table 1. The interaction of the IoT device software upgrade process is not limited to the following. Figure 5As shown. The IoT device executes S502 to receive a software upgrade task. The software to be upgraded, as indicated in the software upgrade task, includes: Software A (chip firmware) and Software B (camera firmware). Given the two software programs included in the upgrade task, S504 is executed to confirm the software upgrade priority. The upgrade priority is determined based on the upgrade activation information of the two software programs: Software A (chip firmware) and Software B (camera firmware). With the software upgrade priority determined, the software upgrades are performed sequentially. S506 is executed to transmit upgrade data packet A to Software A. Upon receiving upgrade data packet A, S508 is executed, informing A to begin the upgrade. S510 is executed to perform the software upgrade. Upgrade data packet A is installed. Upon completion of installation, S512 is executed, informing A that the upgrade is complete. Upon completion of the upgrade, S514 is executed to transmit upgrade data packet B. Upon receiving upgrade data packet B, S516 is executed, informing B to begin the upgrade, and S518 is executed to perform the software upgrade. Upgrade installation package B is installed. Upon completion of installation, S520 is executed, instructing B to complete the upgrade. If the upgrade priority is lowest, meaning software B has completed the upgrade installation, then the upgrade is confirmed to be effective. If software A's operation mode is "no operation required," and software B's operation mode is "application activation mode," meaning the device is restarted, then the lowest priority device restart is confirmed as the upgrade activation operation. The IoT device executes S522 to perform the device restart operation. After the device restart operation is completed, S524 is executed to confirm the software upgrade task is complete. At this point, the software upgrade task is complete.

[0081] In this embodiment, the target operation mode with the lowest priority in the IoT device software is used as the execution mode for the upgrade activation operation. This enables the upgrade activation of multiple IoT device software that have completed the installation result indication in the software upgrade task to be completed in a single upgrade activation operation. This reduces the number of upgrade activation operations while ensuring the successful upgrade of IoT device software, thus improving the efficiency of software upgrade.

[0082] As an optional implementation, after performing the upgrade activation operation on the IoT device software indicating that the installation result has been completed, the method further includes: displaying the software upgrade results of at least two IoT device software programs on the user interface.

[0083] Optionally, upgrade prompts and results for the IoT device can be displayed in the user interface of the IoT device. During each IoT device software upgrade process, the currently upgraded IoT device software is displayed so that the user can know which IoT device software is currently being upgraded through the user interface. Upon completion of the IoT device software upgrade process, the upgrade result is displayed in the user interface. The upgrade result includes, but is not limited to, upgrade success or upgrade failure.

[0084] Optionally, when a software upgrade task is confirmed, the total upgrade time may not be displayed on the user interface. The display message may also include, but is not limited to, execution controls to trigger the start of the software upgrade task or cancellation controls to cancel the task. If the software upgrade task is cancelled, it may not be limited to transferring it to the next upgrade task. When the software upgrade task is started, it may not be limited to displaying software upgrade prompts during the installation of the upgrade data package for each IoT device.

[0085] Optionally, when the IoT device software operates in a no-operation mode, the message indicating software upgrade completion is not limited to being displayed after the upgrade package is installed. When the IoT device software operates in application activation mode (i.e., after restarting the application), the message indicating software upgrade completion is displayed after the application restart is complete, not limited to being displayed after installing the upgrade package. When the IoT device software operates in device activation mode (i.e., after restarting the device), the message indicating software upgrade completion is displayed after performing the upgrade activation operation, not limited to being displayed after installing the upgrade package. The message indicating software upgrade completion includes, but is not limited to, a confirmation control indicating the activation of the upgrade operation.

[0086] by Figure 5 The software upgrade task shown in the example includes software A (chip firmware) and software B (camera firmware). The user interface display is not limited to, for example, as shown in the example. Figure 6As shown. When an IoT device receives a software upgrade task and confirms the software upgrade priority, the required duration of the software upgrade task is calculated, and prompt message 601 is displayed on the user interface. Prompt message 601 indicates the total duration of the software upgrade task, as well as controls for starting and canceling the upgrade. When the software upgrade task is triggered by starting the upgrade, the upgrade of software A begins, and prompt message 601 is updated to prompt message 602. Prompt message 602 indicates that software A is upgrading. When the upgrade data package for software A is installed, prompt message 602 is updated to prompt message 603. Prompt message 603 indicates that software A has completed the upgrade. When software A has completed the upgrade, the upgrade of software B begins, and prompt message 603 is updated to prompt message 604. Prompt message 604 indicates that software B is upgrading. When the software upgrade data package for software B is installed, prompt message 604 is updated to prompt message 605. Prompt message 605 indicates that software B has completed the upgrade. When the software installation is complete, the prompt message is updated to prompt message 606. Message 606 indicates that the upgrade is complete, and can also be used to indicate the execution and triggering of the upgrade activation operation. If the upgrade activation operation is complete, the message will update to message 607. Message 606 indicates that the upgrade task is complete.

[0087] In this embodiment of the application, by displaying prompts on the user interface of the IoT device, the user is promptly informed of the progress of the software upgrade task and the upgrade results of each software in a visual form, thus realizing the upgrade interaction with the user.

[0088] As an optional implementation, the above-mentioned operation of performing upgrade activation on the IoT device software indicating that the upgrade has been completed includes:

[0089] S1, when the permission information indicates that the upgrade operation can be automatically executed, a prompt message including a confirmation control is displayed on the user operation interface, wherein the confirmation control is used to confirm the execution of the upgrade operation;

[0090] S2, if the permission information indicates that the upgrade activation operation cannot be automatically executed, display a prompt message including an execution control on the user operation interface, wherein the execution control is used to trigger the upgrade activation operation.

[0091] Optionally, the permission information is not limited to whether the IoT device has the permission to automatically execute the upgrade activation operation. When the upgrade activation operation is in application activation mode (i.e., restarting the application), the IoT device typically has the permission to automatically restart the application. Therefore, after the upgrade installation package is installed, the application can be automatically restarted to make the application software upgrade effective. When the upgrade activation operation is in device activation mode (i.e., restarting the device), it is necessary to determine whether the IoT device has the permission to automatically restart the device.

[0092] Optionally, if the IoT device is capable of automatically restarting, the upgrade completion notification will include a confirmation control to allow the user to confirm the device restart. If the IoT device is not capable of automatically restarting, the upgrade completion notification will include an execution control to allow the user to trigger a device restart, thus enabling the software upgrade to take effect.

[0093] In this embodiment of the application, by confirming the permission for the upgrade to take effect operation, the control for receiving user operations included in the prompt message indicating that the upgrade is complete is determined, so as to more accurately receive user operations and realize the software upgrade.

[0094] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0095] According to another aspect of the present invention, an IoT device software upgrade apparatus for implementing the above-described IoT device software upgrade method is also provided. For example... Figure 7 As shown, the device includes:

[0096] The receiving unit 702 is used to receive a software upgrade task, wherein the software upgrade task is used to instruct the software of at least two Internet of Things (IoT) devices to be upgraded, and the IoT device software is the control software running in the IoT devices.

[0097] Installation unit 704 is used to install the upgrade software data package of IoT device software in sequence according to the upgrade priority of each IoT device software, and obtain the installation result. The upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of IoT device software, and the installation result is used to indicate whether the software version of IoT device software has been replaced with the upgraded version.

[0098] The execution unit 706 is used to perform an upgrade activation operation on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation.

[0099] Optionally, the mounting unit 704 includes:

[0100] The current module is used to sequentially select each of at least two IoT device software programs as the current IoT device software according to upgrade priority.

[0101] The receiving module is used to receive the current upgrade software data packet of the current IoT device software;

[0102] The installation module is used to install the current upgrade software package and obtain the current installation result.

[0103] The determination module is used to determine if the current IoT device software version has been replaced with the upgraded version when the current installation result indicates that the current IoT device software has completed the upgrade, and to obtain the next IoT device software as the current IoT device software.

[0104] Optionally, the above-mentioned IoT device software upgrade device further includes an indication unit, used to, after installing the current upgrade software data package and obtaining the current installation result, include:

[0105] The indicator module is used to indicate in the current installation result that the software version of the current IoT device software has not been replaced with the upgraded version, thus determining that the current IoT device software has not been upgraded.

[0106] The removal module is used to remove the current IoT device software from the software upgrade task if the current IoT device software has not been upgraded.

[0107] Optionally, the above-mentioned IoT device software upgrade device further includes:

[0108] The determining unit is used to determine the upgrade priority of IoT device software after receiving the software upgrade task, based on the upgrade cost information corresponding to each IoT device software. The upgrade cost information includes one of the following: the operation mode information of the upgrade activation operation, the activation time information of the upgrade activation operation, and the installation time of the upgrade software data package.

[0109] Optionally, the determining unit is further configured to:

[0110] When the upgrade cost information includes the effective operation timeliness information, at least two IoT device software are sorted according to the effective operation timeliness information to obtain a first sorting result. The effective operation timeliness information is used to indicate the waiting time for the IoT device software to be installed and for the upgrade to take effect. The longer the waiting time, the higher the upgrade priority. The first sorting result is determined as the upgrade priority.

[0111] When the upgrade cost information includes operation mode information, at least two IoT device software are sorted according to the operation mode information to obtain a second sorting result. In the operation mode information, the upgrade priority corresponding to the no-prompt mode is higher than the upgrade priority corresponding to the application activation mode, and the upgrade priority corresponding to the application activation mode is higher than the upgrade priority corresponding to the device activation mode. The second sorting result is determined as the upgrade priority.

[0112] When the upgrade cost information includes installation time, the software of at least two IoT devices is sorted according to the installation time to obtain a third sorting result, in which the shorter the installation time, the higher the upgrade priority; the third sorting result is determined as the upgrade priority.

[0113] When the upgrade cost information includes at least two of the following: effective operation timeliness information, operation mode information, and installation duration, the reference priority of effective operation timeliness information is higher than that of operation mode information, and the reference priority of operation mode information is higher than that of installation duration.

[0114] Optionally, the execution unit 706 includes:

[0115] The activation module is used to determine the target operating mode with the lowest activation priority from the IoT device software that indicates the upgrade has been completed in the installation results.

[0116] The execution module is used to perform the upgrade activation operation according to the target operation mode.

[0117] Optionally, the above-mentioned IoT device software upgrade device further includes a display unit, which is used to display the software upgrade results of at least two IoT device software on the user interface after performing an upgrade activation operation on the IoT device software whose installation result indicates that the upgrade has been completed.

[0118] Optionally, the above-mentioned IoT device software upgrade device further includes a prompting unit, used to perform an upgrade activation operation on the IoT device software indicating that the upgrade has been completed after the installation result indicates that the upgrade has been completed, and further includes:

[0119] The first prompt module is used to display a prompt message, including a confirmation control, on the user interface when the permission information indicates that the upgrade operation can be automatically executed. The confirmation control is used to confirm the execution of the upgrade operation.

[0120] The second prompt module is used to display a prompt message, including an execution control, on the user interface when the permission information indicates that the automatic upgrade activation operation is not possible. The execution control is used to trigger the upgrade activation operation.

[0121] In this embodiment, the method involves receiving software upgrade tasks corresponding to at least two IoT device software programs, sequentially installing upgrade software data packages according to the upgrade priority of each IoT device software program, and performing an upgrade activation operation on the IoT device software whose upgrade is completed as indicated by the installation result. By determining the installation of upgrade software data packages according to the upgrade priority of at least two IoT device software programs, and performing an upgrade activation operation on the upgraded IoT device software after obtaining the installation result, the upgrade of at least two IoT device software programs is made effective. This achieves the goal of sequentially installing upgrade data packages according to upgrade priority and realizing the upgrade of at least two IoT device software programs through a single upgrade activation operation after installation. This realizes the technical effect of sequentially upgrading multiple IoT device software programs in a single software upgrade task and completing the upgrade of multiple IoT device software programs through a single upgrade activation operation, avoiding the upgrade failure phenomenon caused by multiple software upgrades, and thus solving the technical problem of software upgrade failure caused by mutual interference of software upgrades.

[0122] According to another aspect of the present invention, an electronic device for implementing the above-described Internet of Things (IoT) device software upgrade method is also provided. This electronic device may be... Figure 1 The illustrated IoT device or server. This embodiment uses the electronic device as an example of an IoT device. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments via the computer program.

[0123] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0124] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0125] S1, receive a software upgrade task, wherein the software upgrade task is used to instruct the software of at least two IoT devices to be upgraded, and the IoT device software is the control software running in the IoT devices;

[0126] S2, according to the upgrade priority of each IoT device software, install the upgrade software data package of the IoT device software in sequence to obtain the installation result. The upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version.

[0127] S3 executes an upgrade activation operation on the IoT device software whose installation result indicates that the upgrade has been completed. After the upgrade activation operation, the upgraded version of the IoT device software is applied.

[0128] Alternatively, as those skilled in the art will understand, Figure 8 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 8 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 8 The different configurations shown.

[0129] The memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the IoT device software upgrade method and apparatus in this embodiment of the invention. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, thereby realizing the aforementioned IoT device software upgrade method. The memory 802 may include high-speed random access memory, and may also include 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 802 may further include memory remotely located relative to the processor 804, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, enterprise intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 802 may be used, but is not limited to, to store information such as software upgrade tasks, upgrade priorities, and installation results. As an example, such as... Figure 8 As shown, the memory 802 may include, but is not limited to, the receiving unit 702, the installation unit 704, and the execution unit 706 in the aforementioned IoT device software upgrade device. Furthermore, it may include, but is not limited to, other module units in the aforementioned IoT device software upgrade device, which will not be elaborated upon in this example.

[0130] Optionally, the transmission device 806 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 806 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 806 is a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0131] In addition, the aforementioned electronic device also includes: a display 808 for displaying the upgrade priority and installation results; and a connection bus 810 for connecting the various module components in the aforementioned electronic device.

[0132] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0133] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication section 909, and / or installed from a removable medium 911. When the computer program is executed by a central processing unit 901, it performs various functions provided in embodiments of this application.

[0134] Figure 9 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0135] It should be noted that, Figure 9 The computer system 900 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0136] like Figure 9As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 902 or programs loaded from storage section 908 into random access memory (RAM). The RAM 903 also stores various programs and data required for system operation. The CPU 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output interface 905 (I / O interface) is also connected to the bus 904.

[0137] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a local area network card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0138] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by central processing unit 901, it performs various functions defined in the system of this application.

[0139] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of a computer device reads computer instructions, and the processor executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the above-described Internet of Things device software upgrade.

[0140] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0141] S1, receive a software upgrade task, wherein the software upgrade task is used to instruct the software of at least two IoT devices to be upgraded, and the IoT device software is the control software running in the IoT devices;

[0142] S2, according to the upgrade priority of each IoT device software, install the upgrade software data package of the IoT device software in sequence to obtain the installation result. The upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version.

[0143] S3 executes an upgrade activation operation on the IoT device software whose installation result indicates that the upgrade has been completed. After the upgrade activation operation, the upgraded version of the IoT device software is applied.

[0144] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0145] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0146] In the above embodiments of the present invention, the descriptions of each embodiment have their own emphasis. Parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. The sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0148] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0149] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0150] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for upgrading the software of an Internet of Things (IoT) device, characterized in that, include: Receive a software upgrade task, wherein the software upgrade task is used to instruct the software of at least two Internet of Things (IoT) devices to be upgraded, and the IoT device software is the control software running in the IoT devices; Determine the upgrade cost information for the software of each of the aforementioned IoT devices; If the upgrade cost information includes one of the following: effective operation time information, operation mode information, and installation time, the software of the at least two IoT devices is sorted according to the upgrade cost information to obtain a first software sorting result, and the upgrade priority of the at least two IoT device software is determined according to the first software sorting result. When the upgrade cost information includes at least two of the following: the effective operation timeliness information, the operation mode information, and the installation duration, the at least two IoT device software programs are sorted according to the following: the effective operation timeliness information has a higher reference priority than the operation mode information, and the operation mode information has a higher reference priority than the installation duration. This results in a second software sorting result, and the upgrade priority of the at least two IoT device software programs is determined based on the second software sorting result. If multiple operation mode information in the operation mode information of the at least two IoT device software are determined to be in the device activation mode, and if the installation time and activation operation time information of the IoT device software in the device activation mode are determined to be in the case of upgrade conflict between the IoT device software in the device activation mode, at least one of the at least two IoT device software with upgrade conflict will be transferred to other software upgrade tasks. According to the upgrade priority corresponding to each IoT device software, the upgrade software data package of the IoT device software is installed sequentially to obtain the installation result, wherein the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version; An upgrade activation operation is performed on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation.

2. The method according to claim 1, characterized in that, According to the upgrade priority of each IoT device software, the upgrade software data packages of the IoT device software are installed sequentially, and the installation results include: According to the upgrade priority, each of the at least two IoT device software programs will be used as the current IoT device software in sequence; Receive the current upgrade software data packet of the current IoT device software; Install the current upgrade software package to obtain the current installation result; If the current installation result indicates that the software version of the current IoT device software has been replaced with the upgraded version, it is determined that the current IoT device software has completed the upgrade, and the next IoT device software is obtained as the current IoT device software.

3. The method according to claim 2, characterized in that, After installing the current upgrade software package and obtaining the current installation result, the process also includes: If the current installation result indicates that the software version of the current IoT device software has not been replaced with the upgraded version, it is determined that the current IoT device software has not completed the upgrade. If the current IoT device software has not been upgraded, remove the current IoT device software from the software upgrade task.

4. The method according to claim 1, characterized in that, The software of the at least two IoT devices is sorted according to the upgrade cost information to obtain a first software sorting result. The upgrade priority of the software of the at least two IoT devices is determined based on the first software sorting result, including: When the upgrade cost information includes the effective operation timeliness information, the software of the at least two IoT devices is sorted according to the effective operation timeliness information to obtain a first sorting result. The effective operation timeliness information is used to indicate the waiting time for the IoT device software to wait for the upgrade to take effect after installation. The longer the waiting time, the higher the upgrade priority. The first sorting result is determined as the upgrade priority. When the upgrade cost information includes the operation mode information, the software of the at least two IoT devices is sorted according to the operation mode information to obtain a second sorting result. In the operation mode information, the upgrade priority corresponding to the no-prompt mode is higher than the upgrade priority corresponding to the application activation mode, and the upgrade priority corresponding to the application activation mode is higher than the upgrade priority corresponding to the device activation mode. The second sorting result is determined as the upgrade priority. If the upgrade cost information includes the installation time, the software of the at least two IoT devices is sorted according to the installation time to obtain a third sorting result, wherein the shorter the installation time, the higher the upgrade priority; the third sorting result is determined as the upgrade priority.

5. The method according to claim 1, characterized in that, Performing the upgrade activation operation on the IoT device software whose upgrade is indicated to be completed by the installation result includes: From the IoT device software that the installation results indicate has been upgraded, determine the target operating mode with the lowest activation priority; Perform the upgrade activation operation according to the target operation mode.

6. The method according to any one of claims 1 to 5, characterized in that, After performing the upgrade activation operation on the IoT device software that indicates the upgrade is complete according to the installation result, the process also includes: The software upgrade results of each of the at least two IoT devices are displayed on the user interface.

7. The method according to claim 6, characterized in that, Before performing the upgrade activation operation on the IoT device software that indicates the upgrade is complete based on the installation results, the following steps are also included: When the permission information indicates that the upgrade activation operation can be automatically executed, a prompt message including a confirmation control is displayed on the user operation interface, wherein the confirmation control is used to confirm the execution of the upgrade activation operation; If the permission information indicates that the upgrade activation operation cannot be automatically executed, a prompt message including an execution control is displayed on the user interface, wherein the execution control is used to trigger the upgrade activation operation.

8. A software upgrade device for Internet of Things (IoT) devices, characterized in that, include: A receiving unit is configured to receive a software upgrade task, wherein the software upgrade task is configured to instruct the software of at least two Internet of Things (IoT) devices to be upgraded, and the IoT device software is control software running in the IoT devices; The installation unit is used to install the upgrade software data package of the IoT device software sequentially according to the upgrade priority corresponding to each IoT device software, and obtain the installation result. The upgrade priority is used to indicate the upgrade order corresponding to the upgrade cost of the IoT device software, and the installation result is used to indicate whether the software version of the IoT device software has been replaced with the upgraded version. An execution unit is configured to perform an upgrade activation operation on the IoT device software whose upgrade is indicated by the installation result, wherein the upgraded version is applied to the IoT device software after the upgrade activation operation. The device is further configured to: determine upgrade cost information for each IoT device software before sequentially installing upgrade software data packages for each IoT device software according to its respective upgrade priority; if the upgrade cost information includes one of the following: effective operation timeliness information, operation mode information, and installation duration, sort the at least two IoT device software according to the upgrade cost information to obtain a first software sorting result, and determine the upgrade priority of the at least two IoT device software according to the first software sorting result; if the upgrade cost information includes at least two of the following: effective operation timeliness information, operation mode information, and installation duration, prioritize the upgrade software according to the following: if the reference priority of the effective operation timeliness information is higher than that of the IoT device software... The reference priority of the operation mode information is higher than the reference priority of the installation time. The software of the at least two IoT devices is sorted to obtain a second software sorting result. The upgrade priority of the at least two IoT device software is determined according to the second software sorting result. If multiple operation mode information in the operation mode information of the at least two IoT device software indicates that they are in the device activation mode, and if there is an upgrade conflict between the IoT device software in the device activation mode based on the installation time and the activation operation timeliness information, at least one of the at least two IoT device software with upgrade conflict is transferred to other software upgrade tasks.

9. The apparatus according to claim 8, characterized in that, The installation unit includes: The current module is used to sequentially select each of the at least two IoT device software as the current IoT device software according to the upgrade priority. The receiving module is used to receive the current upgrade software data packet of the current IoT device software; The installation module is used to install the current upgrade software data package and obtain the current installation result. The determination module is used to determine that the current IoT device software has completed the upgrade when the current installation result indicates that the software version of the current IoT device software has been replaced with the upgraded version, and to obtain the next IoT device software as the current IoT device software.

10. The apparatus according to claim 9, characterized in that, The IoT device software upgrade device further includes an indication unit, used to, after installing the current upgrade software data package and obtaining the current installation result, include: The indicator module is used to determine that the current IoT device software has not been upgraded when the current installation result indicates that the software version of the current IoT device software has not been replaced with the upgraded version; A removal module is used to remove the current IoT device software from the software upgrade task if the current IoT device software has not been upgraded.

11. The apparatus according to claim 8, characterized in that, The IoT device software upgrade device also includes: The determining unit is configured to, after receiving the software upgrade task, determine the upgrade priority of the IoT device software based on the upgrade cost information corresponding to each IoT device software, wherein the upgrade cost information includes one of the following: the operation mode information of the upgrade activation operation, the activation time information of the upgrade activation operation, and the installation time of the upgrade software data package.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.

13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.

14. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Method and device for pushing prompt messages of software upgrading

    CN103365692A

  • Equipment upgrading method, device, computer readable medium and equipment

    CN112394966A