Device upgrade method, terminal device, electronic device and storage medium

By using communication units to acquire and store upgrade packages in IoT devices and using differential block data to perform minimum differentiated upgrades, the problem of excessive resource occupation in the existing technology is solved, and more efficient equipment upgrades are achieved.

CN112015458BActive Publication Date: 2024-11-05ABUP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010773468.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-04
Publication Date
2024-11-05
Estimated Expiration
2040-08-04

Smart Images

  • Figure CN112015458B_ABST
    Figure CN112015458B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of Internet of Things, and discloses a device upgrade method, terminal device, electronic device and storage medium. In the present invention, the upgrade package of the functional unit to be upgraded is obtained through the communication unit; the upgrade package is stored in the memory space of the communication unit; and the functional unit to be upgraded is upgraded through the communication unit according to the upgrade package. The upgrade of each unit is realized in the communication unit with richer resources, so as to save the resources of other units and improve the upgrade speed of the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of Internet of Things, and in particular to a device upgrading method, a terminal device, an electronic device and a storage medium. Background Art

[0002] The Internet of Things, or "Internet of Everything", is an extension and expansion of the Internet. It is a huge network formed by combining various information sensor devices with the Internet. These IoT devices composed of information sensors usually have small memory space and more power consumption restrictions. During the use of IoT devices, they must be upgraded in order to update their functions. The existing IoT device upgrade method is generally to upgrade each component unit separately, using different upgrade logics, and downloading upgrade packages to each component unit.

[0003] The inventors have found that there are at least the following problems in the prior art: each unit of a device uses a different upgrade method to upgrade, and each unit downloads the upgrade package to the corresponding component unit, which occupies a lot of resources and space in the component units of the IoT device. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a device upgrade method, terminal device, electronic device and storage medium, which can realize the upgrade of each unit in a communication unit with richer resources, effectively save the resources of other units, and improve the upgrade speed of the device.

[0005] To solve the above technical problems, an embodiment of the present invention provides a device upgrading method, comprising the following steps:

[0006] Acquire the upgrade package of the functional unit to be upgraded through the communication unit;

[0007] Storing the upgrade package in the memory space of the communication unit;

[0008] The functional unit to be upgraded is upgraded through the communication unit according to the upgrade package.

[0009] An embodiment of the present invention further provides a terminal device, including:

[0010] A receiving module, used for obtaining an upgrade package of the functional unit to be upgraded through the communication unit;

[0011] A storage module, used for storing the upgrade package in the memory space of the communication unit;

[0012] An upgrading module is used to upgrade the functional unit to be upgraded through the communication unit according to the upgrading package.

[0013] An embodiment of the present invention further provides an electronic device, including:

[0014] at least one processor; and,

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the device upgrade methods.

[0017] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, including: when the computer program is executed by a processor, implementing any one of the device upgrade methods.

[0018] Compared with the prior art, the embodiments of the present invention store the upgrade packages of different functional units in the communication unit, thereby avoiding occupying the storage space of other functional units; converting the data of the functional units to be upgraded into differential block data, realizing minimum differential upgrade, reducing the workload of upgrade, and accelerating the speed of equipment upgrade; since the present invention can be applied to the upgrade of all functional units, the upgrade logic of each functional unit is unified, and the upgrade process is placed in the communication unit with richer resources, saving resources and space of other units, making the upgrade more efficient and faster.

[0019] In addition, in the device upgrade method provided by the embodiment of the present invention, the acquisition of the upgrade package of the functional unit to be upgraded specifically includes: acquiring the upgrade package through the communication unit; marking the acquisition process to generate a marking point; when the acquisition process is interrupted, continuing the acquisition operation from the marking point after the acquisition is resumed. By setting the marking point, the device does not need to worry about wasting too much time on retransmission when transmission is interrupted. After the transmission starts again, the transmission can be continued from the marking point, which saves the transmission process and reduces the transmission time.

[0020] In addition, in the device upgrade method provided by the embodiment of the present invention, the acquisition of the upgrade package of the functional unit to be upgraded through the communication unit includes: sending a registration information query request of the functional unit to be upgraded; receiving the returned registration information; sending an upgrade version query request of the functional unit to be upgraded; receiving the information of the upgraded version; sending an acquisition request of the upgrade package of the functional unit to be upgraded; receiving the upgrade package. By acquiring the information of the functional unit to be upgraded and the information of the upgraded functional unit, a symbol table containing comparison information can be generated in subsequent steps based on the acquired information, and the difference part can be finally upgraded through the symbol table, thereby improving the upgrade speed.

[0021] In addition, in the device upgrade method provided by the embodiment of the present invention, the upgrading of the functional unit to be upgraded through the communication unit according to the upgrade package includes: obtaining differential block data through the communication unit, wherein the differential block data is data of the functional unit to be upgraded, which is different from the data of the upgraded functional unit; and the communication unit upgrades the functional unit to be upgraded according to the differential block data and the upgrade package. The upgrading of the functional unit according to the generated differential block data and the upgrade package is an upgrading method that only upgrades the difference part, which reduces the time for the communication unit to upgrade the functional unit.

[0022] In addition, the device upgrade method provided by the embodiment of the present invention, wherein the differential block data is obtained through the communication unit, specifically includes: obtaining the upgrade version information through the communication unit; generating a symbol table through the communication unit, wherein the symbol table includes comparison information between the upgrade version information and the version information of the functional unit to be upgraded; obtaining the differential block data according to the symbol table; obtaining the differential block data through the symbol table generated by the obtained version information, so that the functional unit can achieve minimum differential upgrade, thereby improving the efficiency of the communication unit in upgrading the functional unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0024] Figure 1 The process of the device upgrade method provided according to the first embodiment is Figure 1 ;

[0025] Figure 2 The process of the device upgrade method provided according to the first embodiment is Figure 2 ;

[0026] Figure 3 The process of the device upgrade method provided according to the first embodiment is Figure 3 ;

[0027] Figure 4 is a schematic structural diagram of an external device terminal provided according to a third embodiment;

[0028] Figure 5 is a schematic structural diagram of an electronic device provided according to a fourth embodiment. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the following will be described in detail with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the various embodiments of the present invention, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0030] The following embodiments are divided for the convenience of description and shall not constitute any limitation on the specific implementation of the present invention. The embodiments may be combined with each other and referenced to each other without contradiction.

[0031] The first embodiment of the present invention relates to a device upgrade method, which is applied to an electronic device, wherein the electronic device includes: two or more functional units, and the functional units at least include a communication unit. The specific process is as follows Figure 1 As shown, including:

[0032] Step 101: Obtain an upgrade package of a functional unit to be upgraded through a communication unit.

[0033] In this embodiment, the communication unit at least includes an upgrade capability module (Upgrade Agent, UA), an upgrade control module (Upgrade Control, UC) and a boot module (BootLoader).

[0034] The function of the UA module is to use the upgrade package and symbol table to upgrade the differential block data and communicate with the ELB module; the BootLoader module of the communication unit is used to boot the UA upgrade function; the UC module is used to communicate with the network platform. The network platform can be an Internet of Things platform, which is only used as an example and is not limited to the network platform.

[0035] The function unit to be upgraded at least includes an ELB module, wherein the ELB module of the function unit to be upgraded has a function of booting a startup program and a function of establishing a communication connection with the communication unit.

[0036] The above communication connection method can be a wired connection or a wireless connection, wherein the wireless connection can be WiFi, Bluetooth, infrared, etc., which will not be described one by one here.

[0037] The process of obtaining the upgrade package in step 101 is that the UC module in the communication unit interacts with the network platform, transmits the request instruction, and receives the upgrade package. Figure 2 As shown, including:

[0038] Step 201: Send a registration information query request for the functional unit to be upgraded.

[0039] Step 202: Receive the returned registration information.

[0040] Step 203: Send an upgrade version query request for the functional unit to be upgraded.

[0041] Step 204, receiving information of the upgraded version.

[0042] Step 205: Send a request for obtaining the upgrade package of the functional unit to be upgraded.

[0043] Step 206: Receive the upgrade package.

[0044] The upgrade package is downloaded from the network platform through the above steps 201-206.

[0045] In this embodiment, the acquisition process may be interrupted. The reasons for the interruption may be poor network signal, network signal interruption, power outage, etc. This is just an example. In the actual process, there are many other reasons for the interruption, which will not be described one by one here.

[0046] In order to prevent repeated transmission after the interruption cause is eliminated, the breakpoint marking method is adopted.

[0047] Specifically, when an acquisition interruption occurs, the acquisition process is marked to generate a mark point, and the acquisition operation is continued from the mark point after recovery. There are two ways to mark the acquisition process to generate a mark point:

[0048] One is to track the entire acquisition process, mark the current acquisition reception progress and generate a marking point regardless of whether there is an interruption.

[0049] The other is that when an interruption occurs, an instruction indicating that an error has occurred is popped up, and the current acquisition and receiving progress is marked according to the instruction to generate a marking point.

[0050] Of course, the above two methods are only specific examples. In actual use, the acquisition process can also be marked to generate marking points in other ways, which will not be described here one by one.

[0051] It should be noted that the process of obtaining the breakpoint mark can be the process of receiving registration information, the process of receiving upgrade version information, the process of receiving upgrade package, and the process of obtaining the function data to be upgraded mentioned in the following steps, etc., which will not be described one by one here.

[0052] Step 102: store the upgrade package in the memory space of the communication unit.

[0053] Step 103: upgrading the functional unit to be upgraded through the communication unit according to the upgrade package.

[0054] In this implementation, the upgrade method of step 103 is specifically as follows:

[0055] After the upgrade package is downloaded, the UC module reports the download result to the network platform.

[0056] The UC module sends an upgrade request to the functional unit to be upgraded.

[0057] The UC module receives the returned upgrade instruction.

[0058] The UC module forwards the upgrade command to the Bootloader module.

[0059] The communication unit guides the execution of the UA module upgrade function through the boot function of the Bootloader module.

[0060] At the same time, the functional unit to be upgraded enters the upgrade program through the boot function of the ELB module, wherein the upgrade program includes receiving flashing, restarting and upgrading, etc.

[0061] Specifically, the specific process of executing the upgrade function of the UA module is as follows: Figure 3 As shown:

[0062] Step 301, obtaining data of the functional unit to be upgraded.

[0063] Step 302: Store the acquired upgraded functional unit into the memory space of the communication unit.

[0064] Step 303, obtain the symbol table.

[0065] Specifically, a symbol table is generated according to the registration information of the existing function unit to be upgraded and the upgraded version information obtained from the network platform, wherein the symbol table is a comparison table of the registration information and the version information.

[0066] Step 304, obtaining differential block data according to the symbol table.

[0067] Specifically, the UA module splits the data in the function unit to be upgraded in combination with the comparison information in the symbol table to extract differential block data, wherein the differential block data is the upgradeable part of the data of the function unit to be upgraded, and the number of differential blocks can be one or more.

[0068] Step 305: Upgrade the differential block data according to the upgrade package.

[0069] It should be noted that the upgrade data stored in the upgrade package is differential data of the upgraded version, that is, data for upgrading the differential blocks of the functional unit data to be upgraded.

[0070] After the differential block data is upgraded, a flash request is sent to the functional unit.

[0071] The UA module receives the flashing instruction returned by the functional unit and flashes the functional unit.

[0072] After the flash is completed, the next differential block data is upgraded until all differential blocks are upgraded.

[0073] The communication unit UA module sends an upgrade completion notification to the ELB module of the upgraded functional unit.

[0074] After receiving the upgrade completion notification, the ELB module of the upgraded functional unit executes the boot function of the ELB module, restarts, and completes the upgrade of the functional unit.

[0075] The ELB module of the upgraded functional unit sends the functional unit upgrade result to the UC module.

[0076] The UC module forwards the upgrade results to the network platform.

[0077] The second embodiment of the present invention relates to a device upgrade method. The second embodiment is substantially the same as the first embodiment.

[0078] The difference is that in the first embodiment, the communication unit and the function unit to be upgraded are two units, that is, the other function units are upgraded through the communication unit, while in the second embodiment, the communication unit itself is upgraded.

[0079] In this embodiment, since the upgraded functional unit is a communication unit, in the specific embodiment of step 103, there is no need to send an upgrade instruction request. After receiving and storing the upgrade package, the UA module upgrade function is directly guided by the boot function of the Bootloader module. The upgrade process of the UA module is as follows: Figure 3 Steps 301-304.

[0080] It should be noted that the acquisition object in step 301 and step 303 is the communication unit, which is different from the ELB module of the functional unit other than the communication unit in the first embodiment.

[0081] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0082] A third embodiment of the present invention relates to a peripheral terminal, such as Figure 4 As shown, including:

[0083] The receiving module 401 is used to obtain the upgrade package of the functional unit to be upgraded through the communication unit.

[0084] The storage module 402 is used to store the upgrade package in the memory space of the communication unit.

[0085] The upgrading module 403 is used to upgrade the functional unit to be upgraded through the communication unit according to the upgrading package.

[0086] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.

[0087] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.

[0088] A fourth embodiment of the present invention relates to an electronic device, such as Figure 5 As shown, including:

[0089] at least one processor 501; and,

[0090] A memory 502 is communicatively connected to at least one processor 501; wherein,

[0091] The memory 502 stores instructions that can be executed by at least one processor 501. The instructions are executed by at least one processor 501 so that the at least one processor 501 can execute the first to second device upgrade methods of embodiments of the present invention.

[0092] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus links various circuits of one or more processors and memories together. The bus can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, so they are not further described in this article. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0093] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0094] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0095] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A device upgrading method, characterized in that: Applied in an electronic device, the electronic device comprises: at least two functional units, the functional units at least comprising a communication unit, the method comprises: Acquire the upgrade package of the functional unit to be upgraded through the communication unit; Storing the upgrade package in the memory space of the communication unit; Acquire a symbol table through the functional unit to be upgraded, wherein the symbol table includes comparison information between upgrade version information and version information of the functional unit to be upgraded; Acquire differential block data according to the symbol table, wherein the differential block data is data of a portion of the functional unit to be upgraded that is different from the data of the functional unit after the upgrade; The communication unit upgrades the functional unit to be upgraded according to the differential block data and the upgrade package; Among them, the communication unit and the functional unit to be upgraded are two units, or the functional unit to be upgraded is the communication unit, and the communication unit at least includes an upgrade capability module, an upgrade control module and a boot startup module, the upgrade capability module uses the upgrade package and the symbol table to upgrade the differential block data and communicates with the ELB module, the upgrade control module is used to communicate with the network platform, and the boot startup module is used to boot and start the upgrade capability module, and the functional unit to be upgraded includes at least the ELB module, and the ELB module has a boot startup program function and a function of communicating with the communication unit.

2. The device upgrade method according to claim 1, characterized in that: The obtaining, through the communication unit, the upgrade package of the functional unit to be upgraded specifically includes: Acquire the upgrade package through the communication unit; Marking the acquisition process to generate marking points; When the acquisition process is interrupted, the acquisition operation is continued from the marked point after the acquisition is resumed.

3. The device upgrading method according to claim 1, characterized in that: The obtaining, through the communication unit, the upgrade package of the functional unit to be upgraded comprises: Sending a registration information query request for the functional unit to be upgraded; Receive the returned registration information; Sending an upgrade version query request for the functional unit to be upgraded; Receiving information about the upgraded version; Sending a request for obtaining the upgrade package of the functional unit to be upgraded; Receive the upgrade package.

4. The device upgrade method according to claim 1, characterized in that: After the functional unit to be upgraded is upgraded through the communication unit according to the upgrade package, the method further includes: After the upgrade is completed, the functional unit data is flashed; The upgraded functional unit data is sent back to the functional unit.

5. The device upgrade method according to claim 4, characterized in that: After sending the upgraded functional unit data back to the functional unit, the step further includes: receiving the upgraded functional unit data; The functional unit is restarted according to the upgraded functional unit data.

6. A terminal device, characterized in that: include: A receiving module, used for obtaining an upgrade package of a functional unit to be upgraded through a communication unit; A storage module, used for storing the upgrade package in the memory space of the communication unit; The upgrade module is used to upgrade the functional unit to be upgraded through the communication unit according to the upgrade package; wherein the upgrading of the functional unit to be upgraded through the communication unit according to the upgrade package includes: obtaining a symbol table through the functional unit to be upgraded, wherein the symbol table contains comparison information between upgrade version information and version information of the functional unit to be upgraded; obtaining differential block data according to the symbol table, wherein the differential block data is data of a portion of the functional unit to be upgraded that is different from the data of the upgraded functional unit; and upgrading the functional unit to be upgraded according to the differential block data and the upgrade package by the communication unit. The function unit to be upgraded is a communication unit, the communication unit and the function unit to be upgraded are two units, or the function unit to be upgraded is the communication unit, the communication unit at least includes an upgrade capability module, an upgrade control module and a boot module, the upgrade capability module is used to upgrade the differential block data using the upgrade package and the symbol table and communicate with the ELB module, the upgrade control module is used to communicate with the network platform, the boot module is used to boot the upgrade capability module, the function unit to be upgraded includes at least the ELB module, and the ELB module has a boot program function and a function of communicating with the communication unit.

7. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the device upgrading method as described in any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the device upgrading method according to any one of claims 1 to 5 is implemented.