CN112181454B - Remote upgrading system and method for unattended equipment - Google Patents

Remote upgrading system and method for unattended equipment Download PDF

Info

Publication number
CN112181454B
CN112181454B CN202010997890.3A CN202010997890A CN112181454B CN 112181454 B CN112181454 B CN 112181454B CN 202010997890 A CN202010997890 A CN 202010997890A CN 112181454 B CN112181454 B CN 112181454B
Authority
CN
China
Prior art keywords
upgrading
equipment
app
cloud
area
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.)
Active
Application number
CN202010997890.3A
Other languages
Chinese (zh)
Other versions
CN112181454A (en
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.)
Xian Microelectronics Technology Institute
Original Assignee
Xian Microelectronics Technology Institute
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 Xian Microelectronics Technology Institute filed Critical Xian Microelectronics Technology Institute
Priority to CN202010997890.3A priority Critical patent/CN112181454B/en
Publication of CN112181454A publication Critical patent/CN112181454A/en
Application granted granted Critical
Publication of CN112181454B publication Critical patent/CN112181454B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • 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]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

A remote upgrading system and method of unattended equipment, the system includes the embedded APP upgrade management assembly of the apparatus end, apparatus end embedded guide load module and cloud upgrade management module; the cloud end upgrading management module is communicated with the equipment end embedded APP upgrading management assembly to determine whether to initiate upgrading, wireless communication control is conducted between the cloud end upgrading management module and the equipment end embedded guiding loading module to send an upgrading packet to equipment, the equipment end embedded APP upgrading management assembly is used for receiving an upgrading command of the cloud end upgrading management module and resetting the equipment, and the equipment end embedded guiding loading module is used for receiving, carrying and skipping execution of the upgrading packet. The remote upgrading method provided by the invention overcomes the problem that the firmware upgrading of the existing unattended equipment depends on local upgrading or the remote upgrading does not have breakpoint continuous transmission capability, and can effectively reduce the operation and maintenance cost of the unattended equipment.

Description

Remote upgrading system and method for unattended equipment
Technical Field
The invention belongs to the field of firmware upgrading of Internet of things equipment, and relates to a remote upgrading system and method of unattended equipment.
Background
With the development of the internet of things technology, more and more unattended devices participate in each production link of each industry, the number of the unattended devices is huge, and part of the unattended devices are deployed in areas where people cannot conveniently reach due to the working particularity of the unattended devices. Once the device is installed, firmware version updates and maintenance are not convenient to perform in the field.
At present, firmware upgrading of unattended equipment depends on a local upgrading mode or a field upgrading mode, efficiency is low, and even if remote upgrading is carried out, the firmware upgrading does not have the capability of breakpoint resuming, so that inconvenience and resource waste are brought to software updating.
Disclosure of Invention
The invention aims to provide a remote upgrading system and a remote upgrading method for unattended equipment, aiming at solving the problem of inconvenient upgrading operation of firmware of the unattended equipment in the prior art, and effectively reducing the operation and maintenance cost of the unattended equipment.
In order to achieve the purpose, the invention has the following technical scheme:
a remote upgrading system of unattended equipment comprises an equipment end embedded APP upgrading management component APPM, an equipment end embedded boot loading module BSL and a cloud upgrading management module OTAM; the cloud end upgrading management module OTAM is communicated with the equipment end embedded APP upgrading management assembly APPM to determine whether to initiate upgrading or not, wireless communication control is carried out between the cloud end upgrading management module OTAM and the equipment end embedded boot loading module BSL to send an upgrading packet to equipment, the equipment end embedded APP upgrading management assembly APPM is used for receiving an upgrading command of the cloud end upgrading management module OTAM and resetting the equipment, the equipment end embedded boot loading module BSL is used for receiving, carrying and skipping execution of the upgrading packet, and if the upgrading cannot be carried out correctly after the set upgrading retry times, the cloud end upgrading management module OTAM enables the equipment to reset to execute the original APP; in the downloading process of the upgrade package, the equipment side records the downloading transmission progress by introducing a breakpoint position, so as to ensure that the remote upgrade has a breakpoint continuous transmission function; the storage space of the device side is divided into 3 parts: the DOWN area is used for storing codes of the upgrade package APP and is a download cache area and an upgrade package backup area; the APP area is used for storing APP codes in operation; and a BSL area for storing the BSL code.
The functions of the equipment end embedded type boot loading module BSL comprise software initialization, communication, upgrade package downloading, DOWN area verification, carrying, APP area verification and skip preparation; the breakpoint is based on the index number of the upgrade package data block, and the equipmentRecording the index number of the upgrade packet data block and continuously updating, and when the network transmission is interrupted, realizing the continuous transmission of the upgrade packet by reporting the recorded breakpoint position in the next OTA; the whole upgrade package is divided into a plurality of data blocks according to the data size transmitted each time, the total number is marked as C and D start Indicating the starting address of the DOWN region, A start The starting address of the APP area is represented, Δ represents the address offset of the DOWN area relative to the APP area, addrA (i) represents the starting address of the data block with index number i in the APP area, and AddrD (i) represents the starting address of the data block with index number i in the DOWN area, so that the following formula is satisfied:
Δ=D start -A start
AddrD(i)=AddrA(i)+Δ,i∈[0,C)
the device receives and stores the data block and updates the breakpoint position, which is recorded as BPL, b represents the breakpoint position of the network transmission interruption, i represents the index number of the data block, and then the following formula is satisfied:
BPL=b,b∈[-1,C)
i∈[0,C)
and i = b +1 when b ∈ [ -1, c-1)
When the 'breakpoint' position BPL = C-1, the cloud sends the check value of the whole upgrade package, and after the equipment receives the upgrade package check value, the BPL = -1 is updated, so that the effect of 'breakpoint continuous transmission' can be achieved no matter whether the breakpoint occurs in the transmission process of the upgrade package data block or the transmission of the upgrade package check value.
The equipment end embedded APP upgrading management component APPM is a functional component of an embedded APP, and when receiving a remote upgrading command of a cloud upgrading management module OTAM, the component completes the following two steps of operations: 1) Setting the OTAF; 2) Resetting the equipment, entering a program inlet of an equipment end embedded boot load module (BSL), and starting an OTA process; the OTAF is an equipment end upgrading identification, when the OTAF is equal to 1, the upgrading of cloud intervention is represented, and when the OTAF is equal to 0, the backup upgrading is represented.
The cloud upgrading management module OTAM has two functions: 1) Communicating with the APP software of the equipment, and sending a remote upgrade command to the APP when a new APP upgrade package exists; 2) And software communication is carried out between the embedded boot load module BSL and the equipment end, the OTA upgrading process is controlled, and the upgrading packet is continuously transmitted according to the breakpoint position of the current upgrading packet of the equipment.
The invention also provides a remote upgrading method of the unattended equipment, which comprises the following steps:
1) When a new APP version exists, initiating an upgrading requirement and setting an equipment upgrading command;
2) Receiving an upgrade command, setting an equipment terminal upgrade identifier OTAF, and resetting the equipment;
3) Operating an equipment end embedded boot loading module BSL, reporting the state of the OTA at the last time and the breakpoint position BPL = [ -1, C) of an upgrade package, wherein C represents the number of data blocks of the upgrade package, and then resetting an equipment end upgrade identifier OTAF;
4) The cloud obtains the breakpoint position and makes the index I of the current data block cur =BPL+1;
5) Cloud sending index number I cur The device receives the data block and stores the data block in the DOWN area, checks the current data block, and updates the position of the breakpoint if the check is correct, namely BPL = I cur And the cloud end responds success to the cloud end, and the cloud end obtains the next data block to continuously check; if the equipment continuously responds to the failure for a plurality of times, the cloud end sends a reset command to the equipment to reset the equipment and run the original APP;
6) After the upgrading package is completely issued by the cloud, sending a package check value of the whole upgrading package to the equipment, and updating a breakpoint position BPL = -1 by the equipment;
7) The equipment side checks the upgrade package in the DOWN area, the check result is compared with the package check value issued by the cloud, and if the two are equal, the equipment side sends 'check success' to the cloud; otherwise, sending 'verification failure' to the cloud end, and returning to the step 4) for re-execution;
8) Carrying the upgrade package by the equipment end, carrying the upgrade package to the APP area from the DOWN area, checking the upgrade package of the APP area after carrying is finished, and carrying out the next step if checking is successful; otherwise, carrying again, when the times of the two processes of accumulative carrying and APP area checking are greater than the set times, resetting and clearing the accumulative times at the equipment end, and skipping to the step 10);
9) The equipment end embedded type guide loading module BSL jumps to a new APP program entrance to run a new APP;
10 ) restarting the equipment, running a backup embedded boot loading module BSL, wherein OTAF =0, and skipping to execute the original APP if the APP area is successfully verified; otherwise, backup upgrading is carried out, namely the DOWN area is verified, if the verification is successful, the DOWN area upgrading packet is carried to the APP area, the APP area is verified, if the verification is successful, a new APP is executed in a skipping mode, and if the verification is successful, the cloud communication alarm is carried out.
Step 1) when the equipment has upgrading conditions, the upgrading conditions are that the residual electric quantity is more than 20%, and the upgrading is carried out according to three conditions:
(1) When the upgrading is normally carried out, network communication is stable, the last firmware upgrading is successful, and the existing new APP upgrading package needs to be upgraded;
(2) When the breakpoint is continuously transmitted, the network communication is unstable, and the network signal is interrupted in the process of downloading the upgrade package of the last remote upgrade;
(3) When backup upgrading is carried out, the APP area is damaged due to the fact that program codes are modified or new upgrading packages are downloaded and carried and the APP area is checked wrongly when the APP of the equipment runs.
The cloud upgrading management module OTAM initiates an upgrading command during normal upgrading;
when the breakpoint is continuously transmitted, the OTAM upgrading command of the cloud upgrading management module is effective, the last upgrading is not successful, and the command is not removed; resetting and restarting equipment, operating an equipment end embedded boot loading module BSL, and updating an equipment end upgrading identifier OTAF =0 at the moment; the equipment end carries out APP area verification, and when the verification is successful, the original APP is operated; the device APP communicates with the cloud, receives an upgrade command, sets a device end upgrade identifier OTAF, and resets the device; operating an equipment end embedded boot loading module BSL, wherein an equipment end upgrading identifier OTAF =1, communicating the equipment with a cloud end, reporting a last firmware upgrading state and a breakpoint position BPL, failing to upgrade the last time, interrupting communication in an upgrading package downloading process, and at the moment, BPL = b, b belongs to [ -1, C-1); the cloud terminal sequentially issues upgrade packages from the data blocks with the index numbers of b +1, and the receiving equipment receives successful responses to the data blocks; after the cloud finishes downloading the upgrade package, the cloud issues the package check value of the whole upgrade package to the equipment, and the equipment sets a breakpoint position BPL = -1; the equipment checks the upgrade package in the DOWN area, the check result is compared with a package check value issued by the cloud, the two are equal, and the check is successfully sent to the cloud; carrying out the transportation of the upgrade package by the equipment, and checking the upgrade package of the APP area after the transportation is finished, wherein the checking is successful; the equipment jumps to a new APP program entrance from an embedded boot load module (BSL) to run a new APP;
when the backup is upgraded, the equipment is reset and restarted, the equipment end embedded boot loading module BSL is operated, and at the moment, the equipment end upgrade identifier OTAF =0; the equipment side carries out APP area verification, and the verification fails at the moment; the equipment terminal checks the DOWN area, and if the check is successful, the upgrade package of the DOWN area is carried to the APP area; and (5) checking the APP area successfully, and skipping to execute a new APP.
Compared with the prior art, the invention has the following beneficial effects: the problem that the firmware upgrading of the existing unattended equipment depends on local upgrading or remote upgrading and does not have breakpoint continuous transmission capability is solved, and the operation and maintenance cost of the unattended equipment can be effectively reduced. The method has the characteristics of high upgrading speed, safety and reliability. Meanwhile, the method can be applied to wired or wireless (WIFI, bluetooth, 2G/3G/4G/5G communication and the like) remote upgrading of other Internet of things equipment, and has universality.
Drawings
FIG. 1 is a functional block diagram of a remote upgrade of the present invention;
FIG. 2 is a device memory partitioning of the present invention;
FIG. 3 is a state transition diagram of BSL software when OTAF equals 1 according to the present invention;
FIG. 4 is a state transition diagram of BSL software when OTAF equals 0 in accordance with the present invention;
FIG. 5 is a BSL software flow diagram of the present invention;
FIG. 6 is a block data transfer protocol diagram according to the present invention;
FIG. 7 is a schematic diagram of the storage of each data block in the storage area of the upgrade package according to the present invention;
FIG. 8 is a diagram illustrating the "breakpoint" update of the present invention;
fig. 9 is a flowchart of the cloud upgrade management module according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
The remote upgrading system of the unattended equipment comprises an equipment end embedded APP upgrading management component APPM, an equipment end embedded boot loading module BSL and a cloud upgrading management module OTAM, and is shown in figure 1.
The OTAM and the APPM are communicated to determine whether to initiate upgrading, and the OTAM and the APPM perform wireless communication control with the BSL to send an upgrading packet to the equipment. The APPM is responsible for receiving the update command (setting the update flag) of the OTAM and resetting the device. The BSL is responsible for receiving, carrying and jumping execution of the upgrade package, and if the upgrade package cannot be correctly upgraded after the set upgrade retry times, the OTAM enables the equipment to reset and execute the original APP. In addition, the equipment side records the downloading transmission progress by introducing a breakpoint position in the downloading process of the upgrade package, thereby ensuring that the remote upgrade has a breakpoint continuous transmission function.
The device end storage space is divided into 3 parts, as shown in fig. 2, a DOWN area stores codes of an upgrade package APP, and the download buffer area and the upgrade package backup area are both used; the APP area stores APP codes in operation; and a BSL area storing the BSL code.
The invention provides a remote upgrading method of unattended equipment, which comprises the following steps:
1) When a new APP version exists, the cloud end upgrading management module initiates an upgrading requirement, namely an equipment upgrading command is set;
2) The device APP communicates with the cloud, receives an upgrade command, sets an OTAF (namely OTAF =1, wherein the OTAF is a device end upgrade identifier), and resets the device;
3) After the equipment is restarted, operating the BSL, wherein the OTAF =1; the device communicates with the cloud, reports the state of the OTA last time and the breakpoint position BPL = [ -1, C) (wherein C represents the number of data blocks of the upgrade package), and then clears the OTAF (i.e. OTAF = 0);
4) CloudThe end obtains the position of the breakpoint, and makes the current data block index I cur =BPL+1;
5) Cloud sends index number I cur The device receives the data block and stores the data block into the DOWN area, checks the current data block, and updates the breakpoint position if the check is correct, namely BPL = I cur And the cloud end responds success to the cloud end, and the cloud end obtains the next data block to continue the step 5; if the equipment continuously responds to the failure for a plurality of times, the cloud end sends a reset command to the equipment to reset the equipment and run the original APP;
6) After the cloud end completely issues the upgrade package, sending a package check value of the whole upgrade package to the equipment, and updating a breakpoint position BPL = -1 by the equipment;
7) The equipment end checks the upgrade packet in the DOWN area, the check result is compared with the packet check value issued by the cloud end, the two are equal, and 'check success' is sent to the cloud end; otherwise, sending 'verification failure' to the cloud end, and restarting the downloading process of the upgrade package by the cloud end, namely step 4);
8) Carrying out carrying of the upgrade package (carrying from the DOWN area to the APP area) by the equipment end, checking the upgrade package of the APP area after carrying is finished, and carrying out the step 9 if the checking is successful; otherwise, restarting the carrying process, and when the times of accumulated carrying and correction (two processes of carrying and APP area correction are short for short) are larger than the set times, resetting and resetting the accumulated carrying and correction times at the equipment end, and jumping to the step 10);
9) The BSL of the equipment terminal jumps to a new APP program entrance to run a new APP;
10 ) restarting the device, running the BSL, wherein OTAF =0, and skipping to execute the original APP if the APP area is successfully verified; otherwise, performing backup upgrading, namely checking the DOWN region, if the checking is successful, carrying the DOWN region upgrading packet to the APP region, checking the APP region, if the checking is successful, skipping to execute a new APP, and if the checking is successful, alarming with cloud communication.
Designing an embedded boot loading module:
according to the function of the BSL software, 7 states are designed: software initialization (S1), communication (S2), upgrade package downloading (S3), DOWN area verification (S4), transportation (S5), APP area verification (S6), and skip preparation (S7), where APP running (S8) is a state of APP software, and the listing is for more clearly describing state transition, and the description of each state and transition among states are shown in fig. 3 and 4, where fig. 3 is a state transition diagram of BSL when OTAF is equal to 1 (upgrade with cloud intervention), and fig. 4 is a state transition diagram of BSL when OTAF is equal to 0 (backup upgrade). Fig. 5 is a BSL flow chart.
The breakpoint continuous transmission function of the system is based on the index number of the upgrade packet data block, the index number of the upgrade packet data block is recorded and continuously updated by the equipment, and after the network transmission is interrupted, the upgrade packet continuous transmission is realized by reporting the recorded breakpoint position in the next OTA.
The whole upgrade package can be divided into a plurality of data blocks according to the size of each data transmission quantity, the total number is marked as C, a schematic diagram of a data block transmission protocol is shown in fig. 6, a schematic diagram of a data block in a device storage area is shown in fig. 7, wherein D start Indicating the starting address of the DOWN region, A start The starting address of the APP area is represented, Δ represents the address offset of the DOWN area relative to the APP area, addrA (i) represents the starting address of the data block with index number i in the APP area, and AddrD (i) represents the starting address of the data block with index number i in the DOWN area, and then the quantities in the figure satisfy formula 1:
Δ=D start -A start
AddrD (i) = AddrA (i) + Δ, i ∈ [0, c) formula 1
The device receives, stores, and updates the "breakpoint" location, noted BPL. The update diagram of the BPL is shown in fig. 8. In the figure, b represents the position of a 'breakpoint' when network transmission interruption occurs, i represents the index number of a data block, and satisfies formula 2:
BPL=b,b∈[-1,C)
i∈[0,C)
and i = b +1 when b ∈ [ -1, c-1) equation 2
When the 'breakpoint' position BPL = C-1, the cloud sends the check value of the whole upgrade package, and the equipment updates BPL = -1 after receiving the upgrade package check value, so that the effect of 'breakpoint continuous transmission' can be achieved no matter the breakpoint occurs in the transmission process of the upgrade package data block or the transmission of the upgrade package check value.
The embedded APP upgrading management component is designed:
the APP upgrading management component is a functional component of embedded application software (APP for short), and when receiving a remote upgrading command of the cloud upgrading management module, the component completes the following two steps:
1) OTAF is set (i.e., OTAF = 1);
2) The device is reset and enters the BSL program entry to start the OTA process.
Cloud upgrading management module design:
the cloud upgrading management module has two functions:
1) Communicating with the APP software of the equipment, and sending a remote upgrade command to the APP when a new APP upgrade package exists; 2) Communicating with the BSL software of the equipment, controlling the OTA upgrading process and continuously transmitting the upgrading packet according to the breakpoint position of the current upgrading packet of the equipment.
The following specifically describes three cases of normal upgrade, breakpoint resume, and upgrade by backup, respectively:
normal upgrade
Scene 1: network communication is stable, equipment has an upgrading condition (the residual electric quantity is more than 20%), the firmware is upgraded successfully last time, the existing new APP upgrading package needs to be upgraded, and then the system upgrading process is as follows:
1) The cloud upgrading management module initiates upgrading, namely an upgrading command is set;
2) The device APP communicates with the cloud, receives an upgrade command to set the OTAF (namely OTAF = 1), and resets the device;
3) The equipment runs the BSL, at the moment, OTAF =1, the equipment and the cloud end communicate and report the firmware upgrading state and the BPL (the firmware upgrading state is successful at the last time, and the break point position is-1 at the moment);
4) The cloud end starts to issue an upgrade package from the data block with the index number of 0;
5) The cloud terminal sequentially issues data blocks and receives a successful receiving response of the equipment terminal;
6) After the cloud finishes downloading the upgrade package, issuing a package check value of the whole upgrade package to the equipment, and setting a breakpoint position BPL = -1 by the equipment;
7) The equipment checks the upgrade package in the DOWN area, the check result is compared with a package check value issued by the cloud, the two are equal, and the check is successfully sent to the cloud;
8) Carrying out carrying of the upgrade package by the equipment (carrying from the DOWN area to the APP area), checking the upgrade package of the APP area after carrying is finished, and successfully checking;
9) And the equipment jumps to a new APP program entrance from the BSL to run a new APP.
Breakpoint resume
Scene 2: network communication is unstable, monitoring equipment has upgrading conditions (the residual electric quantity is more than 20%), and when a network signal is interrupted in the process of downloading an upgrading packet of the last remote upgrading, the system upgrading process is as follows:
1) The upgrading instruction of the cloud upgrading management module is effective (the upgrading is not successful last time, and the instruction is not cleared);
2) Resetting and restarting the equipment, and running the BSL, wherein the OTAF =0;
3) The equipment end carries out APP area verification, and when the verification is successful, the original APP is operated;
4) The device APP communicates with the cloud, receives an upgrade command to set the OTAF (namely OTAF = 1), and resets the device;
5) The equipment runs BSL, at the moment, OTAF =1, the equipment communicates with the cloud, reports the firmware upgrading state and BPL (breakpoint position) of the last time, the last time of upgrading fails, communication is interrupted in the process of downloading an upgrading package, and at the moment, BPL = b, b belongs to [ -1, C-1);
6) The cloud end sequentially issues upgrade packages from the data blocks with the index numbers of b +1, and receives successful response of the equipment to each data block;
7) After the cloud finishes downloading the upgrade package, the cloud issues the package check value of the whole upgrade package to the equipment, and the equipment sets a breakpoint position BPL = -1;
8) The equipment checks the upgrade package in the DOWN area, the check result is compared with a package check value issued by the cloud, the two are equal, and the check is successfully sent to the cloud;
9) Carrying out carrying of the upgrade package (carrying from the DOWN area to the APP area) by the equipment, checking the upgrade package of the APP area after carrying is finished, and successfully checking;
10 The device jumps to the new APP program entry from the BSL to run the new APP.
Upgrade through backup
Scene 3: when the device APP is disturbed by unknown factors in operation, the program codes are modified or a new upgrade package is downloaded and corrected incorrectly (namely, the APP area is damaged), the device has upgrade conditions (the remaining power is greater than 20%), and then the system upgrade process is as follows:
1) Resetting and restarting the equipment, and running the BSL, wherein the OTAF =0;
2) The equipment side carries out APP area verification, and the verification fails at the moment;
3) The equipment terminal checks the DOWN area, and if the check is successful, the upgrade package of the DOWN area is carried to the APP area; and (5) checking the APP area successfully, and skipping to execute a new APP.
The above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the technical solution of the present invention, and it should be understood by those skilled in the art that the technical solution can be modified and replaced by a plurality of simple modifications and replacements without departing from the spirit and principle of the present invention, and the modifications and replacements also fall into the protection scope covered by the claims.

Claims (6)

1. A remote upgrading system of unattended equipment is characterized by comprising an equipment end embedded APP upgrading management component APPM, an equipment end embedded boot loading module BSL and a cloud upgrading management module OTAM; the cloud end upgrading management module OTAM is communicated with the equipment end embedded APP upgrading management component APPM to determine whether to initiate upgrading or not, wireless communication control is carried out between the cloud end upgrading management module OTAM and the equipment end embedded boot loading module BSL to send an upgrading packet to equipment, the equipment end embedded APP upgrading management component APPM is used for receiving an upgrading command of the cloud end upgrading management module OTAM and resetting the equipment, the equipment end embedded boot loading module BSL is used for receiving, carrying and skipping execution of the upgrading packet, and if the upgrading cannot be correctly carried out after the set upgrading retry times, the cloud end upgrading management module OTAM enables the equipment to reset to execute the original APP; in the downloading process of the upgrade package, the equipment side records the downloading transmission progress by introducing a breakpoint position, so as to ensure that the remote upgrade has a breakpoint continuous transmission function; the device side storage space is divided into 3 parts: the DOWN area is used for storing codes of the upgrading packet APP and is a downloading cache area and an upgrading packet backup area; the APP area is used for storing APP codes in operation; a BSL area for storing a BSL code;
the functions of the equipment end embedded boot loading module BSL comprise software initialization, communication, upgrade package downloading, DOWN area verification, carrying, APP area verification and skip preparation; the breakpoint position is based on the index number of the upgrade packet data block, the equipment records the index number of the upgrade packet data block and updates continuously, and after network transmission interruption occurs, the upgrade packet is continuously transmitted by reporting the recorded breakpoint position in the next OTA; the whole upgrade package is divided into a plurality of data blocks according to the size of the data volume transmitted each time, the total number is marked as C, and D is used for recording start Indicating the starting address of the DOWN region, A start The starting address of the APP area is represented, Δ represents the address offset of the DOWN area relative to the APP area, addrA (i) represents the starting address of the data block with index number i in the APP area, and AddrD (i) represents the starting address of the data block with index number i in the DOWN area, then the following formula is satisfied:
Δ=D start -A start
AddrD(i)=AddrA(i)+Δ,i∈[0,C)
the device receives and stores the data block and updates the breakpoint position, which is marked as BPL, b represents the breakpoint position of the network transmission interruption, i represents the index number of the data block, and then the following formula is satisfied:
BPL=b,b∈[-1,C)
i∈[0,C)
and i = b +1 when b ∈ [ -1, c-1)
When the 'breakpoint' position BPL = C-1, the cloud sends the check value of the whole upgrade package, and after the equipment receives the upgrade package check value, the BPL = -1 is updated, so that the effect of 'breakpoint continuous transmission' can be achieved no matter whether the breakpoint occurs in the transmission process of the upgrade package data block or the transmission of the upgrade package check value.
2. The system for remotely upgrading unattended equipment according to claim 1, wherein: the equipment end embedded APP upgrading management component APPM is a functional component of an embedded APP, and when receiving a remote upgrading command of a cloud upgrading management module OTAM, the component completes the following two steps of operations: 1) Setting the OTAF; 2) Resetting the equipment, entering a program inlet of an equipment end embedded boot load module (BSL), and starting an OTA process; the OTAF is an equipment end upgrading identifier, when the OTAF is equal to 1, the upgrading of cloud intervention is represented, and when the OTAF is equal to 0, the backup upgrading is represented.
3. The system for remotely upgrading unattended equipment according to claim 1, wherein: the cloud upgrading management module OTAM has two functions: 1) Communicating with the APP software of the equipment, and sending a remote upgrading command to the APP when a new APP upgrading packet exists; 2) And software communication is carried out between the embedded boot load module BSL and the equipment end, the OTA upgrading process is controlled, and the upgrading packet is continuously transmitted according to the breakpoint position of the current upgrading packet of the equipment.
4. A remote upgrading method for unattended equipment is characterized by comprising the following steps:
1) When a new APP version exists, initiating an upgrading requirement and setting an equipment upgrading command;
2) Receiving an upgrade command, setting an equipment terminal upgrade identifier OTAF, and resetting the equipment;
3) Operating an equipment end embedded boot loading module BSL, reporting the state of the OTA at the last time and the breakpoint position BPL = [ -1, C) of an upgrade package, wherein C represents the number of data blocks of the upgrade package, and then resetting an equipment end upgrade identifier OTAF;
4) The cloud obtains the position of the breakpoint, and makes the current data block index I cur =BPL+1;
5) Cloud sends index number I cur The device receives the data block and stores the data block in the DOWN area, checks the current data block, and updates the position of the breakpoint if the check is correct, namely BPL = I cur And the cloud end responds success to the cloud end, and the cloud end obtains the next data block to continuously check; if the equipment continuously responds to the failure for a plurality of times, the cloud end sends a reset command to the equipment to reset the equipment and run the original APP;
6) After the cloud end completely issues the upgrade package, sending a package check value of the whole upgrade package to the equipment, and updating a breakpoint position BPL = -1 by the equipment;
7) The device side checks the upgrade package of the DOWN area, the check result is compared with the package check value issued by the cloud side, and if the two are equal, the device side sends 'check success' to the cloud side; otherwise, sending 'verification failure' to the cloud end, and returning to the step 4) for re-execution;
8) Carrying out carrying of the upgrade package by the equipment end, carrying to an APP area from a DOWN area, checking the upgrade package of the APP area after carrying is finished, and carrying out the next step if the checking is successful; otherwise, carrying again, when the times of the two processes of accumulative carrying and APP area checking are greater than the set times, resetting and clearing the accumulative times at the equipment end, and skipping to the step 10);
9) The equipment end embedded boot loading module BSL jumps to a new APP program entrance to run a new APP;
10 ) restarting the device, operating a backup embedded boot load module BSL, wherein OTAF =0, and skipping to execute the original APP if the APP area is successfully verified; otherwise, backup upgrading is carried out, namely the DOWN area is verified, if the verification is successful, the DOWN area upgrading packet is carried to the APP area, the APP area is verified, if the verification is successful, a new APP is executed in a skipping mode, and if the verification is successful, the cloud communication alarm is carried out.
5. The remote upgrading method of the unattended equipment according to claim 4, wherein the equipment has upgrading conditions when the step 1) is performed, the upgrading conditions are that the remaining capacity is more than 20%, and the upgrading is performed according to three conditions: when the upgrading is normally carried out, network communication is stable, the last firmware upgrading is successful, and the existing new APP upgrading package needs to be upgraded; when the breakpoint is continuously transmitted, the network communication is unstable, and the network signal is interrupted in the process of downloading the upgrade package of the last remote upgrade; when backup upgrading is carried out, the APP area is damaged due to the fact that program codes are modified or a new upgrading package is downloaded and is carried and verified by the APP area in error when the APP of the equipment runs.
6. The method for remotely upgrading unattended equipment according to claim 5, wherein:
the cloud upgrading management module OTAM initiates an upgrading command during normal upgrading;
when the breakpoint is continuously transmitted, the upgrading command of the cloud upgrading management module OTAM is effective, the last upgrading is not successful, and the upgrading command of the cloud upgrading management module OTAM is not removed; resetting and restarting the equipment, operating an equipment end embedded boot loading module BSL, and at the moment, updating an equipment end upgrading identifier OTAF =0; the equipment end carries out APP area verification, and when the verification is successful, the original APP is operated; the device APP is communicated with the cloud, the device end upgrading identifier OTAF is set after an upgrading command is received, and the device is reset; operating an equipment end embedded boot loading module BSL, wherein an equipment end upgrading identifier OTAF =1, communicating the equipment with a cloud end, reporting a last firmware upgrading state and a breakpoint position BPL, failing to upgrade the last time, interrupting communication in an upgrading package downloading process, and at the moment, BPL = b, b belongs to [ -1, C-1); the cloud end sequentially issues upgrade packages from the data blocks with the index numbers of b +1, and receives successful response of the equipment to each data block; after the cloud finishes downloading the upgrade package, the cloud issues the package check value of the whole upgrade package to the equipment, and the equipment sets a breakpoint position BPL = -1; the equipment checks the upgrade package in the DOWN area, the check result is compared with a package check value issued by the cloud, the two are equal, and the check is successfully sent to the cloud; carrying out the transportation of the upgrade package by the equipment, and checking the upgrade package of the APP area after the transportation is finished, wherein the checking is successful; the equipment jumps to a new APP program entrance from an embedded boot load module (BSL) to run a new APP;
when the backup is upgraded, the equipment is reset and restarted, the equipment end embedded boot loading module BSL is operated, and at the moment, the equipment end upgrade identifier OTAF =0; the equipment side checks the APP area, and at the moment, the check fails; the equipment terminal checks the DOWN area, and if the check is successful, the upgrade package of the DOWN area is carried to the APP area; and (5) checking the APP area successfully, and skipping to execute the new APP.
CN202010997890.3A 2020-09-21 2020-09-21 Remote upgrading system and method for unattended equipment Active CN112181454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010997890.3A CN112181454B (en) 2020-09-21 2020-09-21 Remote upgrading system and method for unattended equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010997890.3A CN112181454B (en) 2020-09-21 2020-09-21 Remote upgrading system and method for unattended equipment

Publications (2)

Publication Number Publication Date
CN112181454A CN112181454A (en) 2021-01-05
CN112181454B true CN112181454B (en) 2023-04-07

Family

ID=73956384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010997890.3A Active CN112181454B (en) 2020-09-21 2020-09-21 Remote upgrading system and method for unattended equipment

Country Status (1)

Country Link
CN (1) CN112181454B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658120B (en) * 2022-12-27 2023-05-09 成都万创科技股份有限公司 Universal OTA upgrading method for microcomputer

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1052571A2 (en) * 1999-05-13 2000-11-15 ECI Telecom Ltd. A method and apparatus for downloading software into an embedded-system
WO2002084484A2 (en) * 2001-04-18 2002-10-24 Domosys Corporation Method of remotely upgrading firmware in field-deployed devices
CN101132573A (en) * 2006-08-23 2008-02-27 中兴通讯股份有限公司 Method for implementing terminal batch upgrading
KR20080023064A (en) * 2006-09-08 2008-03-12 삼성전자주식회사 Program update method and system for wireless communication terminal
CN101877723A (en) * 2010-06-18 2010-11-03 中兴通讯股份有限公司 Wireless sensor network node remote update system, method and equipment
CN102023876A (en) * 2009-09-14 2011-04-20 漳州科能电器有限公司 Embedded system capable of upgrading software on line and online upgrading method
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system
WO2012100535A1 (en) * 2011-01-30 2012-08-02 华为技术有限公司 Updating method and computer system for hypervisor components
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN107800786A (en) * 2017-10-20 2018-03-13 南京晓庄学院 A kind of intelligent terminal remote upgrade breakpoint transmission method
CN110134418A (en) * 2019-05-10 2019-08-16 上海擎感智能科技有限公司 Vehicle upgrade method and device, storage medium and terminal based on space download technology
CN111240713A (en) * 2019-12-28 2020-06-05 杭州拓深科技有限公司 Method for detecting remote breakpoint continuous transmission through power utilization

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1052571A2 (en) * 1999-05-13 2000-11-15 ECI Telecom Ltd. A method and apparatus for downloading software into an embedded-system
WO2002084484A2 (en) * 2001-04-18 2002-10-24 Domosys Corporation Method of remotely upgrading firmware in field-deployed devices
CN101132573A (en) * 2006-08-23 2008-02-27 中兴通讯股份有限公司 Method for implementing terminal batch upgrading
KR20080023064A (en) * 2006-09-08 2008-03-12 삼성전자주식회사 Program update method and system for wireless communication terminal
CN102023876A (en) * 2009-09-14 2011-04-20 漳州科能电器有限公司 Embedded system capable of upgrading software on line and online upgrading method
CN101877723A (en) * 2010-06-18 2010-11-03 中兴通讯股份有限公司 Wireless sensor network node remote update system, method and equipment
WO2012100535A1 (en) * 2011-01-30 2012-08-02 华为技术有限公司 Updating method and computer system for hypervisor components
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system
CN103530146A (en) * 2013-09-16 2014-01-22 成都交大光芒科技股份有限公司 Low-power-consumption embedded device remote wireless updating method
CN107800786A (en) * 2017-10-20 2018-03-13 南京晓庄学院 A kind of intelligent terminal remote upgrade breakpoint transmission method
CN110134418A (en) * 2019-05-10 2019-08-16 上海擎感智能科技有限公司 Vehicle upgrade method and device, storage medium and terminal based on space download technology
CN111240713A (en) * 2019-12-28 2020-06-05 杭州拓深科技有限公司 Method for detecting remote breakpoint continuous transmission through power utilization

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于GPRS的STM32固件远程升级系统;牛军浩等;《现代信息科技》;20191210(第23期);全文 *
基于IAP的单片机软件远程升级;黄家升;《舰船电子对抗》;20070625(第03期);全文 *

Also Published As

Publication number Publication date
CN112181454A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN104090796B (en) A kind of embedded device method for updating program and system
CN106569847B (en) Method for vehicle-mounted system to realize IAP remote upgrade based on mobile network
CN110621011B (en) OTA firmware upgrading method and system based on Bluetooth device side
CN110096294B (en) Method for wirelessly upgrading MCU application program at any breakpoint
WO2021083244A1 (en) Multi-device batch firmware upgrade method for mesh network device
CN104899065A (en) Method and system for batch online recovery and software online upgrading
CN105183515A (en) Cloud deck firmware updating method and device
CN106874054B (en) Method and system for on-line upgrading module program in repeater
CN105677398A (en) Universal embedded computer software on-line upgrading method
CN101951391A (en) Method, device and system for remotely upgrading monitoring equipment
CN114616544A (en) Firmware data processing method and device
CN112181454B (en) Remote upgrading system and method for unattended equipment
CN105573794A (en) Long-distance updating method and system for embedded system software
CN104965747A (en) Method and device for upgrading software
CN111522571A (en) Equipment upgrading method and device, terminal equipment and storage medium
CN103631611A (en) Method and equipment for updating optical transmitter and receiver
CN112596764B (en) Internet of things monitoring method and device based on NB-IoT remote upgrade
CN110609691A (en) Method for remotely updating DSP program
CN114546455A (en) MCU software upgrading method and device for double partitions
CN103634398A (en) MOST network-based software upgrading method
CN111813597A (en) Air conditioner
CN114518892A (en) Remote upgrading method and system
CN110427286B (en) Gateway server main and standby system recovery method
CN112527342A (en) Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware
CN115495112A (en) Software upgrading method, device, cooking device and readable 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
GR01 Patent grant
GR01 Patent grant