Equipment upgrading method and device, equipment and computer storage medium
By detecting and sending upgrade tasks and packages in advance in the IoT system, it solves the upgrade time and power consumption problems caused by terminal equipment waiting online, achieves efficient equipment upgrades, and improves user experience.
Patent Information
- Application Number
- CN202311633789.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2024-10-18
AI Technical Summary
When a large number of terminal devices need to be upgraded in the Internet of Things system, the existing technology requires the terminal devices to wait online all the time, resulting in excessive upgrade time and power consumption, which affects the user experience.
When the terminal device logs into the IoT system, the upgrade task is detected and established in advance, and the upgrade command and upgrade package are sent. Even if the terminal device is not online, the upgrade can be completed, avoiding repeated new upgrade tasks and saving time and power.
It improves the upgrade efficiency, reduces power consumption, and enhances user experience. Especially when a large number of devices are upgraded, there is no need to wait online continuously.
Smart Images

Figure CN118796223A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of Internet of Things, and in particular, relates to a device upgrade method, device, equipment and computer storage medium. Background Art
[0002] The design cycle of the IoT system is very short, but the market demand is continuous innovation and optimization. Developers must be able to maintain and upgrade terminal devices in a timely manner according to customer needs to extend the service life of terminal devices.
[0003] IoT systems usually provide firmware upgrades for terminal devices through Over the Air Technology (OTA). When the terminal device is online, when the IoT system receives an upgrade command from the terminal device, it creates an upgrade task and sends the corresponding upgrade package to the terminal device. However, upgrade tasks can only be created when the terminal device is online. When a large number of terminal devices need to be upgraded, creating new upgrade tasks will consume too much time, which not only wastes electricity, but also has low upgrade efficiency, affecting user experience. Summary of the invention
[0004] The embodiments of the present application provide a device upgrade method, apparatus, equipment and computer storage medium. Even if the terminal device is not online, the Internet of Things system can establish an upgrade task in advance. When the terminal device logs in to the Internet of Things system, as long as the Internet of Things system detects that there is upgrade task information, it will send an upgrade command to the terminal device and send the upgrade package to the terminal device to complete the upgrade of the terminal device. When a large number of terminal devices need to be upgraded, the terminal devices do not need to wait online all the time, nor do they need to create new upgrade tasks, which saves time and electricity, improves upgrade efficiency, and enhances user experience.
[0005] In a first aspect, an embodiment of the present application provides a device upgrade method, which is applied to an Internet of Things system, including:
[0006] When the terminal device successfully logs into the IoT system, detecting whether the upgrade task information corresponding to the device name of the terminal device is included, the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code;
[0007] When the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is active notification, an upgrade command is sent to the terminal device;
[0008] When the terminal device receives the upgrade command, receiving a download request sent by the terminal device;
[0009] Send an upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can use the upgrade package to upgrade.
[0010] In a possible implementation, when the terminal device receives an upgrade command, receiving a download request sent by the terminal device includes:
[0011] When the terminal device receives the upgrade command, receiving a query request from the terminal device, the query request includes a device name of the terminal device;
[0012] Sending upgrade task information to the terminal device;
[0013] When the terminal device receives the upgrade task information, a download request sent by the terminal device is received.
[0014] In one possible implementation, the download request includes a data range of data in the upgrade package;
[0015] When the terminal device receives the upgrade task information, receiving the download request sent by the terminal device includes:
[0016] When the terminal device receives the upgrade task information, determines the size of the segmented upgrade package according to the ratio of the upgrade package size to the memory information, and determines the data range of the data in the upgrade package according to the size of the segmented upgrade package, receives the download request sent by the terminal device;
[0017] Sending the upgrade package corresponding to the upgrade package information to the terminal device includes:
[0018] The data corresponding to the data range in the upgrade package corresponding to the upgrade package information is sent to the terminal device, so that the terminal device can use the upgrade package to upgrade when receiving all the data in the upgrade package.
[0019] In a possible embodiment, it also includes:
[0020] When the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is not to notify, receiving a query request sent by the terminal device at a preset time, the query request including the device name of the terminal device;
[0021] Sending upgrade task information to the terminal device;
[0022] When the terminal device receives the upgrade task information, receiving a download request sent by the terminal device;
[0023] Send an upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can use the upgrade package to upgrade.
[0024] In a possible implementation, the query request further includes a version number of the terminal device; before sending the upgrade task information to the terminal device, the method further includes:
[0025] Compare the version number of the terminal device with the version number of the upgrade package;
[0026] Send upgrade task information to the terminal device, including:
[0027] When the version number of the terminal device is inconsistent with the version number of the upgrade package, the upgrade task information is sent to the terminal device.
[0028] In a possible implementation, before sending the upgrade package corresponding to the upgrade package information to the terminal device, the method further includes:
[0029] Use the upgrade package information to verify whether the upgrade package is complete;
[0030] Sending the upgrade package corresponding to the upgrade package information to the terminal device includes:
[0031] When the upgrade package is complete, the upgrade package corresponding to the upgrade package information is sent to the terminal device.
[0032] In a possible implementation, when the terminal device receives the upgrade task information, receiving the download request sent by the terminal device includes:
[0033] When the terminal device receives the upgrade task information, and the power of the terminal device is greater than the first preset value, the storage space is greater than the upgrade package size, and the signal is greater than the second preset value, a download request sent by the terminal device is received.
[0034] In a possible embodiment, it also includes:
[0035] Receive the upgrade progress and results sent by the terminal device.
[0036] In a second aspect, an embodiment of the present application provides a device upgrade method, which is applied to a terminal device, including:
[0037] When the terminal device successfully logs in to the IoT system, the IoT system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification method is active notification, the upgrade command sent by the IoT system is received, and the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, upgrade package version number and upgrade package verification code;
[0038] Send a download request to the IoT system;
[0039] Receive the upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0040] Use the upgrade package to upgrade.
[0041] In one possible implementation, before sending the download request to the IoT system, the method further includes:
[0042] Sending a query request to the IoT system, where the query request includes the device name of the terminal device;
[0043] Receive upgrade task information sent by the IoT system.
[0044] In a possible implementation, the download request includes a data range of data in the upgrade package; after receiving the upgrade task information sent by the Internet of Things system, the method further includes:
[0045] Determine the size of the shard upgrade package based on the ratio of the upgrade package size to the memory information;
[0046] Determine the data range of the data in the upgrade package based on the size of the shard upgrade package;
[0047] Receive the upgrade package corresponding to the upgrade task information sent by the IoT system, including:
[0048] Receive data corresponding to the data range in the upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0049] Use the upgrade package to upgrade, including:
[0050] When all data in the upgrade package is received, the upgrade is performed using the upgrade package.
[0051] In a possible embodiment, it also includes:
[0052] When the terminal device successfully logs in to the IoT system, the IoT system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is not to notify, a query request is sent to the IoT system at a preset time, and the query request includes the device name of the terminal device;
[0053] Receive upgrade task information sent by the IoT system;
[0054] Send a download request to the IoT system;
[0055] Receive the upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0056] Use the upgrade package to upgrade.
[0057] In a possible embodiment, it is characterized in that before upgrading using the upgrade package, the method further includes:
[0058] Use the upgrade package information to verify whether the upgrade package is complete;
[0059] Use the upgrade package to upgrade, including:
[0060] If the upgrade package is complete, use it to upgrade.
[0061] In a possible implementation, sending a download request to the IoT system includes:
[0062] When the power of the terminal device is greater than a first preset value, the storage space is greater than the upgrade package size, and the signal is greater than a second preset value, a download request is sent to the Internet of Things system.
[0063] In a possible embodiment, it also includes:
[0064] Send upgrade progress and results to the IoT system.
[0065] In a third aspect, an embodiment of the present application provides an upgrade device for a device, which is applied to an Internet of Things system, including:
[0066] A detection module, including, when the terminal device successfully logs into the IoT system, detecting whether the upgrade task information corresponding to the device name of the terminal device is included, the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code;
[0067] A sending module, used to send an upgrade command to the terminal device when the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is active notification;
[0068] A receiving module, used for receiving a download request sent by the terminal device when the terminal device receives an upgrade command;
[0069] The sending module is also used to send the upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can use the upgrade package to upgrade.
[0070] In a fourth aspect, an embodiment of the present application provides an upgrade device for a device, which is applied to a terminal device, and includes:
[0071] The receiving module is used to receive the upgrade command sent by the IoT system when the terminal device successfully logs in to the IoT system and the IoT system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is active notification. The upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, upgrade package version number and upgrade package verification code;
[0072] A sending module, used to send a download request to the Internet of Things system;
[0073] The receiving module is also used to receive the upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0074] The upgrade module is used to upgrade using the upgrade package.
[0075] In a fifth aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0076] a processor and a memory storing computer program instructions;
[0077] When the processor executes the computer program instructions, any one of the above-mentioned methods for upgrading the device is implemented.
[0078] In a sixth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a method for upgrading a device according to any one of the above items is implemented.
[0079] In a seventh aspect, an embodiment of the present application provides a computer program product, characterized in that when instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned device upgrade methods.
[0080] The upgrade method, device, device and computer storage medium of the device of the embodiment of the present application are applied to the Internet of Things system, including: when the terminal device successfully logs into the Internet of Things system, detecting whether the upgrade task information corresponding to the device name of the terminal device is included, when the upgrade task information corresponding to the device name of the terminal device is detected, and when the task notification mode is active notification, sending an upgrade command to the terminal device, the upgrade task information includes upgrade package information, and the upgrade package information includes upgrade package size, upgrade package version number and upgrade package verification code; when the terminal device receives the upgrade command, receiving the download request sent by the terminal device; sending the upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can use the upgrade package to upgrade. In this way, even if the terminal device is not online, the Internet of Things system can establish an upgrade task in advance. When the terminal device logs into the Internet of Things system, as long as the Internet of Things system detects that there is upgrade task information, it will send an upgrade command to the terminal device and send the upgrade package to the terminal device to complete the upgrade of the terminal device. When a large number of terminal devices need to be upgraded, the terminal device does not need to wait online all the time, and there is no need to create a new upgrade task, which saves time and power, improves upgrade efficiency, and enhances user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0082] Figure 1 It is a flowchart of a method for upgrading a device provided by an embodiment of the present application;
[0083] Figure 2 is a flowchart of a method for upgrading a device provided by another embodiment of the present application;
[0084] Figure 3 is a flowchart of a method for upgrading a device provided by another embodiment of the present application;
[0085] Figure 4 is a flowchart of a method for upgrading a device provided in yet another embodiment of the present application;
[0086] Figure 5 is a structural diagram of an Internet of Things system provided by yet another embodiment of the present application;
[0087] Figure 6 is a structural schematic diagram of an upgrading device for a device applied to an Internet of Things system provided by yet another embodiment of the present application;
[0088] Figure 7 is a schematic diagram of the structure of an upgrading device for a terminal device provided in yet another embodiment of the present application;
[0089] Figure 8 It is a structural diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0090] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0091] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0092] The design cycle of the IoT system is very short, but the market demand is continuous innovation and optimization. Developers must be able to maintain and upgrade terminal devices in a timely manner according to customer needs to extend the service life of terminal devices.
[0093] IoT systems usually provide firmware upgrades for terminal devices through Over the Air Technology (OTA). When the terminal device is online, when the IoT system receives an upgrade command from the terminal device, it creates an upgrade task and sends the corresponding upgrade package to the terminal device. However, upgrade tasks can only be created when the terminal device is online. When a large number of terminal devices need to be upgraded, creating new upgrade tasks will consume too much time, which not only wastes electricity, but also has low upgrade efficiency, affecting user experience.
[0094] In order to solve the problems of the prior art, the embodiments of the present application provide a device upgrade method, apparatus, device and computer storage medium. The device upgrade method provided by the embodiments of the present application is first introduced below.
[0095] Figure 1 A schematic flow chart of a method for upgrading a device provided in one embodiment of the present application is shown.
[0096] like Figure 1 As shown, the device upgrade method provided in the embodiment of the present application includes the following steps.
[0097] S110. When the terminal device successfully logs in to the Internet of Things system, the Internet of Things system detects whether it includes upgrade task information corresponding to the device name of the terminal device, where the upgrade task information includes upgrade package information, and the upgrade package information includes upgrade package size, upgrade package version number, and upgrade package verification code.
[0098] Here, the IoT system may be the OneNET IoT platform, and the terminal device may be a smart IoT device, including but not limited to a smart bracelet, a smart phone, and a smart TV.
[0099] In some embodiments, the terminal device logs in to the Internet of Things system using the device name and permission information, and the Internet of Things system verifies the permission information of the terminal device. When the permission information is verified by the Internet of Things system, the terminal device successfully logs in to the Internet of Things system.
[0100] In some embodiments, the upgrade task information is set in advance and can be set when the terminal device is not online. Receive the user's input operation on the upgrade package information and the upgrade package, and receive the user's input on the task notification method. There are two types of task notification methods, one is active notification and the other is no notification. The task upgrade information may include upgrade package information, and the upgrade package information includes the upgrade package size, upgrade package version number and upgrade package verification code. Here, the upgrade package verification code may be an MD5 code, which is used to verify the integrity of the upgrade package.
[0101] In some embodiments, when the terminal device successfully logs into the Internet of Things system, a connection between the terminal device and the Internet of Things system is established. The connection method may be through Lwm2m or MQTT protocol connection.
[0102] S120: When the Internet of Things system detects the upgrade task information corresponding to the device name of the terminal device and the task notification method is active notification, the Internet of Things system sends an upgrade command to the terminal device.
[0103] In some embodiments, the IoT system includes an OTA command service module. When the IoT system detects upgrade task information corresponding to the device name of the terminal device and the task notification method is active notification, the OTA command service module is used to send an upgrade command to the terminal device.
[0104] In some embodiments, when the Internet of Things system detects upgrade task information corresponding to the device name of the terminal device and the task notification method is active notification, it means that the Internet of Things system includes an upgrade task for the terminal device. When a connection is established between the terminal device and the Internet of Things system, the Internet of Things system sends an upgrade command to the terminal device.
[0105] In some embodiments, the upgrade command may be a field. For example, the upgrade command is "upgrade task exists".
[0106] As an example, when an IoT terminal device is connected to the OneNET IoT platform (the OneNET IoT platform currently provides mainstream access protocols such as Lwm2m and MQTT), the OneNET IoT platform will match the terminal device with the upgrade task information in the batch-created over-the-air upgrade tasks according to the device name; if so, it will send an upgrade command to the terminal device. The upgrade task information can carry information such as the upgrade package version, upgrade package size, upgrade package expiration time, upgrade required power, upgrade required storage space, etc.
[0107] S130: The terminal device sends a download request to the Internet of Things system.
[0108] In some embodiments, after receiving the upgrade command, the terminal device establishes an HTTP protocol connection with the Internet of Things system. The Internet of Things system includes an OTA file management service module, and the OTA file management service module stores the upgrade package. The terminal device sends a download request to the OTA file management service module.
[0109] S140. The Internet of Things system sends an upgrade package corresponding to the upgrade package information to the terminal device.
[0110] In some embodiments, the OTA file management service module sends the upgrade package corresponding to the upgrade package information in the detected upgrade task information to the terminal device.
[0111] S150. The terminal device is upgraded using the upgrade package.
[0112] In some embodiments, the upgrade includes an OTA firmware upgrade. The OTA firmware upgrade function can not only update the firmware, but also reconfigure the on-chip hardware resources. At the same time, the device firmware can obtain updated patches and more security algorithms to prevent virus attacks through the OTA firmware upgrade process. Firmware upgrades include upgrades to drivers, systems, functions, applications, etc.
[0113] In this way, even if the terminal device is not online, the IoT system can establish an upgrade task in advance. When the terminal device logs in to the IoT system, as long as the IoT system detects that there is upgrade task information, it will send an upgrade command to the terminal device and send the upgrade package to the terminal device to complete the upgrade of the terminal device. When a large number of terminal devices need to be upgraded, the terminal devices do not need to wait online all the time, nor do they need to create new upgrade tasks, which saves time and electricity, improves upgrade efficiency, and enhances user experience.
[0114] Based on this, in some embodiments, such as Figure 2 As shown, before the above S130, the method may further include:
[0115] S121. The terminal device sends a query request to the Internet of Things system, where the query request includes a device name of the terminal device;
[0116] S122. The Internet of Things system sends upgrade task information to the terminal device.
[0117] In some embodiments, the IoT system includes an OTA task management service module. On the premise that the terminal device and the IoT system establish an HTTP connection, the terminal device sends a query request to the OTA task management service module to query the upgrade task information in the IoT system. The OTA task management service module sends the upgrade task information to the terminal device.
[0118] In this way, the upgrade task information is sent to the terminal device, so that the user can view the upgrade task information of the upgrade task through the terminal device.
[0119] Based on this, in some embodiments, the download request includes the data range of the data in the upgrade package; after the above S122, the method may further include:
[0120] The terminal device determines the size of the fragment upgrade package according to the ratio of the upgrade package size to the memory information;
[0121] The terminal device determines the data range of the data in the upgrade package according to the size of the fragment upgrade package;
[0122] The above S140 may specifically include:
[0123] The IoT system sends data corresponding to the data range in an upgrade package corresponding to the upgrade task information to the terminal device;
[0124] The above S150 may specifically include:
[0125] When the terminal device receives all the data in the upgrade package, the terminal device uses the upgrade package to perform the upgrade.
[0126] In some embodiments, the terminal device determines the size of the slice upgrade package according to the ratio of the upgrade package size to the memory information. The memory information can be the flash size of the terminal device itself, and the size of the slice upgrade package needs to be smaller than the flash size of the terminal device itself. For example, if the flash size of stm32 is 64K, it is recommended to download a slice upgrade package of 50K bytes each time.
[0127] In some embodiments, the terminal device determines the data range of the data in the upgrade package based on the size of the segmented upgrade package, and the download request includes the data range of the data in the upgrade package. As an example, the data range can be represented by the Range field: Range = start-end. The settings are as follows: (1) Range = start-, that is, obtain the data from the start+1 byte to the last byte of the data in the upgrade package; for example: Range = 0-, obtain all data. Range = 2-, obtain the data from the 3rd to the last byte of the data in the upgrade package. Note: If start>=the total length of the data in the upgrade package, start=0 by default. (2) Range = start-end, obtain the data from the start+1 byte to the end+1 byte of the data in the upgrade package; for example: Range = 0-99, obtain the first 100 bytes of the data in the upgrade package. Note: end>=the total length of the data in the upgrade package, len, then end=len-1 by default; start>end, start is set to 0. (3) Range = -end, get the last end bytes of data in the upgrade package; for example: Range = -100, get the last 100 bytes of data in the upgrade package. Note: If end> the total length of the data in the upgrade package, len, then end = len by default (get all the data in the upgrade package). (4) If Range does not exist in the download request, or Range is not configured according to the above rules, it is considered to return all the data in the upgrade package. (5) Range: 01-02, considered as 1-2 bytes of data in the upgrade package.
[0128] In this way, when the upgrade package is large, the upgrade package can be transmitted in fragments according to the terminal device's own memory information, reducing the pressure of data transmission.
[0129] Based on this, in some embodiments, the method may further include:
[0130] When the terminal device successfully logs in to the IoT system, the IoT system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is not to notify, the terminal device sends a query request to the IoT system at a preset time, and the query request includes the device name of the terminal device;
[0131] The IoT system sends upgrade task information to the terminal device;
[0132] The terminal device sends a download request to the IoT system;
[0133] The IoT system sends an upgrade package corresponding to the upgrade task information to the terminal device;
[0134] The terminal device is upgraded using the upgrade package.
[0135] In some embodiments, the preset time is set in advance. When the terminal device logs in to the Internet of Things system, that is, the terminal device is online, and the terminal device does not implement Lwm2m / MQTT to connect to the Internet of Things system, the terminal device needs to poll the Internet of Things system. It should be noted that when the task notification mode is not to notify, the terminal device does not implement Lwm2m / MQTT to connect to the Internet of Things system. The terminal device will send a query request to the Internet of Things system at the preset time according to the set preset time.
[0136] In some embodiments, the query request includes the device name of the terminal device, and when the IoT system receives the query request, it sends the upgrade task information to the terminal device corresponding to the device name in the query request. In this way, for the upgrade task information whose task notification mode is not to notify, the upgrade task information can be obtained by the terminal device in a polling manner.
[0137] Based on this, in some embodiments, the query request also includes the version number of the terminal device; before the Internet of Things system sends the upgrade task information to the terminal device, the method may also include:
[0138] The IoT system compares the version number of the terminal device with the version number of the upgrade package;
[0139] The IoT system sends upgrade task information to the terminal device, including:
[0140] When the version number of the terminal device is inconsistent with the version number of the upgrade package, the IoT system sends the upgrade task information to the terminal device.
[0141] In some embodiments, Figure 3 As shown, the terminal device establishes an HTTP connection with the IoT system. The terminal device sends a query request to the IoT system, and the query request includes the device name of the terminal device and the version number of the terminal device. The IoT system detects whether there is upgrade task information. When the IoT system detects the upgrade task information corresponding to the device name, it compares the version number of the terminal device and the version number of the upgrade package. When the version number of the terminal device and the version number of the upgrade package are inconsistent, the IoT system returns the upgrade task information to the terminal device; when the version number of the terminal device and the version number of the upgrade package are consistent, it means that the terminal device has completed the upgrade task and does not need to be upgraded again. The IoT system can return the preset field to the terminal device. When the IoT system does not detect the upgrade task information corresponding to the device name, it means that the upgrade task information of the terminal device corresponding to the device name does not exist in the IoT system, and the IoT system can return the preset field to the terminal device. For example, the preset field is "no task exists".
[0142] In this way, the version number is used to determine whether the terminal device has completed the upgrade. If the terminal device has not completed the upgrade through offline upgrade or other methods, the Internet of Things system will upgrade the terminal device.
[0143] Based on this, in some embodiments, before the Internet of Things system sends the upgrade package corresponding to the upgrade package information to the terminal device, the method may further include:
[0144] The IoT system uses the upgrade package information to verify whether the upgrade package is complete;
[0145] The IoT system sends an upgrade package corresponding to the upgrade package information to the terminal device, including:
[0146] When the upgrade package is complete, the IoT system sends the upgrade package corresponding to the upgrade package information to the terminal device.
[0147] In some embodiments, the upgrade task information is set in advance. The upgrade task information can be input by the user. The user selects the remote upgrade service, and the terminal device can be upgraded according to the upgrade task information and the upgrade package. The upgrade task information includes the upgrade package information, and may also include the task expiration time. If the upgrade time of the terminal device exceeds the task expiration time, the terminal device cannot be upgraded using the upgrade package. The upgrade task information may also include product information and device information. The upgrade task information may also include custom information, which may include but is not limited to upgrade strategies, retry strategies, etc. When receiving the user's confirmation input, the Internet of Things system obtains the upgrade task information, task notification method and upgrade package corresponding to the device name, and creates a task.
[0148] In some embodiments, the IoT system uses the upgrade package size and the upgrade package verification code to verify whether the upgrade package is complete. The upgrade package verification code may be an MD5 code.
[0149] This prevents the IoT system from transmitting incomplete upgrade packages to terminal devices, causing upgrade failures.
[0150] Based on this, in some embodiments, before the terminal device is upgraded using the upgrade package, the method may further include:
[0151] Use the upgrade package information to verify whether the upgrade package is complete;
[0152] The terminal device is upgraded using the upgrade package, including:
[0153] If the upgrade package is complete, use it to upgrade.
[0154] In some embodiments, the terminal device verifies whether the upgrade package is complete using the upgrade package size and the upgrade package verification code, which may be an MD5 code.
[0155] In this way, the terminal device is prevented from upgrading using an incomplete upgrade package, which would cause upgrade failure and waste of resources.
[0156] Based on this, in some embodiments, the terminal device sends a download request to the Internet of Things system, including:
[0157] When the power of the terminal device is greater than a first preset value, the storage space is greater than the upgrade package size, and the signal is greater than a second preset value, the terminal device sends a download request to the Internet of Things system.
[0158] In some embodiments, Figure 4 As shown, when the terminal device receives the upgrade command sent by the IoT system, it needs to determine whether the power is sufficient, the storage space is sufficient, and the signal strength is sufficient. When the power of the terminal device is greater than the first preset value, the storage space is greater than the upgrade package size, and the signal is greater than the second preset value, the terminal device sends a download request to the IoT system to pull the upgrade package, otherwise it reports to the IoT system that the upgrade has failed. Here, the upgrade command can be an OTA task command.
[0159] In some embodiments, the first preset value and the second preset value are determined in advance and are both values input by the user.
[0160] In this way, when the power, storage space and signal conditions are met, the terminal device will send a download request to the IoT system to obtain the upgrade package for upgrading, thereby increasing the upgrade efficiency.
[0161] Based on this, in some embodiments, the method may further include:
[0162] The terminal device sends the upgrade progress and results to the IoT system.
[0163] In some embodiments, the upgrade progress can be a percentage progress, which is the number of bytes downloaded (that the terminal device has received) divided by the total number of bytes in the upgrade package. After the download is complete, the terminal device is upgraded and sends the upgrade result to the IoT system. The upgrade result can be a status code. There is a corresponding relationship between the upgrade result and the status code, and the corresponding relationship can be set in advance. For example, the corresponding relationship between the upgrade result and the status code is shown in Table 1. If the download or upgrade fails, the status code will reflect the reason for the failure.
[0164] Table 1
[0165] 101 The upgrade package was downloaded successfully 102 Download failed, insufficient space 103 Download failed, memory overflow 104 Download failed. Download request timed out. 105 Download failed, low battery 106 Download failed, poor signal 107 Download failed, unknown exception 201 Upgrade Successfully 202 Upgrade failed, low battery 203 Upgrade failed, memory overflow 204 Upgrade failed, unknown exception
[0166] In this way, the IoT system can also obtain the upgrade progress and results, so that users can obtain the upgrade status.
[0167] In the embodiments provided in the present application, the terminal device may be a terminal device that meets the preset conditions. There is a corresponding relationship between the terminal device and the upgrade package. When the upgrade package is set in advance, the terminal device corresponding to the upgrade package is also determined. Then, the terminal device to be upgraded is selected according to the version number of the terminal device. When the version number of the terminal device is consistent with the version number of the upgrade package, the terminal device also does not meet the preset conditions. The Internet of Things system can determine whether the terminal device needs to be upgraded based on the version number of the upgrade device and the version number of the upgrade package, configure different modes of automatic addition strategies, reduce the operation of adding upgrade tasks for different devices, and simplify the OTA upgrade process.
[0168] It should be noted that if Figure 5 As shown, the Internet of Things system 200 includes an OTA command service module 210, an OTA task management service module 220 and an OTA file management service 230. The OTA command service module is used to send an upgrade command to the terminal device. On the premise that the terminal device and the Internet of Things system establish an HTTP connection, the terminal device sends a query request to the OTA task management service module to query the upgrade task information in the Internet of Things system. The OTA task management service module sends the upgrade task information to the terminal device. The upgrade package is saved in the OTA file management service module. The terminal device sends a download request to the OTA file management service module.
[0169] Based on the device upgrade method provided in the above embodiment, the present application also provides a specific implementation of the device upgrade device. Please refer to the following embodiment.
[0170] See also Figure 6 The device upgrade device 300 provided in the embodiment of the present application is applied to an Internet of Things system, including:
[0171] The detection module 310 includes, when the terminal device successfully logs into the IoT system, detecting whether the upgrade task information corresponding to the device name of the terminal device is included, the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code;
[0172] The sending module 320 is used to send an upgrade command to the terminal device when the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is active notification;
[0173] The receiving module 330 is used to receive a download request sent by the terminal device when the terminal device receives an upgrade command;
[0174] The sending module 320 is further used to send the upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can upgrade using the upgrade package.
[0175] Based on this, in some embodiments, the receiving module 330 may be specifically used for:
[0176] When the terminal device receives the upgrade command, receiving a query request from the terminal device, the query request includes a device name of the terminal device;
[0177] Sending upgrade task information to the terminal device;
[0178] When the terminal device receives the upgrade task information, a download request sent by the terminal device is received.
[0179] Based on this, in some embodiments, the download request includes the data range of the data in the upgrade package;
[0180] The receiving module 330 may be specifically used for:
[0181] When the terminal device receives the upgrade task information, determines the size of the segmented upgrade package according to the ratio of the upgrade package size to the memory information, and determines the data range of the data in the upgrade package according to the size of the segmented upgrade package, receives the download request sent by the terminal device;
[0182] The sending module 320 can be specifically used for:
[0183] The data corresponding to the data range in the upgrade package corresponding to the upgrade package information is sent to the terminal device, so that the terminal device can use the upgrade package to upgrade when receiving all the data in the upgrade package.
[0184] Based on this, in some embodiments, the apparatus 300 may further include:
[0185] The receiving module 330 is further configured to, when the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is not to notify, receive a query request sent by the terminal device at a preset time, the query request including the device name of the terminal device;
[0186] The sending module 320 is further used to send the upgrade task information to the terminal device;
[0187] The receiving module 330 is further configured to receive a download request sent by the terminal device when the terminal device receives the upgrade task information;
[0188] The sending module 320 is further used to send the upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can upgrade using the upgrade package.
[0189] Based on this, in some embodiments, the query request also includes a version number of the terminal device; the apparatus 300 may further include:
[0190] A comparison module, used to compare the version number of the terminal device and the version number of the upgrade package before sending the upgrade task information to the terminal device;
[0191] The sending module 320 can be specifically used for:
[0192] When the version number of the terminal device is inconsistent with the version number of the upgrade package, the upgrade task information is sent to the terminal device.
[0193] Based on this, in some embodiments, the apparatus 300 may further include:
[0194] A verification module, used to verify whether the upgrade package is complete using the upgrade package information before sending the upgrade package corresponding to the upgrade package information to the terminal device;
[0195] The sending module 320 can be specifically used for:
[0196] When the upgrade package is complete, the upgrade package corresponding to the upgrade package information is sent to the terminal device.
[0197] Based on this, in some embodiments, the receiving module 330 can be specifically used to:
[0198] When the terminal device receives the upgrade task information, and the power of the terminal device is greater than the first preset value, the storage space is greater than the upgrade package size, and the signal is greater than the second preset value, a download request sent by the terminal device is received.
[0199] Based on this, in some embodiments, the apparatus 300 may further include:
[0200] The receiving module 330 is used to receive the upgrade progress and upgrade result sent by the terminal device.
[0201] See also Figure 7 The device upgrade device 400 provided in the embodiment of the present application is applied to a terminal device, and includes:
[0202] The receiving module 410 is used to receive the upgrade command sent by the Internet of Things system when the terminal device successfully logs in to the Internet of Things system and the Internet of Things system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is active notification, wherein the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code;
[0203] A sending module 420, used to send a download request to the Internet of Things system;
[0204] The receiving module 410 is further used to receive an upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0205] The upgrade module 430 is used to perform upgrade using an upgrade package.
[0206] Based on this, in some embodiments, the apparatus 400 may further include:
[0207] The sending module 420 is further used to send a query request to the Internet of Things system, where the query request includes a device name of the terminal device;
[0208] The receiving module 410 is used to receive the upgrade task information sent by the Internet of Things system.
[0209] Based on this, in some embodiments, the download request includes the data range of the data in the upgrade package; the apparatus 400 may further include:
[0210] A determination module, configured to determine the size of the shard upgrade package according to the ratio of the upgrade package size to the memory information after receiving the upgrade task information sent by the IoT system;
[0211] The determination module is also used to determine the data range of the data in the upgrade package according to the size of the shard upgrade package;
[0212] The receiving module 410 may be specifically used for:
[0213] Receive data corresponding to the data range in the upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0214] The upgrade module 430 can be specifically used for:
[0215] When all data in the upgrade package is received, the upgrade is performed using the upgrade package.
[0216] Based on this, in some embodiments, the apparatus 400 may further include:
[0217] The sending module 420 is further configured to send a query request to the Internet of Things system at a preset time when the terminal device successfully logs into the Internet of Things system, the Internet of Things system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is not to notify, and the query request includes the device name of the terminal device;
[0218] The receiving module 410 is further used to receive the upgrade task information sent by the Internet of Things system;
[0219] The sending module 420 is further used to send a download request to the Internet of Things system;
[0220] The receiving module 410 is further used to receive an upgrade package corresponding to the upgrade task information sent by the Internet of Things system;
[0221] The upgrade module 430 is further used to perform upgrade using an upgrade package.
[0222] Based on this, in some embodiments, it is characterized in that the apparatus 400 may further include:
[0223] A verification module is used to verify whether the upgrade package is complete using the upgrade package information before using the upgrade package for upgrading;
[0224] The upgrade module 430 can be specifically used for:
[0225] If the upgrade package is complete, use it to upgrade.
[0226] Based on this, in some embodiments, the sending module 420 may be specifically used for:
[0227] When the power of the terminal device is greater than a first preset value, the storage space is greater than the upgrade package size, and the signal is greater than a second preset value, a download request is sent to the Internet of Things system.
[0228] Based on this, in some embodiments, the apparatus 400 may further include:
[0229] The sending module 420 is also used to send the upgrade progress and upgrade results to the Internet of Things system.
[0230] The various modules of the upgrading device of the equipment provided in the embodiment of the present application can realize the functions of the various steps of the upgrading method of the equipment provided above and achieve the corresponding technical effects. For the sake of concise description, they will not be repeated here.
[0231] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.
[0232] Figure 8 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0233] The electronic device may include a processor 801 and a memory 802 storing computer program instructions.
[0234] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0235] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.
[0236] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present disclosure.
[0237] The processor 801 implements any device upgrade method in the above embodiments by reading and executing computer program instructions stored in the memory 802 .
[0238] In one example, the electronic device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.
[0239] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0240] The bus 810 includes hardware, software or both, and couples the components of the electronic device to each other. For example, but not limitation, the bus may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a front side bus (Front Side Bus, FSB), a hypertransport (Hyper Transport, HT) interconnection, an industry standard architecture (Industry Standard Architecture, ISA) bus, an infinite bandwidth interconnection, a low pin count (Linear Predictive Coding, LPC) bus, a memory bus, a micro channel architecture (MicroChannel Architecture, MCA) bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) bus, a video electronics standard association local (VESA Local Bus, VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 810 may include one or more buses. Although the embodiments of the present application describe and illustrate a specific bus, the present application considers any suitable bus or interconnection. The electronic device can execute the device upgrade method in the embodiments of the present invention, thereby realizing the above-mentioned device upgrade method.
[0241] In addition, in combination with the device upgrade method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any device upgrade method in the above embodiment is implemented.
[0242] The present application also provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes each process of an embodiment of an upgrade method for implementing any of the above-mentioned devices.
[0243] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0244] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (Read-Only Memory, ROM), flash memory, erasable read-only memory (Erasable ReadOnly Memory, EROM), floppy disks, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical discs, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0245] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0246] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0247] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for upgrading a device, characterized in that: Applied to IoT systems, including: When the terminal device successfully logs into the IoT system, detecting whether the upgrade task information corresponding to the device name of the terminal device is included, the upgrade task information includes upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code; When the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is active notification, sending an upgrade command to the terminal device; When the terminal device receives the upgrade command, receiving a download request sent by the terminal device; An upgrade package corresponding to the upgrade package information is sent to the terminal device, so that the terminal device can upgrade using the upgrade package.
2. The device upgrade method according to claim 1, characterized in that: In the case where the terminal device receives the upgrade command, receiving a download request sent by the terminal device includes: In the case where the terminal device receives the upgrade command, receiving a query request from the terminal device, the query request including a device name of the terminal device; Sending the upgrade task information to the terminal device; When the terminal device receives the upgrade task information, a download request sent by the terminal device is received.
3. The device upgrade method according to claim 2, characterized in that: The download request includes a data range of the data in the upgrade package; When the terminal device receives the upgrade task information, receiving the download request sent by the terminal device includes: When the terminal device receives the upgrade task information, determines the size of the segment upgrade package according to the ratio of the upgrade package size to the memory information, and determines the data range of the data in the upgrade package according to the size of the segment upgrade package, receiving a download request sent by the terminal device; The sending the upgrade package corresponding to the upgrade package information to the terminal device includes: The data corresponding to the data range in the upgrade package corresponding to the upgrade package information is sent to the terminal device, so that the terminal device can use the upgrade package for upgrading when receiving all the data in the upgrade package.
4. The device upgrade method according to claim 1, characterized in that: Also includes: When the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is not to notify, receiving a query request sent by the terminal device at a preset time, the query request including the device name of the terminal device; Sending the upgrade task information to the terminal device; When the terminal device receives the upgrade task information, receiving a download request sent by the terminal device; An upgrade package corresponding to the upgrade package information is sent to the terminal device, so that the terminal device can upgrade using the upgrade package.
5. The device upgrade method according to any one of claims 2 to 4, characterized in that: The query request also includes a version number of the terminal device; before sending the upgrade task information to the terminal device, the method also includes: Comparing the version number of the terminal device with the version number of the upgrade package; The sending the upgrade task information to the terminal device includes: When the version number of the terminal device is inconsistent with the version number of the upgrade package, the upgrade task information is sent to the terminal device.
6. The device upgrade method according to any one of claims 1 to 4, characterized in that: Before sending the upgrade package corresponding to the upgrade package information to the terminal device, the method further includes: Using the upgrade package information to verify whether the upgrade package is complete; The sending the upgrade package corresponding to the upgrade package information to the terminal device includes: When the upgrade package is complete, the upgrade package corresponding to the upgrade package information is sent to the terminal device.
7. The device upgrade method according to any one of claims 2 to 4, characterized in that: In the case where the terminal device receives the upgrade task information, receiving a download request sent by the terminal device includes: When the terminal device receives the upgrade task information, and the power of the terminal device is greater than a first preset value, the storage space is greater than the upgrade package size, and the signal is greater than a second preset value, a download request sent by the terminal device is received.
8. The device upgrade method according to claim 1, characterized in that: Also includes: Receive the upgrade progress and upgrade result sent by the terminal device.
9. A method for upgrading a device, characterized in that: Applied to terminal equipment, including: When the terminal device successfully logs into the Internet of Things system, the Internet of Things system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is active notification, receiving the upgrade command sent by the Internet of Things system, the upgrade task information includes the upgrade package information, and the upgrade package information includes the upgrade package size, the upgrade package version number and the upgrade package verification code; Sending a download request to the Internet of Things system; Receiving an upgrade package corresponding to the upgrade task information sent by the Internet of Things system; The upgrade package is used for upgrading.
10. The device upgrade method according to claim 9, characterized in that: Before sending the download request to the Internet of Things system, the method further includes: Sending a query request to the Internet of Things system, wherein the query request includes a device name of the terminal device; Receive the upgrade task information sent by the Internet of Things system.
11. The device upgrade method according to claim 10, characterized in that: The download request includes a data range of the data in the upgrade package; after receiving the upgrade task information sent by the Internet of Things system, the method further includes: Determine the size of the shard upgrade package according to the ratio of the upgrade package size to the memory information; Determine the data range of the data in the upgrade package according to the size of the shard upgrade package; The receiving an upgrade package corresponding to the upgrade task information sent by the Internet of Things system includes: Receiving data corresponding to the data range in an upgrade package corresponding to the upgrade task information sent by the Internet of Things system; The step of upgrading by using the upgrade package comprises: When all data in the upgrade package is received, the upgrade is performed using the upgrade package.
12. The device upgrade method according to claim 9, characterized in that: Also includes: When the terminal device successfully logs into the Internet of Things system, the Internet of Things system detects the upgrade task information corresponding to the device name of the terminal device, and the task notification mode is not to notify, a query request is sent to the Internet of Things system at a preset time, and the query request includes the device name of the terminal device; Receiving the upgrade task information sent by the Internet of Things system; Sending a download request to the Internet of Things system; Receiving an upgrade package corresponding to the upgrade task information sent by the Internet of Things system; The upgrade package is used for upgrading.
13. The device upgrade method according to any one of claims 10 to 12, characterized in that: Before using the upgrade package to perform the upgrade, the method further includes: Using the upgrade package information to verify whether the upgrade package is complete; The step of upgrading by using the upgrade package comprises: When the upgrade package is complete, the upgrade is performed using the upgrade package.
14. The device upgrade method according to any one of claims 10 to 12, characterized in that: The sending a download request to the Internet of Things system includes: When the power level of the terminal device is greater than a first preset value, the storage space is greater than the upgrade package size, and the signal is greater than a second preset value, a download request is sent to the Internet of Things system.
15. The device upgrade method according to any one of claim 9, characterized in that: Also includes: Send the upgrade progress and upgrade results to the Internet of Things system.
16. An equipment upgrading device, characterized in that: Applied to IoT systems, including: A detection module, comprising, when a terminal device successfully logs into the Internet of Things system, detecting whether upgrade task information corresponding to the device name of the terminal device is included, the upgrade task information including upgrade package information, the upgrade package information including upgrade package size, upgrade package version number and upgrade package verification code; A sending module, configured to send an upgrade command to the terminal device when the upgrade task information corresponding to the device name of the terminal device is detected and the task notification mode is active notification; A receiving module, configured to receive a download request sent by the terminal device when the terminal device receives the upgrade command; The sending module is further used to send the upgrade package corresponding to the upgrade package information to the terminal device, so that the terminal device can use the upgrade package to upgrade.
17. An equipment upgrading device, characterized in that: Applied to terminal equipment, including: A receiving module, configured to receive an upgrade command sent by the Internet of Things system when the terminal device successfully logs in to the Internet of Things system, the Internet of Things system detects upgrade task information corresponding to the device name of the terminal device, and the task notification mode is active notification, wherein the upgrade task information includes upgrade package information, and the upgrade package information includes upgrade package size, upgrade package version number, and upgrade package verification code; A sending module, used to send a download request to the Internet of Things system; The receiving module is further used to receive an upgrade package corresponding to the upgrade task information sent by the Internet of Things system; An upgrade module is used to perform an upgrade using the upgrade package.
18. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for upgrading the device according to any one of claims 1 to 8 or the method for upgrading the device according to any one of claims 9 to 15 is implemented.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for upgrading the device according to any one of claims 1 to 8 or the method for upgrading the device according to any one of claims 9 to 15 is implemented.
