CN117055926A - Remote upgrading method and Internet of things equipment - Google Patents

Remote upgrading method and Internet of things equipment Download PDF

Info

Publication number
CN117055926A
CN117055926A CN202311107603.7A CN202311107603A CN117055926A CN 117055926 A CN117055926 A CN 117055926A CN 202311107603 A CN202311107603 A CN 202311107603A CN 117055926 A CN117055926 A CN 117055926A
Authority
CN
China
Prior art keywords
application program
upgrade
program
check code
internet
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
CN202311107603.7A
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.)
Qieyun Shanghai Internet Of Things Technology Co ltd
Original Assignee
Qieyun Shanghai Internet Of Things Technology 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 Qieyun Shanghai Internet Of Things Technology Co ltd filed Critical Qieyun Shanghai Internet Of Things Technology Co ltd
Priority to CN202311107603.7A priority Critical patent/CN117055926A/en
Publication of CN117055926A publication Critical patent/CN117055926A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The application provides a remote upgrading method and Internet of things equipment. The method is applied to the Internet of things equipment, the Internet of things equipment stores a switching control program, a first application program and a second application program which is the same as the mirror image of the first application program, the storage addresses of the first application program and the second application program are different, and the method comprises the following steps: starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the flag bit; if a remote upgrading instruction is received, analyzing according to the remote upgrading instruction to obtain a downloading address; downloading and obtaining an upgrade program file corresponding to the first application program according to the download address, and burning the upgrade program file to a storage address corresponding to the second application program; judging whether the upgrade program file is the same as the burning content read from the storage address; if the upgrade program file is the same as the burning content, the first application program is determined to be successfully upgraded. The application improves the reliability and safety of remote upgrading.

Description

Remote upgrading method and Internet of things equipment
Technical Field
The application relates to the technical field of communication, in particular to a remote upgrading method and Internet of things equipment.
Background
The Internet of things is called as the Internet with all things connected, and is a network which extends and expands on the basis of the Internet. The internet of things uses two-dimensional codes, radio Frequency Identification (RFID) and the like as identifiers, and is connected with the internet through various communication technologies to exchange information and communicate, so that the interconnection and intercommunication between the things and between the people and the things are realized. With the rapid development of the internet of things, the internet of things equipment also needs to be subjected to program upgrading, so that the vulnerability is solved or new functions are provided to support the user demands. An Over-the-air technology (OTA) is a technology for realizing remote management of mobile terminal equipment and SIM card data through an air interface of mobile communication, and is widely applied to upgrading of Internet of things equipment due to the advantages of convenience, high efficiency and the like.
The remote upgrading of the equipment of the Internet of things has various limitations, such as network speed stability, equipment voltage stability and upgrading success rate which are not hundred percent, and the possibility that part of equipment fails to upgrade to cause the equipment to become brick, so that the equipment is out of connection. When the Internet of things equipment is remotely upgraded, if the error operation leads to the error of the issued upgrade program file, the equipment becomes brick and cannot be upgraded again and the data can be uploaded. Accordingly, there is a need to provide a new upgrade method to solve the above-mentioned problems.
Disclosure of Invention
The application provides a remote upgrading method and Internet of things equipment, which can ensure the success of remote upgrading and improve the reliability and safety of remote upgrading.
In a first aspect, the present application provides a remote upgrade method applied to an internet of things device, where the internet of things device stores a switching control program, a first application program, and a second application program that is the same as a mirror image of the first application program, and storage addresses of the first application program and the second application program are different, and the method includes the steps of:
starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
if a remote upgrading instruction is received, analyzing according to the remote upgrading instruction to obtain a downloading address and a verification check code corresponding to the second application program;
downloading and obtaining an upgrade program file corresponding to the second application program according to the download address, burning the upgrade program file to a storage address corresponding to the second application program, and obtaining a calculation check code corresponding to the second application program;
judging whether the upgrade program file is the same as the burning content read from the storage address, and comparing whether the verification check code is the same as the calculation check code;
and if the upgrade program file is the same as the burning content and the verification code is the same as the calculation verification code, determining that the upgrade of the second application program is successful.
In some embodiments, the obtaining the calculated check code corresponding to the second application program includes the steps of:
and calculating according to the recorded content to obtain a calculation check code corresponding to the second application program.
In some embodiments, the remote upgrade method further comprises:
if the verification check code is different from the calculation check code, determining that the second application program fails to upgrade, and downloading according to the download address to obtain the upgrade program file for burning.
In some embodiments, the determining that the second application upgrade was successful includes the steps of:
and updating and restarting the flag bit, wherein the updated flag bit indicates that the second application program is loaded and operated after the next power-on starting.
In some embodiments, the remote upgrade method further comprises:
after upgrading from a current version to an updated version, monitoring whether the first application program or the second application program runs abnormally or not through the switching control program, and respectively counting the running failure times of the running abnormality corresponding to the first application program or the second application program;
and if the operation failure times reach a preset time threshold, switching and operating the first application program or the second application program corresponding to the current version through the switching control program.
In a second aspect, the present application further provides an internet of things device, where the internet of things device stores a switching control program, a first application program, and a second application program that is the same as the first application program, and storage addresses of the first application program and the second application program are different, and the internet of things device includes:
the processing module is used for starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
the analysis module is used for analyzing and obtaining a downloading address and a verification check code address corresponding to the second application program according to the remote upgrading instruction if the remote upgrading instruction is received;
the downloading module is used for downloading and obtaining an upgrade program file corresponding to the second application program according to the downloading address;
the processing module is further configured to burn the upgrade program file to a storage address corresponding to the second application program, and obtain a calculation check code corresponding to the second application program;
and the judging module is used for judging whether the upgrade program file is the same as the burning content read from the storage address, comparing whether the verification check code is the same as the calculation check code, and if the upgrade program file is the same as the burning content, the verification check code is the same as the calculation check code, determining that the second application program is successfully upgraded.
In some embodiments, the processing module comprises:
and the computing unit is used for carrying out operation according to the recorded content to obtain a computing check code corresponding to the second application program.
In some embodiments, the internet of things device further comprises:
the processing module is further configured to determine that the second application program fails to upgrade if the verification check code is different from the calculation check code;
and the downloading module is also used for downloading and obtaining the upgrade program file again according to the downloading address for burning.
In some embodiments, the processing module is further configured to update and restart the flag bit, where the updated flag bit indicates that the second application program is loaded and run after the next power-on start.
In some embodiments, the internet of things device further comprises:
the monitoring module is used for monitoring whether the first application program or the second application program runs abnormally or not through the switching control program after the current version is updated to the updated version;
the processing module is further configured to respectively count operation failure times of the operation exceptions corresponding to the first application program or the second application program, and if the operation failure times reach a preset time threshold, switch and operate the first application program or the second application program corresponding to the current version through the switching control program.
The application burns the upgrade program file corresponding to the first application program obtained by downloading into the storage address corresponding to the second application program of the mirror image of the first application program, judges whether the upgrade program file corresponding to the first application program is the same as the burnt content read from the storage address corresponding to the second application program, and determines that the upgrade of the first application program is successful if the upgrade program file is the same as the burnt content. If the download burning is not the same, the first application program to be upgraded is ensured to be burnt correctly, so that the success of remote upgrading of the Internet of things equipment is ensured, and the reliability and safety of remote upgrading are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a remote upgrade system according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a remote upgrading method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
In describing embodiments of the present application, it should be understood that the terms "first," "second," and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or number of features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, the meaning of "plurality" is two or more, unless explicitly defined otherwise.
The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known processes have not been described in detail in order to avoid unnecessarily obscuring the description of the embodiments of the application. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The execution subject of the remote upgrade method according to the embodiment of the present application may be the remote upgrade system provided by the embodiment of the present application, for example, the remote upgrade method provided by the embodiment of the present application may be applied to the remote upgrade system shown in fig. 1. The remote upgrade system includes a wireless gateway 20, an internet of things device 10, and a server 30, where the internet of things device 10 may be a product including both receiving and transmitting hardware, that is, a product having receiving and transmitting hardware capable of performing two-way communication over a two-way communication link, and a user may use the internet of things device 10 to establish communication with the server 30 through the wireless gateway 20 to download installation packages or upgrade program files for obtaining multiple different versions of an application program from the server 30. The internet of things device 10 includes, but is not limited to, a cell phone, tablet computer, notebook computer, smart refrigerator, smart air conditioner. The server 30 may be a stand-alone server 30, or may be a server network or a server cluster of servers 30, including but not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server of multiple servers 30. Wherein the Cloud server is composed of a large number of computers or web servers based on Cloud Computing (Cloud Computing). It will be appreciated by those skilled in the art that the above application scenario is merely one application scenario of the present application, and is not limited to the application scenario of the present application, and it will be appreciated that the remote upgrade system may further include one or more other servers, which are not limited herein.
The internet of things equipment leaves a factory and is provided with IAP and APP, the APP is responsible for downloading the remote upgrade file to the storage peripheral equipment, then restarting, the IAP is responsible for reading out and burning the remote upgrade file of the storage peripheral equipment to the APP address, and the original APP is covered. The remote upgrade file is operated twice, the possibility of burning failure is increased, meanwhile, the content which is burnt into the APP address is not compared with the content which is actually required to be burnt, the correctness of the content in the burning process cannot be ensured, and the possibility of burning failure is further increased.
In order to solve the above-mentioned problems, the following begins to describe the remote upgrade method provided by the embodiment of the present application, and referring to fig. 2, fig. 2 is a schematic flow chart of the remote upgrade method provided by the embodiment of the present application. It should be noted that although a logical order is illustrated in the flowchart of fig. 2 or other figures, in some cases the steps illustrated or described may be performed in a different order than shown in the figures. The remote upgrading method provided by the embodiment of the application is applied to the Internet of things equipment, the Internet of things equipment stores a switching control program, a first application program and a second application program which is the same as the first application program in mirror image, the storage addresses of the first application program and the second application program are different, and the remote upgrading method comprises the steps S100-500, and specifically comprises the following steps:
s100, starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
s200, if a remote upgrading instruction is received, analyzing and obtaining a downloading address and a verification check code address corresponding to the second application program according to the remote upgrading instruction;
s300, downloading and obtaining an upgrade program file corresponding to the second application program according to the download address, burning the upgrade program file to a storage address corresponding to the second application program, and obtaining a calculation check code corresponding to the second application program;
s400, judging whether the upgrade program file is the same as the burning content read from the storage address, and comparing whether the verification check code is the same as the calculation check code;
s500, if the upgrade program file is the same as the burning content and the verification code is the same as the calculation verification code, determining that the upgrade of the second application program is successful.
Specifically, in the present application, a first application refers to one of two mirrored applications that has been successfully upgraded last time, and a second application refers to another one of the two mirrored applications that has not been successfully upgraded last time or has not been upgraded last time, that is, the second application is one of the two mirrored applications that is to be upgraded last time.
In an embodiment of the application, the identifier is used as a symbol indicating that the upgrade of the application program is successful in different batches, i.e. the identifiers for remote upgrades of the same application program in different batches are different. If the specified staff has an unreliability factor such as epidemic situation or business trip, and needs to remotely work in the outside or at home, the specified staff only needs to use the internet of things device 10 to send a remote upgrade instruction to the server 30 to obtain corresponding upgrade information, where the upgrade information includes a download address and a verification code corresponding to the first application program.
The storage addresses of the switching control program and the first application program are different from those of the second application program. For example, flash is divided into 3 blocks, for example, flash address is 0x00000000-0x3fffff, switch_app (i.e., the switching control program of the present application) has a memory address of 0x00000000, app1 (i.e., the first application program of the present application) has a memory address of 0x10000000, and app2 (i.e., the second application program of the present application) has a memory address of 0x20000000. The system is powered on and defaults to start running from the address 0x00000000 address, namely, the default runs the switch_APP first, and the switch_APP decides to jump to the APP (namely, APP1 or APP2, the first default is APP 1) which is successfully upgraded last time currently according to the recorded flag bit.
The application burns the upgrade program file corresponding to the first application program obtained by downloading into the storage address corresponding to the second application program mirrored by the first application program, judges whether the burnt content corresponding to the first application program and read from the storage address corresponding to the second application program is the same, and determines that the upgrade of the first application program is successful if the upgrade program file is the same as the burnt content. If the download burning is not the same, the first application program to be upgraded is ensured to be burnt correctly, so that the success of remote upgrading of the Internet of things equipment is ensured, and the reliability and safety of remote upgrading are improved.
In some embodiments, the obtaining the calculated check code corresponding to the second application program includes the steps of:
and calculating according to the recorded content to obtain a calculation check code corresponding to the second application program.
Specifically, the content of the program recorded in the storage address of the second application program in the internet of things device is known, so that the calculation check code can be calculated according to the content of the program recorded in the storage address of the second application program by adopting the same algorithm as that used for generating the verification check code. That is, the algorithm of the verification check code for the second application program generated by the server during the same upgrade operation is the same as the algorithm of the calculation check code for the second application program generated by the internet of things device during the same upgrade operation. In this way, the same content can be ensured to generate the same check code by adopting the same algorithm, otherwise, if different contents adopt the same algorithm, the generated check codes are different.
S440, if the verification check code is different from the calculation check code, determining that the second application program fails to upgrade, and downloading according to the download address to obtain the upgrade program file for burning.
Specifically, the internet of things device may read upgrade information through the URL upgrade interface, where the upgrade information is encryption information. If the upgrade is needed, the remote upgrade instruction is decrypted according to the returned remote upgrade instruction, and the download address of the corresponding upgrade program file and the verification check code corresponding to the file are analyzed. If the currently running APP is APP1, the APP1 downloads an upgrade file to an APP2 address to cover the original APP2; if APP2 is currently running, the original APP1 is covered by the APP2 with the upgrade file.
The server and the internet of things device pre-store the same encryption algorithm for the same application program, namely, the encryption algorithms used for different application program servers and the internet of things device are the same, and certainly, the encryption algorithms used for different application program servers and the internet of things device are different, so that after the internet of things device obtains a remote upgrading instruction, the remote upgrading instruction can be analyzed to obtain a corresponding verification code, the internet of things device reads data from a storage address of a second application program to obtain a burnt content, the internet of things device uses the pre-stored encryption algorithm to encrypt and calculate the burnt content to obtain a calculation check code, and then the internet of things device compares the analyzed verification check code with the calculation check code. The verification check code is a code generated by the server according to the upgrade program file while the Internet of things equipment acquires the upgrade program file. If the verification check code is different from the calculation check code, the fact that the upgrade program file received by the Internet of things equipment is in tampering risk or in error is indicated, and the Internet of things equipment can download and obtain the upgrade program file again according to the download address for burning. Otherwise, if the verification check code is the same as the calculation check code, the internet of things device can determine that the upgrade program file is the same as the burning content, which means that the internet of things device successfully downloads and upgrades the first application program.
In some embodiments, the encryption algorithm may include a hash algorithm, a message-digest algorithm (MD 5 algorithm for short), a secure hash algorithm (Secure Hash Algorithm SHA algorithm for short).
It should be noted that, if the verification check code is different from the calculation check code, the internet of things device may further download the burning attempt 3 times again, if still fails, stop the remote upgrade, report the reason of the upgrade failure to the server 30 through the URL interface, and check the correctness of the upgrade file by the platform operator and resend the remote upgrade instruction. Therefore, the remote upgrade method can be used for re-upgrading under the condition that the platform operator issues the upgrade program file which is not matched with the corresponding check code, or under the condition that the upgrade program file is illegally tampered, so that the success rate of remote upgrade is improved.
In some embodiments, the determining that the second application upgrade was successful includes the steps of:
and updating and restarting the flag bit, wherein the updated flag bit indicates that the second application program is loaded and operated after the next power-on starting.
In some embodiments, the remote upgrade method further comprises:
after upgrading from a current version to an updated version, monitoring whether the first application program or the second application program runs abnormally or not through the switching control program, and respectively counting the running failure times of the running abnormality corresponding to the first application program or the second application program;
and if the operation failure times reach a preset time threshold, switching and operating the first application program or the second application program corresponding to the current version through the switching control program.
Specifically, the data of the operation failure times of the first application program is recorded in another storage area different from the storage address of the first application program and the storage address of the second application program, the data of the operation failure times of the second application program is recorded in another storage area different from the storage address of the first application program and the storage address of the second application program, the operation failure times of the operation abnormality corresponding to the first application program and the second application program are prevented from being covered, the error probability of the available first application program or the second application program is caused to switch operation, the operation failure probability of switching operation is reduced, and the application upgrading is performed under the condition that the use of the Internet of things equipment is not affected.
When the Internet of things equipment leaves a factory, the firmware downloads three program firmware, namely switch_APP, APP1 and APP2. The switch_app will be responsible for switching the APP that should be running according to the corresponding flag bit. The functions of the APP1 and the APP2 are identical, are the APP which is operated for a long time in the normal working state of the equipment, and can be mutually used as backups for the APP operation failure. When the internet of things device is powered on, after the internet of things device runs from the switch_APP, the internet of things device is switched to APP1 or APP2 according to the corresponding zone bit, and APP1 is switched by default for the first time. After the remote upgrading instruction is issued, the downloading address of the program file and the verification MD5 code of the program are analyzed according to the corresponding instruction. According to the download address, the APP1 downloads and records the remote issuing program file into the APP2 address, the recorded content is read out after each recording and is compared with the content to be recorded, if the content is inconsistent, the recording is repeated, and the recording process is ensured to be correct.
The APP1 calculates MD5 of the recorded content, if the calculated MD5 value is inconsistent with the MD5 obtained through remote instruction analysis, upgrading fails, and the switch_APP continues to operate the APP1; if the result is consistent, indicating that the upgrading is successful, writing a corresponding flag bit to indicate that APP2 is to be switched next time, and restarting the Internet of things equipment. After restarting the Internet of things equipment, entering a switch_APP program, switching the APP2 by the switch_APP according to the flag bit written into the APP2 successfully updated, and normally running the APP2 at the moment, so that the upgrading is successful.
Because the switch_APP program has a watchdog mechanism, whether the running APP program runs normally or not can be automatically monitored, when an incorrect remote upgrade file is given out by manual misoperation, and after the remote upgrade file is burnt into an APP2 address by the Internet of things equipment, the APP2 running abnormally can be triggered at the moment, and when the running failure times reach a preset frequency threshold, the switch_APP can be automatically switched back to the APP1 capable of running normally, so that the running stability of the Internet of things equipment is ensured. When the operation failure times reach a preset time threshold, the switch_APP can be automatically switched back to the APP1 which can be normally operated to indicate that the APP1 fails to update from the version 1 to the version 2, an upgrading failure result is reported to a server by the currently operated APP, and a success result is reported by the APP operated after upgrading, so that a background operator knows whether the equipment is successfully upgraded and decides whether the equipment needs to be upgraded again or not, and if the equipment needs to be upgraded again, the operation failure times can be cleared and monitored and counted again.
In the application, the switch_APP can record the accumulated operation failure times (the times can be set) for the APP1 and the APP2 respectively, and can Switch to another APP when the accumulated operation failure times exceed a certain number. For example, the number of operation failures refers to the cumulative number of operation failures of version 2 of APP2 after the APP1 is upgraded from version 1 to version 2. If the version 2 program is an error file or has a problem, the operation failure times are accumulated every time, if the operation failure times are exceeded, the switch_APP does not attempt to operate the version 2 any more, and the operation is returned to the APP1 before updating.
The application preferably upgrades the first application program and the second application program in the same internet of things device alternately through the switching control program, so that the version of the first application program and the version of the second application program in the same internet of things device differ by one version.
For example, the current version number of APP1 is V2, the current version number of APP2 is V3, at this time, the internet of things device operates APP2 of the latest version, that is, APP2 of the V3 version, when version upgrade is required, APP1 is upgraded from V2 to V4 by using the process of the present application, after the success of the upgrade is confirmed, the internet of things device operates APP1 of the latest version, that is, APP1 of the V4 version by switching the control program, when version upgrade is required again, APP2 is upgraded from V3 to V5 by using the process of the present application, and the like, so that the number of times of upgrading the internet of things device can be reduced, and the success rate of the upgrade is improved.
When the field read after writing is inconsistent with the field actually required to be written in a certain writing, the method and the device can re-write at the moment, so that the correct content is successfully written, the success of remote upgrading of the Internet of things equipment is ensured, and the reliability and the safety of the remote upgrading are improved. According to the method, when the error file is updated remotely by the Internet of things equipment caused by manual misoperation, the Internet of things equipment can be actively switched to the other APP capable of normally operating after the operation failure is monitored, so that the operation stability of the Internet of things equipment is ensured.
Referring to fig. 1, in an embodiment of the present application, a remote upgrade system is further provided, and fig. 1 is a schematic structural diagram of the remote upgrade system provided in the embodiment of the present application, where the remote upgrade system includes: the system comprises a server and an internet of things device, wherein the internet of things device stores a switching control program, a first application program and a second application program which is the same as the first application program in a mirror image mode, storage addresses of the first application program and the second application program are different, and the internet of things device comprises:
the processing module is used for starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
the analysis module is used for analyzing and obtaining a downloading address and a verification check code address corresponding to the second application program according to the remote upgrading instruction if the remote upgrading instruction is received;
the downloading module is used for downloading and obtaining an upgrade program file corresponding to the second application program according to the downloading address, burning the upgrade program file to a storage address corresponding to the second application program, and obtaining a calculation check code corresponding to the second application program;
and the judging module is used for judging whether the upgrade program file is the same as the burning content read from the storage address, comparing whether the verification check code is the same as the calculation check code, and if the upgrade program file is the same as the burning content, the verification check code is the same as the calculation check code, determining that the second application program is successfully upgraded.
In some embodiments, the parsing module is further configured to parse, according to the remote upgrade instruction, a verification check code corresponding to the second application program;
the judging module comprises:
the computing unit is used for carrying out operation according to the burning content to obtain a computing check code corresponding to the second application program;
the comparison unit is used for comparing whether the verification check code is the same as the calculation check code;
and the processing unit is used for determining that the upgrading program file is identical to the burning content if the verification check code is identical to the calculation check code.
In some embodiments, the internet of things device further comprises:
the processing module is further configured to determine that the second application program fails to upgrade if the verification check code is different from the calculation check code;
and the downloading module is also used for downloading and obtaining the upgrade program file again according to the downloading address for burning.
In some embodiments, the processing module is further configured to update and restart the flag bit, where the updated flag bit indicates that the second application program is loaded and run after the next power-on start.
In some embodiments, the internet of things device further comprises:
the monitoring module is used for monitoring whether the first application program or the second application program runs abnormally or not through the switching control program after the current version is updated to the updated version;
the processing module is further configured to respectively count operation failure times of the operation exceptions corresponding to the first application program or the second application program, and if the operation failure times reach a preset time threshold, switch and operate the first application program or the second application program corresponding to the current version through the switching control program.
In the specific implementation, each unit may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or a plurality of entities, where each unit may refer to the foregoing method embodiment to implement remote upgrade of an application program, which is not described herein.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored on a computer-readable storage medium and loaded and executed by a processor to implement the above embodiments of the methods. Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and the beneficial effects of the remote upgrade system and the corresponding units described above may refer to the description of the remote upgrade method in the above embodiment, which is not described herein in detail.
The foregoing has described in detail a remote upgrade method and system provided by embodiments of the present application, and specific examples have been applied herein to illustrate the principles and embodiments of the present application, where the foregoing examples are provided to assist in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (10)

1. The remote upgrading method is characterized by being applied to an Internet of things device, wherein the Internet of things device stores a switching control program, a first application program and a second application program which is the same as the first application program in a mirror image mode, storage addresses of the switching control program, the first application program and the second application program are different, and the method comprises the following steps:
starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
if a remote upgrading instruction is received, analyzing according to the remote upgrading instruction to obtain a downloading address and a verification check code corresponding to the second application program;
downloading and obtaining an upgrade program file corresponding to the second application program according to the download address, burning the upgrade program file to a storage address corresponding to the second application program, and obtaining a calculation check code corresponding to the second application program;
judging whether the upgrade program file is the same as the burning content read from the storage address, and comparing whether the verification check code is the same as the calculation check code;
if the upgrade program file is the same as the burning content and the verification code is the same as the calculation verification code, determining that the upgrade of the second application program is successful;
and if the second application program is failed to upgrade, actively switching to the first application program.
2. The remote upgrade method according to claim 1, wherein the obtaining the calculated check code corresponding to the second application program includes the steps of:
and calculating according to the recorded content to obtain a calculation check code corresponding to the second application program.
3. The remote upgrade method according to claim 2, further comprising:
if the verification check code is different from the calculation check code, determining that the second application program fails to upgrade, and downloading according to the download address to obtain the upgrade program file for burning.
4. The remote upgrade method according to claim 1, wherein said determining that the upgrade of the second application program is successful comprises the steps of:
and updating and restarting the flag bit, wherein the updated flag bit indicates that the second application program is loaded and operated after the next power-on starting.
5. The remote upgrade method according to claim 1, further comprising:
after upgrading from a current version to an updated version, monitoring whether the first application program or the second application program runs abnormally or not through the switching control program, and respectively counting the running failure times of the running abnormality corresponding to the first application program or the second application program;
and if the operation failure times reach a preset time threshold, switching and operating the first application program or the second application program corresponding to the current version through the switching control program.
6. An internet of things device storing a switching control program, a first application program and a second application program identical to the first application program in mirror image, storage addresses of the first application program and the second application program being different, the internet of things device comprising:
the processing module is used for starting to operate the switching control program after power-on, and loading and operating the first application program through the switching control program and the zone bit;
the analysis module is used for analyzing and obtaining a downloading address and a verification check code address corresponding to the second application program according to the remote upgrading instruction if the remote upgrading instruction is received;
the downloading module is used for downloading and obtaining an upgrade program file corresponding to the second application program according to the downloading address;
the processing module is further configured to burn the upgrade program file to a storage address corresponding to the second application program, and obtain a calculation check code corresponding to the second application program;
the judging module is used for judging whether the upgrade program file is the same as the burning content read from the storage address, comparing whether the verification check code is the same as the calculation check code, and if the upgrade program file is the same as the burning content, the verification check code is the same as the calculation check code, determining that the second application program is successfully upgraded;
and if the second application program is failed to upgrade, actively switching to the first application program.
7. The internet of things device of claim 6, wherein the processing module comprises:
and the computing unit is used for carrying out operation according to the recorded content to obtain a computing check code corresponding to the second application program.
8. The internet of things device of claim 7, further comprising:
the processing module is further configured to determine that the second application program fails to upgrade if the verification check code is different from the calculation check code;
and the downloading module is also used for downloading and obtaining the upgrade program file again according to the downloading address for burning.
9. The internet of things device of claim 6, wherein:
and the processing module is further used for updating and restarting the zone bit, wherein the updated zone bit indicates the loading and running of the second application program after the next power-on starting.
10. The internet of things device of claim 6, further comprising:
the monitoring module is used for monitoring whether the first application program or the second application program runs abnormally or not through the switching control program after the current version is updated to the updated version;
the processing module is further configured to respectively count operation failure times of the operation exceptions corresponding to the first application program or the second application program, and if the operation failure times reach a preset time threshold, switch and operate the first application program or the second application program corresponding to the current version through the switching control program.
CN202311107603.7A 2023-08-30 2023-08-30 Remote upgrading method and Internet of things equipment Pending CN117055926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311107603.7A CN117055926A (en) 2023-08-30 2023-08-30 Remote upgrading method and Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311107603.7A CN117055926A (en) 2023-08-30 2023-08-30 Remote upgrading method and Internet of things equipment

Publications (1)

Publication Number Publication Date
CN117055926A true CN117055926A (en) 2023-11-14

Family

ID=88660765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311107603.7A Pending CN117055926A (en) 2023-08-30 2023-08-30 Remote upgrading method and Internet of things equipment

Country Status (1)

Country Link
CN (1) CN117055926A (en)

Similar Documents

Publication Publication Date Title
CN110621011B (en) OTA firmware upgrading method and system based on Bluetooth device side
US10437680B2 (en) Relay apparatus, relay method, and computer program product
EP1533695B1 (en) Updating data in a mobile terminal
US8539471B2 (en) Updating firmware of an electronic device
CN106250192B (en) Software upgrading method and system of upper computer
CN106325929B (en) Firmware upgrading method, firmware upgrading device, refrigerator and server
CN110704077A (en) Firmware remote upgrading method and device, terminal, mobile device and storage medium
JP6585072B2 (en) Safe reading of data into non-volatile memory or secure elements
WO2019062635A1 (en) Update method and device
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN108509215B (en) System software replacing method and device, terminal equipment and storage medium
CN114911500A (en) Terminal upgrading method, terminal and system
CN114840242A (en) System upgrading method and device of electronic equipment and readable storage medium
CN110597545A (en) Hot patch intelligent upgrading method and system based on OTA component
CN111459524A (en) Software upgrading method, device and system
CN113821238B (en) Method, device, mobile terminal and medium for updating external firmware of intelligent wearable device
CN114489732A (en) Method and device for updating FPGA (field programmable Gate array) firmware of equipment and electronic equipment
CN112433739B (en) Firmware upgrading method
CN113138788A (en) Air conditioner program upgrading method and air conditioner system
CN113094064A (en) Gateway software module upgrading method, device, equipment and storage medium
WO2023198056A1 (en) Firmware update method for embedded device, and embedded device
CN117055926A (en) Remote upgrading method and Internet of things equipment
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN110413302A (en) A kind of method for remote updating and system of CT equipment
CN114968314B (en) Firmware upgrading method and device for display equipment, electronic equipment and storage medium

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