CN112039697A - Method, system, device and equipment for upgrading internet of things equipment - Google Patents

Method, system, device and equipment for upgrading internet of things equipment Download PDF

Info

Publication number
CN112039697A
CN112039697A CN202010843597.1A CN202010843597A CN112039697A CN 112039697 A CN112039697 A CN 112039697A CN 202010843597 A CN202010843597 A CN 202010843597A CN 112039697 A CN112039697 A CN 112039697A
Authority
CN
China
Prior art keywords
internet
upgrading
upgrade package
fragment
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010843597.1A
Other languages
Chinese (zh)
Inventor
高岑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN202010843597.1A priority Critical patent/CN112039697A/en
Publication of CN112039697A publication Critical patent/CN112039697A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the technical field of Internet of things communication and discloses a method for upgrading Internet of things equipment. The method is applied to the side of the Internet of things equipment and comprises the following steps: sending version information to the cloud platform, and triggering the cloud platform to feed back an upgrading instruction; determining upgrade package fragment offset under the condition of receiving an upgrade instruction; acquiring the fragment content of the upgrade package according to the fragment offset of the upgrade package; and upgrading according to the fragment content of the upgrade package. The method comprises the steps that version information is sent to a cloud platform, and the cloud platform is triggered to feed back an upgrading instruction; under the condition of receiving an upgrading instruction, acquiring upgrading packet fragment content according to upgrading packet fragment offset; and upgrading according to the fragment content of the upgrade package. Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved. The application also discloses a system, a device and equipment for upgrading the Internet of things equipment.

Description

Method, system, device and equipment for upgrading internet of things equipment
Technical Field
The application relates to the technical field of communication of the Internet of things, for example, to a method, a system, a device and equipment for upgrading an Internet of things device.
Background
At present, with the wide development of the internet of things, a large amount of internet of things equipment is accessed to a network through an internet of things module. In order to meet the continuous innovation demand of the market, the internet of things equipment needs to optimize and upgrade own software in time. However, programs in the internet of things equipment are generally upgraded and managed remotely through an OTA (Over the Air) technology, but because system resources and bandwidth resources of the internet of things equipment are lacked, the traditional OTA upgrade based on the http transmission of the complex last-time protocol is not applicable to the internet of things system, and therefore the requirement for the stable and reliable upgrade of the internet of things equipment is more urgent.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art: and the upgrading reliability of the Internet of things equipment is low.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method, a system, a device and equipment for upgrading an internet of things device, so as to improve the reliability of upgrading the internet of things device.
In some embodiments, the method for upgrading the internet of things device is applied to the side of the internet of things device, and includes:
sending version information to a cloud platform, and triggering the cloud platform to feed back an upgrading instruction;
determining upgrade package fragment offset under the condition of receiving the upgrade instruction;
acquiring upgrade package fragment content according to the upgrade package fragment offset;
and upgrading according to the fragment content of the upgrade package.
In some embodiments, the determining an upgrade package fragment offset comprises:
acquiring the size of firmware fragments and the number of times of fragment requests;
and calculating by using the size of the firmware fragment and the times of the fragment request through a preset algorithm to obtain the fragment offset of the upgrade package.
In some embodiments, obtaining upgrade package fragment content according to the upgrade package fragment offset includes:
sending upgrade package fragment content request information to the cloud platform according to the upgrade package fragment offset, and triggering the cloud platform to feed back upgrade package fragment content corresponding to the upgrade package fragment content request information;
and receiving the fragment content of the upgrade package.
In some embodiments, after receiving the upgrade package fragment content, the method further includes:
checking the fragment content of the upgrade package;
and under the condition of failed verification, resending the request information of the upgrade package fragment content to the cloud platform.
In some embodiments, after determining the upgrade package fragment offset, the method further includes:
caching the upgrade package fragment offset;
and under the condition of recovering the network connection after the network disconnection occurs, acquiring the upgrade package fragment content according to the cached upgrade package fragment offset.
In some embodiments, in the case that the upgrade instruction is received, further comprising:
obtaining upgrading information corresponding to the upgrading instruction; the upgrading information comprises an upgrading identifier, the total length of an upgrading packet and a serial number of the internet of things equipment;
and storing the upgrading information.
In some embodiments, the method for upgrading the internet of things device is applied to a cloud platform side, and includes:
acquiring version information of the Internet of things equipment;
and sending an upgrading instruction to the Internet of things equipment corresponding to the version information according to the version information, triggering the Internet of things equipment to acquire the fragment content of the upgrading packet and upgrading according to the fragment content of the upgrading packet.
In some embodiments, triggering the internet of things device to obtain the upgrade package fragmented content includes:
triggering the Internet of things equipment to send request information of the fragment content of the upgrade package to the cloud platform;
and under the condition of receiving the request information of the content of the upgrade package fragment, feeding back the content of the upgrade package fragment corresponding to the request information of the content of the upgrade package fragment to the Internet of things equipment.
In some embodiments, the system for upgrading an internet of things device comprises: the system comprises an internet of things device and a cloud platform;
the internet of things equipment is used for sending version information to the cloud platform and triggering the cloud platform to feed back an upgrading instruction; determining upgrade package fragment offset under the condition of receiving the upgrade instruction; acquiring upgrade package fragment content according to the upgrade package fragment offset; upgrading according to the fragment content of the upgrade package;
the cloud platform is used for acquiring version information of the Internet of things equipment; and sending an upgrading instruction to the Internet of things equipment corresponding to the version information according to the version information, triggering the Internet of things equipment to acquire the fragment content of the upgrading packet and upgrading according to the fragment content of the upgrading packet.
In some embodiments, the apparatus for upgrading an internet of things device includes a processor and a memory storing program instructions, and the processor is configured to execute the method for upgrading an internet of things device when executing the program instructions.
In some embodiments, the device comprises the above device for upgrading the internet of things device.
The method, the system, the device and the equipment for upgrading the internet of things provided by the embodiment of the disclosure can realize the following technical effects: triggering the cloud platform to feed back an upgrading instruction by sending version information to the cloud platform; under the condition of receiving an upgrading instruction, acquiring upgrading packet fragment content according to upgrading packet fragment offset; and upgrading according to the fragment content of the upgrade package. Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
fig. 1 is a schematic diagram of a method for upgrading an internet of things device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of another method for upgrading an internet of things device provided by an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a system for upgrading an internet of things device according to an embodiment of the present disclosure;
fig. 4 is a timing diagram of an upgrade of an internet of things device provided by an embodiment of the present disclosure;
fig. 5 is a timing diagram of acquiring fragmented content of an upgrade package by an internet of things device according to an embodiment of the present disclosure;
fig. 6 is a timing diagram of another internet of things device acquiring fragmented content of an upgrade package according to an embodiment of the present disclosure;
fig. 7 is a timing diagram of another internet of things device acquiring fragmented content of an upgrade package according to an embodiment of the present disclosure;
fig. 8 is a timing diagram for another internet of things device to acquire fragmented content of an upgrade package according to an embodiment of the present disclosure;
fig. 9 is a timing diagram of another internet of things device acquiring fragmented content of an upgrade package according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram of an apparatus for upgrading an internet of things device according to an embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
A cloud Platform, or Platform as a Service (PaaS), provides an environment for developing, deploying, and operating internet services as one of ways for providing services by cloud computing. Manufacturers, namely service developers, can deploy applications developed by the manufacturers to the cloud platform, and the cloud platform provides operating environment and resources for the applications. And the cloud platform remotely upgrades and manages the programs in the equipment of the internet of things through the OTA technology.
With reference to fig. 1, an embodiment of the present disclosure provides a method for upgrading an internet of things device, which is applied to an internet of things device side, and includes:
step S101, sending version information of the internet of things equipment to a cloud platform, and triggering the cloud platform to feed back an upgrading instruction;
step S102, determining upgrade package fragment offset under the condition of receiving an upgrade instruction;
step S103, acquiring upgrade package fragment content according to the upgrade package fragment offset;
and step S104, upgrading according to the fragment content of the upgrade package.
By adopting the method for upgrading the internet of things equipment provided by the embodiment of the disclosure, the cloud platform is triggered to feed back an upgrading instruction by sending the version information to the cloud platform; under the condition of receiving an upgrading instruction, acquiring upgrading packet fragment content according to upgrading packet fragment offset; and upgrading according to the fragment content of the upgrade package. Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved.
Optionally, in a case of receiving an upgrade instruction, an upgrade protocol is formulated, and in the upgrade protocol, fragmentation processing is performed on firmware, that is, an upgrade package, by designing fields such as a segment offset and a segment length. Optionally, the upgrade protocol includes a preset firmware fragment size and a preset fragment number.
Optionally, determining an upgrade package fragment offset includes: acquiring the preset firmware fragment size and the fragment request times; and calculating by using the size of the firmware fragment and the number of times of fragment requests through a preset algorithm to obtain the fragment offset of the upgrade package.
Optionally, the size of the firmware fragment is set according to the channel transceiving capacity of the internet of things module in the internet of things device. For example: a wifi (Wireless Fidelity) module sets the fragment size to be 1K, an NB-IOT (Narrow Band Internet of Things) module sets the fragment size to be 512B, and the like. Optionally, the preset number of times of the fragment request is the number of fragments.
Optionally, by calculating: and (4) obtaining the upgrade package fragment offset, wherein the upgrade package fragment offset is the size of the firmware fragment multiplied by the number of fragment requests.
Optionally, obtaining the upgrade package fragment content according to the upgrade package fragment offset includes: sending upgrade package fragment content request information to the cloud platform according to the upgrade package fragment offset, and triggering the cloud platform to feed back upgrade package fragment content corresponding to the upgrade package fragment content request information; and receiving the fragment content of the upgrade package.
Optionally, after the upgrade package fragment content request information is sent to the cloud platform, the upgrade package fragment content request information is sent to the cloud platform again under the condition that the upgrade package fragment content corresponding to the upgrade package fragment content request information fed back by the cloud platform is not received within a set time. Therefore, under the condition that the upgrade packet loss occurs due to network fluctuation, the upgrade packet fragment content request information is retransmitted until the upgrade packet fragment content is successfully acquired, so that the integrity of the upgrade packet is ensured.
Optionally, after receiving the upgrade package fragment content, the method further includes: checking the fragment content of the upgrade package; and under the condition of failed verification, resending the request information of the upgrade package fragment content to the cloud platform.
Optionally, verifying the fragment content of each upgrade package fed back by the cloud platform includes: the upgrade package fragment content comprises checksum information checksum _0 of the cloud platform on the upgrade package fragment content; under the condition that upgrade package fragment content fed back by a cloud platform is received, carrying out checksum calculation on the upgrade package fragment content to obtain a checksum result checksum _ 1; comparing the checksum information checksum _0 with the checksum result checksum _1 to obtain a comparison result; if the comparison results are the same, the verification is successful; if not, the check fails. Therefore, the integrity and the accuracy of the upgrade package fragment content can be ensured by verifying the upgrade package fragment content through a checksum (checksum).
In some embodiments, if the verification of the content of the ith upgrade patch received is successful, the request information of the content of the (i + 1) th upgrade patch is continuously sent to the cloud platform; wherein i is a positive integer, i is less than n, n is the number of upgrade package fragments, and n is a positive integer.
In some embodiments, if the verification of the received ith piece of upgrade package fragment content fails, the upgrade package fragment content is considered to be abnormal, that is, the incomplete content or illegal content is determined, the upgrade package fragment content is discarded, and the ith piece of upgrade package fragment content request information is continuously sent to the cloud platform until the verification of the received upgrade package fragment content is successful.
Optionally, the checking and calculating the fragmented content of the upgrade package includes: and taking out the data in the fragment content of the upgrade package according to bytes, and accumulating and summing to obtain a checksum result.
Optionally, when all upgrade package fragment contents fed back by the cloud platform are received, that is, all upgrade data are downloaded, MD5 value verification is performed on the whole package upgrade package contents, and when the verification passes, the upgrade is performed according to the whole package upgrade package fragment contents. Thus, the validity of the upgrade content can be ensured.
Optionally, after determining the upgrade package fragment offset, the method further includes: caching the fragment offset of the upgrade package; and under the condition of recovering the network connection after the network disconnection occurs, acquiring the upgrade package fragment content according to the cached upgrade package fragment offset. Optionally, the upgrade package fragment is offset to upgrade package fragment location information.
Caching the fragment position information of each upgrade packet; and after the network connection is disconnected and the upgrading is interrupted, under the condition of replying the connection with the cloud platform, continuing to download from the downloading progress during the interruption of the upgrading according to the cached upgrading packet fragment position information without completely downloading again. The upgrading time can be saved, and the remote upgrading efficiency of the internet of things equipment is improved.
Optionally, in a case that the upgrade instruction is received, the method further includes: obtaining upgrading information corresponding to the upgrading instruction; the upgrading information comprises an upgrading identifier, the total length of an upgrading packet and a serial number of the internet of things equipment; and storing the upgrading information.
In some embodiments, in the case of receiving an upgrade instruction, an upgrade flow is started and upgrade information is retained in the flash memory flash. In the process of downloading the fragment content of the upgrade package, when the power failure causes the upgrade to be interrupted, when the power supply is recovered and the cloud platform is accessed again, the upgrade is automatically initiated according to the upgrade information stored in the flash and the fragment content of the upgrade package is downloaded from the beginning, so that the remote upgrade of the internet of things equipment is not influenced even if the power failure occurs.
Optionally, after the upgrade is performed according to the upgrade package fragment content, the method further includes: and reporting the upgrade completion information to the cloud platform.
According to the method for upgrading the internet of things equipment, the upgrading information is stored in the flash memory, so that the internet of things equipment can still automatically initiate upgrading after being restarted by unexpected power failure, the influence of power failure is avoided, and the reliability of upgrading the internet of things equipment is improved. By the aid of the cached fragment position information of the upgrade package, after the network is disconnected and reconnected, the download can still be started from the download progress when the upgrade is interrupted without complete re-download, and remote upgrade efficiency of the internet of things equipment is improved. In the process of downloading the fragment content of the upgrade package, the request information of the fragment content of the upgrade package is retransmitted over time, the fragment content of the upgrade package is verified, and the whole package is verified, so that the integrity and the legality of the firmware are ensured, and the upgrade and brick change of the equipment of the internet of things are avoided.
With reference to fig. 2, an embodiment of the present disclosure provides a method for upgrading an internet of things device, which is applied to a cloud platform side, and includes:
step S201, acquiring version information of the Internet of things equipment;
step S202, sending an upgrading instruction to the Internet of things equipment corresponding to the version information according to the version information, triggering the Internet of things equipment to obtain the fragmented content of the upgrading packet and upgrading according to the fragmented content of the upgrading packet.
By adopting the method for upgrading the internet of things equipment provided by the embodiment of the disclosure, the upgrading instruction is fed back to the internet of things equipment according to the version information; and triggering the Internet of things equipment to acquire the fragment content of the upgrade package and upgrading according to the fragment content of the upgrade package. Due to the fact that the internet of things equipment is triggered to carry out upgrading package slicing downloading, the single-time upgrading interactive data volume can be reduced, the single-package anti-interference capacity is enhanced, the success rate of single-time upgrading is improved, and therefore the reliability of upgrading of the internet of things equipment is improved.
Optionally, sending an upgrade instruction to the internet of things device corresponding to the version information according to the version information includes: and judging whether the program of the equipment connected with the Internet of things needs to be upgraded or not according to the current software version information sent by the equipment connected with the Internet of things and the OTA strategy stored in the cloud platform, and if the program of the equipment connected with the Internet of things needs to be upgraded, sending an upgrading instruction to the equipment connected with the Internet of things.
Optionally, the OTA policy is a principle that the cloud platform upgrades the programs of the respective internet of things devices connected thereto, where software version information of the programs to which the respective internet of things devices are to be upgraded is specified. For example: and the OTA strategy is that all the equipment of the Internet of things need to be upgraded to the latest software version, and when the current software version information sent by a certain equipment of the Internet of things is not the latest software version, the cloud platform determines to upgrade the program of the equipment of the Internet of things, and sends an upgrade instruction to the equipment of the Internet of things.
Optionally, triggering the internet of things device to obtain the fragmented content of the upgrade package includes: triggering the Internet of things equipment to send request information of fragment content of the upgrade package to the cloud platform; and under the condition of receiving the request information of the fragment content of the upgrade package, feeding back the fragment content of the upgrade package corresponding to the request information of the fragment content of the upgrade package to the Internet of things equipment.
Optionally, after triggering the internet of things device to upgrade according to the upgrade package fragment content, the method includes: and receiving upgrade completion information reported by the Internet of things equipment.
As shown in fig. 3, an embodiment of the present disclosure provides a system for upgrading an internet of things device, including: the system comprises an internet of things device 1 and a cloud platform 2;
the internet of things equipment 1 is used for sending version information of the internet of things equipment to the cloud platform 2 and triggering the cloud platform 2 to feed back an upgrading instruction; determining upgrade package fragment offset under the condition of receiving an upgrade instruction; acquiring the fragment content of the upgrade package according to the fragment offset of the upgrade package; and upgrading according to the fragment content of the upgrade package.
The cloud platform 2 is used for acquiring version information of the internet of things equipment; and sending an upgrading instruction to the internet of things device 1 corresponding to the version information according to the version information, triggering the internet of things device 1 to obtain the fragmented content of the upgrading packet and upgrading according to the fragmented content of the upgrading packet.
By adopting the system for upgrading the internet of things equipment provided by the embodiment of the disclosure, the version information is sent to the cloud platform through the internet of things equipment, and the cloud platform is triggered to feed back an upgrading instruction to the internet of things equipment; under the condition that the Internet of things equipment receives an upgrading instruction, obtaining upgrading packet fragment content according to upgrading packet fragment offset; and upgrading according to the fragment content of the upgrade package. Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved.
In some embodiments, as shown in fig. 4, specific steps of upgrading the internet of things device provided by the embodiments of the present disclosure are as follows:
step S301, the Internet of things equipment reports version information to a cloud platform; optionally, the internet of things device reports version information to the cloud platform when starting up, or reports when connecting with the cloud platform, or reports to the cloud platform according to a set period, and the like;
step S302, the cloud platform receives version information sent by the equipment of the Internet of things, judges whether program upgrading is carried out on the equipment of the Internet of things, and upgrades the equipment of the Internet of things under the condition that the received version information is not the latest version information;
step S303, under the condition that the cloud platform needs to upgrade the equipment of the Internet of things, the cloud platform sends an upgrade instruction to the equipment of the Internet of things corresponding to the version information;
step S304, calculating by the Internet of things equipment through a preset algorithm by using the size of the firmware fragments and the times of fragment requests to obtain fragment offset of the upgrade package;
step S305, the Internet of things equipment sends upgrade package fragment content request information to the cloud platform according to the upgrade package fragment offset;
step S306, the cloud platform sends upgrade package fragment content corresponding to the upgrade package fragment content request information to the Internet of things equipment; repeatedly executing the step S305 and the step S306 until the internet of things device finishes downloading all the upgrade package fragment contents;
and S307, upgrading the Internet of things equipment according to the fragment content of the upgrading packet, and reporting upgrading completion information to the cloud platform.
Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved.
In some embodiments, with reference to the time sequence diagram of acquiring the fragmented content of the upgrade package by the equipment of the internet of things shown in fig. 5, when the equipment of the internet of things does not receive the fragmented content of the upgrade package after timeout, the specific steps of acquiring the fragmented content of the upgrade package by the equipment of the internet of things provided by the embodiments of the present disclosure are as follows:
step S401, the cloud platform sends an upgrading instruction to the Internet of things equipment;
step S402, the internet of things equipment sends the request information of the fragment content of the ith upgrade package to the cloud platform;
step S403, determining whether the Internet of things equipment receives the ith piece of upgrade package fragment content corresponding to the ith piece of upgrade package fragment content request information fed back by the cloud platform within a set time;
step S404, the internet of things equipment sends the request information of the fragment content of the ith upgrade package to the cloud platform again under the condition that the internet of things equipment does not receive the fragment content of the ith upgrade package fed back by the cloud platform within the set time;
step S405, the cloud platform sends the fragment content of the ith upgrade patch to the Internet of things equipment.
Therefore, under the condition that the upgrade packet loss occurs due to network fluctuation, the upgrade packet fragment content request information is retransmitted until the upgrade packet fragment content is successfully acquired, so that the integrity of the upgrade packet is ensured.
In some embodiments, with reference to the time sequence diagram of acquiring the fragmented content of the upgrade package by the equipment of the internet of things shown in fig. 6, when a situation that the downloaded fragmented content of the upgrade package has data abnormality occurs, specific steps of acquiring the fragmented content of the upgrade package by the equipment of the internet of things provided by the embodiments of the present disclosure are as follows:
step S501, the cloud platform sends an upgrading instruction to the Internet of things equipment;
step S502, the Internet of things equipment sends the fragment content request information of the ith upgrade package to the cloud platform;
step S503, the cloud platform sends the ith piece of upgrade package fragment content corresponding to the ith piece of upgrade package fragment content request information to the equipment of the internet of things;
step S504, the thing networking equipment verifies the fragment content of the ith upgrade package, if the verification is successful, step S506 is executed, and if the verification is not successful, step S505 is executed;
step S505, the internet of things equipment sends the ith piece of upgrade package piece content request information to the cloud platform again, and then step S503 is executed;
step S506, the Internet of things equipment sends the next piece of request information of the fragment content of the (i + 1) th upgrade package to the cloud platform; then, step S507 is executed;
step S507, the cloud platform sends the (i + 1) th piece of upgrade package fragment content to the Internet of things equipment;
step S508, the Internet of things equipment checks the fragment content of the received (i + 1) th upgrade package;
and the Internet of things equipment verifies the received fragment content of each upgrade package until all the fragment contents of the upgrade packages are successfully verified.
In this way, the content of each received upgrade patch is verified through the internet of things device, and when the verification of the downloaded upgrade patch content fails, namely, under the condition of abnormity, the upgrade patch content is actively discarded, and the upgrade patch request information is retransmitted until the request of the upgrade patch content is successful, so that the integrity and the accuracy of the upgrade patch content are ensured.
In some embodiments, in combination with the time sequence diagram of acquiring the fragmented content of the upgrade package by the equipment of the internet of things shown in fig. 7, the specific steps of acquiring the fragmented content of the upgrade package by the equipment of the internet of things provided by the embodiments of the present disclosure are as follows:
step S601, the cloud platform sends an upgrading instruction to the Internet of things equipment;
step S602, the Internet of things equipment sends fragment content request information of an ith upgrade package to the cloud platform;
step S603, the cloud platform sends the ith piece of upgrade package fragment content corresponding to the ith piece of upgrade package fragment content request information to the Internet of things equipment; repeatedly executing the step S602 and the step S603 until the internet of things device finishes downloading all the upgrade package fragment contents;
step S604, under the condition that the Internet of things equipment receives all the fragment contents of the upgrade package, performing MD5 value verification on the whole upgrade package contents; if the verification is successful, the upgrading is carried out, and if the verification is failed, the upgrading is not carried out, namely the upgrading fails.
Step S605, the Internet of things equipment sends an upgrading result to the cloud platform; and the upgrading result comprises upgrading success or upgrading failure.
Therefore, the IOT equipment performs MD5 value verification on the whole upgrade packet content, and upgrades the upgrade content under the condition of successful verification, thereby ensuring the legality of the upgrade content.
In some embodiments, with reference to the time sequence diagram of acquiring the upgrade fragment content by the equipment of the internet of things shown in fig. 8, in the case of network interruption in the process of downloading the upgrade package fragment content, the specific steps of acquiring the upgrade package fragment content by the equipment of the internet of things provided by the embodiments of the present disclosure are as follows:
step S701, the cloud platform sends an upgrading instruction to the Internet of things equipment;
step S702, calculating and caching the fragment position of the ith upgrade package by the Internet of things equipment through a preset algorithm;
step S703, the Internet of things equipment sends the request information of the fragment content of the ith upgrade package to the cloud platform;
step 704, the cloud platform sends the ith piece of upgrade package fragment content corresponding to the ith piece of upgrade package fragment content request information to the equipment of the internet of things;
step S705, the internet of things equipment calculates through a preset algorithm and caches the fragment position of the (i + 1) th upgrade package;
step S706, when the network connection between the internet of things device and the cloud platform is disconnected, and the upgrading is interrupted, when the network connection between the internet of things device and the cloud platform is reconnected, and after the upgrading is recovered, the internet of things device sends the (i + 1) th piece of upgrading package fragment content request information to the cloud platform again;
step S707, the cloud platform sends the (i + 1) th piece of upgrade package fragment content corresponding to the (i + 1) th piece of upgrade package fragment content request information to the Internet of things device;
the internet of things equipment continues to send the rest request information of the fragment content of the upgrade package to the cloud platform; the cloud platform feeds back the upgrade package fragment content corresponding to the upgrade package fragment content request information to the Internet of things equipment; and until the internet of things device finishes downloading all the upgrade package fragment contents.
And caching the position information of each upgrade patch by the Internet of things equipment. In the process of downloading the upgrade package fragment content, if the network connection is disconnected, the upgrade is interrupted, and after the upgrade package fragment content is connected with the cloud platform again, the upgrade package fragment content is continuously downloaded from the download progress during the upgrade interruption according to the cached upgrade package fragment position information without completely downloading again. The upgrading time can be saved, and the remote upgrading efficiency of the internet of things equipment is improved.
In some embodiments, in combination with the time sequence diagram of acquiring the fragmented content of the upgrade package by the equipment of the internet of things shown in fig. 9, in the case of power failure in the process of downloading the fragmented content of the upgrade package, specific steps of acquiring the fragmented content of the upgrade package by the equipment of the internet of things provided by the embodiments of the present disclosure are as follows:
step S801, the cloud platform sends an upgrading instruction to the Internet of things equipment; the upgrade instruction includes upgrade information;
step S802, the Internet of things equipment stores the upgrading information into a flash memory;
step S803, the Internet of things equipment sends the request information of the fragment content of the ith upgrade package to the cloud platform;
step S804, the cloud platform sends the ith piece of upgrade package fragment content corresponding to the ith piece of upgrade package fragment content request information to the Internet of things equipment;
step S805, under the condition that the upgrading is interrupted due to power failure, when the power supply is recovered, the Internet of things equipment is connected with the cloud platform again, and the upgrading is recovered, the Internet of things equipment actively starts upgrading by inquiring upgrading information in the flash memory;
step S806, the internet of things equipment sends fragment content request information of the 1 st upgrade package to the cloud platform;
step S807, the cloud platform sends the 1 st piece of upgrade package fragment content corresponding to the 1 st piece of upgrade package fragment content request information to the equipment of the Internet of things;
the internet of things equipment continuously sends piece content request information of the 2 nd piece and the 3 rd piece … … nth piece upgrading packages to the cloud platform; the cloud platform feeds back the fragment contents of the 2 nd and 3 rd … … nth upgrade packages to the Internet of things equipment; and until the internet of things device finishes downloading all the upgrade package fragment contents.
In the process of downloading the fragment content of the upgrade package, when the power failure causes the upgrade to be interrupted, when the power supply is recovered and the cloud platform is accessed again, the upgrade is automatically initiated according to the upgrade information stored in the flash and the fragment content of the upgrade package is downloaded from the beginning, so that the remote upgrade of the internet of things equipment is not influenced even if the power failure occurs.
As shown in fig. 10, an apparatus for upgrading an internet of things device according to an embodiment of the present disclosure includes a processor (processor)100 and a memory (memory)101 storing program instructions. Optionally, the apparatus may also include a Communication Interface (Communication Interface)102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via a bus 103. The communication interface 102 may be used for information transfer. The processor 100 may call program instructions in the memory 101 to perform the method for upgrading an internet of things device of the above-described embodiment.
Further, the program instructions in the memory 101 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 101, which is a computer-readable storage medium, may be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 100 executes functional applications and data processing by executing program instructions/modules stored in the memory 101, that is, implements the method for upgrading the internet of things device in the above embodiments.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
By adopting the device for upgrading the internet of things equipment provided by the embodiment of the disclosure, the version information is sent to the cloud platform through the internet of things equipment, and the cloud platform is triggered to feed back an upgrading instruction to the internet of things equipment; under the condition that the Internet of things equipment receives an upgrading instruction, obtaining upgrading packet fragment content according to upgrading packet fragment offset; and upgrading according to the fragment content of the upgrade package. Due to the fact that the upgrade package is downloaded in a slicing mode, the interactive data volume of single upgrade can be reduced, the anti-interference capacity of a single package is enhanced, the success rate of single upgrade is improved, and therefore the reliability of the upgrade of the internet of things equipment is improved.
The embodiment of the disclosure provides equipment comprising the device for upgrading the internet of things equipment.
Optionally, the device is a cloud platform, an internet of things device, a server, or an internet of things module.
Due to the fact that the equipment downloads the upgrading package in a slicing mode, the single-time upgrading interactive data volume can be reduced, the single-package anti-interference capacity is enhanced, the success rate of single-time upgrading is improved, and therefore the reliability of upgrading of the internet of things equipment is improved.
The embodiment of the disclosure provides a computer-readable storage medium, which stores computer-executable instructions configured to execute the method for upgrading an internet of things device.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the above-described method for upgrading an internet of things device.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other like elements in a process, method or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (11)

1. A method for upgrading an Internet of things device is applied to the side of the Internet of things device, and is characterized by comprising the following steps:
sending version information to a cloud platform, and triggering the cloud platform to feed back an upgrading instruction;
determining upgrade package fragment offset under the condition of receiving the upgrade instruction;
acquiring upgrade package fragment content according to the upgrade package fragment offset;
and upgrading according to the fragment content of the upgrade package.
2. The method of claim 1, wherein determining an upgrade package fragment offset comprises:
acquiring the size of firmware fragments and the number of times of fragment requests;
and calculating by using the size of the firmware fragment and the times of the fragment request through a preset algorithm to obtain the fragment offset of the upgrade package.
3. The method of claim 1, wherein obtaining upgrade package fragment content according to the upgrade package fragment offset comprises:
sending upgrade package fragment content request information to the cloud platform according to the upgrade package fragment offset, and triggering the cloud platform to feed back upgrade package fragment content corresponding to the upgrade package fragment content request information;
and receiving the fragment content of the upgrade package.
4. The method according to claim 3, further comprising, after receiving the upgrade package fragment content:
checking the fragment content of the upgrade package;
and under the condition of failed verification, resending the request information of the upgrade package fragment content to the cloud platform.
5. The method according to any one of claims 1 to 4, wherein after determining the upgrade package fragment offset, further comprising:
caching the upgrade package fragment offset;
and under the condition of recovering the network connection after the network disconnection occurs, acquiring the upgrade package fragment content according to the cached upgrade package fragment offset.
6. The method according to any one of claims 1 to 4, further comprising, in case of receiving the upgrade instruction:
obtaining upgrading information corresponding to the upgrading instruction; the upgrading information comprises an upgrading identifier, the total length of an upgrading packet and a serial number of the internet of things equipment;
and storing the upgrading information.
7. A method for upgrading an Internet of things device is applied to a cloud platform side, and is characterized by comprising the following steps:
acquiring version information of the Internet of things equipment;
and sending an upgrading instruction to the Internet of things equipment corresponding to the version information according to the version information, triggering the Internet of things equipment to acquire the fragment content of the upgrading packet and upgrading according to the fragment content of the upgrading packet.
8. The method of claim 7, wherein triggering the internet of things device to obtain upgrade package fragment content comprises:
triggering the Internet of things equipment to send request information of the fragment content of the upgrade package to the cloud platform;
and under the condition of receiving the request information of the content of the upgrade package fragment, feeding back the content of the upgrade package fragment corresponding to the request information of the content of the upgrade package fragment to the Internet of things equipment.
9. A system for upgrading an Internet of things device, comprising: the system comprises an internet of things device and a cloud platform;
the internet of things equipment is used for sending version information to the cloud platform and triggering the cloud platform to feed back an upgrading instruction; determining upgrade package fragment offset under the condition of receiving the upgrade instruction; acquiring upgrade package fragment content according to the upgrade package fragment offset; upgrading according to the fragment content of the upgrade package;
the cloud platform is used for acquiring version information of the Internet of things equipment; and sending an upgrading instruction to the Internet of things equipment corresponding to the version information according to the version information, triggering the Internet of things equipment to acquire the fragment content of the upgrading packet and upgrading according to the fragment content of the upgrading packet.
10. An apparatus for upgrading an internet of things device, comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the method for upgrading an internet of things device according to any one of claims 1 to 8 when executing the program instructions.
11. An apparatus, characterized in that it comprises the device for upgrading an internet of things apparatus according to claim 10.
CN202010843597.1A 2020-08-20 2020-08-20 Method, system, device and equipment for upgrading internet of things equipment Pending CN112039697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010843597.1A CN112039697A (en) 2020-08-20 2020-08-20 Method, system, device and equipment for upgrading internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010843597.1A CN112039697A (en) 2020-08-20 2020-08-20 Method, system, device and equipment for upgrading internet of things equipment

Publications (1)

Publication Number Publication Date
CN112039697A true CN112039697A (en) 2020-12-04

Family

ID=73579938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010843597.1A Pending CN112039697A (en) 2020-08-20 2020-08-20 Method, system, device and equipment for upgrading internet of things equipment

Country Status (1)

Country Link
CN (1) CN112039697A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130627A (en) * 2023-02-28 2023-11-28 荣耀终端有限公司 Fitting upgrading method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591824A (en) * 2016-01-14 2016-05-18 杭州赫智电子科技有限公司 Method and system for firmware upgrade
US20170344357A1 (en) * 2016-05-25 2017-11-30 Beijing Xiaomi Mobile Software Co., Ltd. Method, apparatus, and computer-readable storage medium for upgrading a zigbee device
CN108011935A (en) * 2017-11-27 2018-05-08 海信集团有限公司 A kind of programme upgrade method of NB-IOT equipment, server and NB-IOT equipment
CN110311964A (en) * 2019-06-20 2019-10-08 厦门四信通信科技有限公司 Socket OTA upgrade method, device, system, user terminal and storage medium
CN111510323A (en) * 2020-03-24 2020-08-07 中国科学院上海微系统与信息技术研究所 Firmware upgrading method, device and system for Internet of things equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591824A (en) * 2016-01-14 2016-05-18 杭州赫智电子科技有限公司 Method and system for firmware upgrade
US20170344357A1 (en) * 2016-05-25 2017-11-30 Beijing Xiaomi Mobile Software Co., Ltd. Method, apparatus, and computer-readable storage medium for upgrading a zigbee device
CN108011935A (en) * 2017-11-27 2018-05-08 海信集团有限公司 A kind of programme upgrade method of NB-IOT equipment, server and NB-IOT equipment
CN110311964A (en) * 2019-06-20 2019-10-08 厦门四信通信科技有限公司 Socket OTA upgrade method, device, system, user terminal and storage medium
CN111510323A (en) * 2020-03-24 2020-08-07 中国科学院上海微系统与信息技术研究所 Firmware upgrading method, device and system for Internet of things equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130627A (en) * 2023-02-28 2023-11-28 荣耀终端有限公司 Fitting upgrading method and electronic equipment
CN117130627B (en) * 2023-02-28 2024-05-17 荣耀终端有限公司 Fitting upgrading method and electronic equipment

Similar Documents

Publication Publication Date Title
CN110474977B (en) Firmware upgrading method and system for intelligent door lock and intelligent door lock
CN107547239B (en) Configuration object updating method and device
CN104915220B (en) A kind of upgrade method and system, client of client application
US10516526B2 (en) Data transmitting method, server and client
CN108874439B (en) Method and device for acquiring customized difference packet, and upgrading method and device
JP2015511735A (en) Software installation method, device and system
CN111240713A (en) Method for detecting remote breakpoint continuous transmission through power utilization
CN111930406B (en) Vehicle-mounted terminal micro control unit software upgrading method, electronic equipment and storage medium
CN112165533B (en) Data checking and transmitting method, device, equipment, system and storage medium
CN105677363A (en) OTA (Over-the-Air Technology) upgrading system
EP3933573A1 (en) Zero differential upgrade method, non-volatile storage medium and electronic device
CN113721966B (en) Node upgrading method and device, storage medium and electronic device
WO2019057023A1 (en) Data recovery method, sending/receiving apparatus, and computer-readable storage medium
CN110535954B (en) Door lock firmware upgrading method, upgrading system, intelligent gateway and storage medium
CN111385354A (en) File transmission method and device, electronic equipment and nonvolatile storage medium
CN103488501A (en) Optical network terminal equipment and system software upgrade method thereof
CN110889143B (en) File verification method and device
CN112039697A (en) Method, system, device and equipment for upgrading internet of things equipment
CN114884935A (en) Data upgrading method and device, electronic equipment and storage medium
CN116466986B (en) Equipment software upgrading method and device of energy storage system, communication module and medium
CN111752577A (en) System version upgrading method and device
WO2014032553A1 (en) Network resource management method and device, client and system
KR20220053386A (en) Data communication method and apparatus for efficient file transmission
US20190236331A1 (en) Method, apparatus, and storage medium for data verification
US20180060349A1 (en) Method for transferring a difference file

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201204