CN114860292A - Terminal equipment firmware upgrading control method and device, computer equipment and medium - Google Patents

Terminal equipment firmware upgrading control method and device, computer equipment and medium Download PDF

Info

Publication number
CN114860292A
CN114860292A CN202210440900.2A CN202210440900A CN114860292A CN 114860292 A CN114860292 A CN 114860292A CN 202210440900 A CN202210440900 A CN 202210440900A CN 114860292 A CN114860292 A CN 114860292A
Authority
CN
China
Prior art keywords
terminal
firmware
application program
area
boot
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
CN202210440900.2A
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.)
Weichai Power Co Ltd
Weifang Weichai Power Technology Co Ltd
Original Assignee
Weichai Power Co Ltd
Weifang Weichai Power 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 Weichai Power Co Ltd, Weifang Weichai Power Technology Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202210440900.2A priority Critical patent/CN114860292A/en
Publication of CN114860292A publication Critical patent/CN114860292A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for controlling firmware upgrade of terminal equipment, computer equipment and a medium, wherein the method comprises the following steps: adopting a first bootstrap program to guide and execute a first application program, wherein the first application program is stored in a first application program area; executing firmware exception judgment and firmware rollback according to a first application program, wherein the firmware exception comprises: a terminal starting fault and a terminal connection cloud platform fault; when the firmware operation exception occurs, a second bootstrap program is adopted to guide and execute a second application program, and the second application program is stored in a second application program area; and performing abnormal problem investigation on the terminal equipment according to the second application program. According to the invention, through setting the double guide areas and the double application program areas, remote firmware upgrading abnormity judgment, program rollback and remote abnormity problem troubleshooting during cloud platform connection faults are executed, so that the fault tolerance of various problems in the firmware upgrading and running processes is favorably improved, and the reliability of the firmware upgrading is improved.

Description

Terminal equipment firmware upgrading control method and device, computer equipment and medium
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a method and a device for controlling firmware upgrading of terminal equipment, computer equipment and a medium.
Background
The firmware is a program stored in the hardware device for driving the device to operate, and is generally updated remotely by a user through a cloud platform or a cloud management platform.
In a firmware upgrading fault-tolerant mechanism in the prior art, generally, when it is detected that a new firmware upgraded remotely cannot be started normally, processing is performed in a firmware rollback mode, the new firmware can be started normally, but frequent restart of a terminal occurs or the terminal cannot be connected to a cloud platform in an operation process, an existing fault-tolerant mechanism cannot execute operation of the rollback firmware, and remote operation or terminal troubleshooting cannot be executed when a networking fault occurs, an operating system fault of a terminal device easily occurs, so that the terminal device cannot be used normally, and user experience is influenced.
Disclosure of Invention
The invention provides a method and a device for controlling firmware upgrading of terminal equipment, computer equipment and a medium, which are used for executing remote firmware upgrading abnormity judgment, program rollback and remote abnormity problem troubleshooting through a double boot area and a double application program area and improving the reliability of firmware upgrading.
According to an aspect of the present invention, there is provided a method for controlling firmware upgrade of a terminal device, the terminal device being provided with a first boot area, a second boot area, a first application area, and a second application area, the first application area being used for storing a first application program, the second application area being used for storing a second application program, the first boot area being used for storing a first boot program, and the second boot area being used for storing a second boot program, the method comprising:
adopting the first bootstrap program to guide and execute the first application program;
executing firmware exception judgment and firmware rollback according to the first application program, wherein the firmware exception comprises: a terminal starting fault and a terminal connection cloud platform fault;
when the firmware operation exception occurs, the second application program is guided and executed by the second guiding program;
and performing abnormal problem investigation on the terminal equipment according to the second application program.
According to another aspect of the present invention, there is provided a terminal device firmware upgrade control apparatus for executing the above firmware upgrade control method, the apparatus including: a first boot area, a second boot area, a first application area, and a second application area; the first boot area is used for storing a first boot program and adopting the first boot program to boot and execute a first application program, and the first application program is stored in the first application program area; the first application program area is used for executing firmware exception judgment and firmware rollback according to the first application program, and the firmware exception comprises: a terminal starting fault and a terminal connection cloud platform fault; the second boot area is used for storing a second boot program, and when the firmware operation is abnormal, the second boot program is adopted to boot and execute the second application program, and the second application program is stored in the second application program area; and the second application program area is used for carrying out abnormal problem troubleshooting on the terminal equipment according to the second application program.
According to another aspect of the present invention, there is provided a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above firmware upgrade control method for a terminal device when executing the program.
According to another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described terminal device firmware upgrade control method.
According to the technical scheme of the embodiment of the invention, the first boot area, the second boot area, the first application program area and the second application program area are arranged, after the terminal equipment is powered on, the first boot program of the first boot area is adopted to boot and execute the first application program, the firmware abnormity judgment and the firmware rollback are executed according to the first application program, and the firmware abnormity comprises the following steps: a terminal starting fault and a terminal connection cloud platform fault; when the firmware operation abnormity is judged to occur, the second boot program of the second boot area is adopted to guide and execute the second application program, abnormal problem troubleshooting is carried out on the terminal equipment according to the second application program, the problems that the equipment is in fault halt and the terminal cannot be remotely debugged in the operation process caused by the existing firmware upgrading fault-tolerant mechanism are solved, the fault-tolerant performance of various problems in the firmware upgrading and operation processes is improved, the reliability of firmware upgrading is improved, the equipment is in fault halt caused by remote upgrading faults is avoided, and the user experience is favorably improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal device firmware upgrade control apparatus according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
The embodiment of the invention provides a firmware upgrading control method for terminal equipment, which is applicable to an application scene that the terminal equipment cannot be started due to the use process of the terminal equipment or remote upgrading of firmware or the terminal cannot be connected to a terminal management platform due to firmware program errors.
In the embodiment of the present invention, the terminal device is provided with a first boot area, a second boot area, a first application area, and a second application area. The boot area is used for storing a boot program, and the application program area is used for storing an application program of the terminal equipment.
The first BOOT program (BOOT1) and the second BOOT program (BOOT2) are basic programs at the time of terminal startup, mainly implement the startup BOOT of the terminal firmware (jump to the corresponding application program area for execution), and are responsible for executing simple custom work, such as copying new firmware to the application program area.
Specifically, a boot zone switch may be manually set, and the terminal device controls the terminal device to start from a designated boot zone (e.g., a first boot zone or a second boot zone) according to the boot zone switch state. If the terminal equipment enters the first BOOT area after being powered on, a BOOT program (BOOT1) in the first BOOT area guides and executes the program start of the first application program area; if the terminal device enters the second BOOT area, a BOOT program (BOOT2) in the second BOOT area BOOTs the program start of the execution second application area.
Preferably, in the embodiment of the present invention, the default terminal program enters the first boot area after being powered on.
Optionally, fig. 1 is a flowchart of a method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention.
As shown in fig. 1, the method for controlling firmware upgrade of a terminal device specifically includes the following steps:
step S1: a first application is booted using a first BOOT program (BOOT 1).
Wherein the first BOOT program (BOOT1) is stored in the first BOOT area and the first application program is stored in the first application program area. The first application program area stores a plurality of subprograms required by the operation of the terminal equipment, the first application program area is a default program area operated by the terminal equipment, after the terminal equipment is powered on, the terminal equipment can automatically enter a first BOOT area, and a first BOOT program (BOOT1) is used for booting and executing the first application program stored in the first application program area.
Optionally, the first application program includes a self-checking subprogram, a cloud platform connection detection subprogram, and a firmware rollback subprogram, where the self-checking subprogram is used to execute a start operation according to the firmware currently stored in the first application program area, detect whether the start operation is normal, and record a start condition; the cloud platform connection detection subprogram is used for judging whether the terminal is connected to the cloud platform or not after being started and recording a networking result; and the firmware rollback subprogram is used for executing program rollback when the first application program cannot be normally started.
Step S2: and executing the firmware exception judgment and the firmware rollback according to the first application program.
In this step, the firmware exception judgment is executed according to the first application program, which means that whether the firmware operation exception exists is judged according to the operation result of each subprogram in the first application program; executing the firmware rollback according to the first application program refers to rolling back the firmware to a prescribed historical version firmware by running a subroutine in the first application program.
In one embodiment, performing the firmware exception determination includes: and judging whether a terminal starting fault occurs in the running process of the first application program or not, and judging whether a terminal connection cloud platform fault occurs in the running process of the first application program or not. The terminal starting failure means that the number of times of terminal equipment restarting failure reaches a preset starting number threshold (the preset starting number threshold can be 3 times); the terminal connection cloud platform fault means that the number of times that the terminal device attempts to connect to the cloud platform reaches a preset networking number threshold (for example, the preset networking number threshold may be 5 times).
In the embodiment of the invention, the firmware rollback can be executed when the terminal start fault occurs in the running process of the first application program.
Step S3: and when the firmware operation exception occurs, adopting a second BOOT program (BOOT2) to BOOT and execute a second application program.
Wherein the second BOOT program (BOOT2) is stored in the second BOOT area, and the second application program is stored in the second application program area. The second application program area is a dedicated program area for performing troubleshooting of the abnormal problem of the terminal, that is, the second application program area can enter the second boot area when a fault occurs, and the second boot program guides and executes the second application program stored in the second application program area, so as to troubleshoot the abnormal type and cause of the firmware operation.
In this step, when a fault occurs in the terminal connecting to the cloud platform, the BOOT switch is manually set to control the terminal device to enter the second BOOT area. A firmware run exception occurs, including any of: the terminal firmware can not be connected with the cloud platform for a long time, or the terminal can not be connected with the cloud platform due to other problems of the firmware.
Step S4: and carrying out abnormal problem troubleshooting on the terminal equipment according to the second application program.
The second application program has the functions of connecting the cloud platform and receiving the firmware from the cloud platform, when abnormal problems of the terminal equipment are eliminated, the terminal equipment is connected with the cloud platform through the second application program area, abnormal data of the equipment can be sent to the cloud platform, and remote operation is achieved.
In one embodiment, the second application program comprises a terminal state detection subprogram and a terminal firmware upgrading subprogram; the terminal state detection subroutine is configured to obtain operation state record data of the terminal device, where the operation state record data typically includes: starting a state flag bit and a networking state flag bit; and the terminal firmware upgrading subprogram is used for connecting the cloud platform and upgrading the firmware according to the firmware issued by the cloud platform. The cloud platform is used for managing remote upgrading of the terminal equipment and other data interaction.
Specifically, before the terminal device is powered on, the boot zone switch is manually set to control the terminal device to start from a designated boot zone (e.g., a first boot zone or a second boot zone). If the terminal is started from the first BOOT area, the first BOOT program (BOOT1) is used for booting and executing the first application program, whether a firmware operation abnormal condition (for example, the terminal is frequently restarted or the terminal cannot be connected with a cloud platform) occurs in the operation process of the first application program is judged, and if the terminal cannot be started due to the abnormal condition occurring in the operation process of the first application program, the firmware is rolled back to the specified historical version firmware. When the firmware runs abnormally, the terminal is started from the second BOOT area in a manual mode, the second application program is booted and executed by the second BOOT program (BOOT2), the terminal runs the second application program, is connected with the cloud platform, receives the firmware issued by an operator through the cloud platform, and sends a status flag bit representing the abnormal running condition of the firmware to the cloud platform, so that remote operation and troubleshooting are realized.
Therefore, according to the technical scheme of the embodiment of the invention, the terminal equipment is controlled to be started from the appointed boot area by setting the first boot area, the second boot area, the first application program area and the second application program area, and when the terminal equipment firmware is wrongly upgraded or the terminal is abnormally connected with a cloud platform after being upgraded, the terminal firmware can be automatically rolled back or manually enters an abnormal problem troubleshooting mode, so that the problems that the equipment is in fault shutdown and the terminal cannot be remotely troubleshot in the operation process due to the existing firmware upgrading fault tolerance mechanism is incomplete are solved, the fault tolerance of various problems in the firmware upgrading and operation processes is favorably improved, the reliability of firmware upgrading is improved, the equipment is prevented from being in fault shutdown due to remote upgrading faults, and the user experience is improved.
In an embodiment, before the first application program is booted and executed by using the first BOOT program (BOOT1), the method for controlling firmware upgrade of the terminal device further includes: and detecting whether the terminal equipment needs firmware upgrade by adopting a first BOOT program (BOOT1), and if the terminal equipment needs firmware upgrade, copying the firmware stored in the firmware cache region to a first application program region by the first BOOT program (BOOT1) so that the first application program runs the upgraded firmware.
Optionally, fig. 2 is a flowchart of another method for controlling firmware upgrade of a terminal device according to a first embodiment of the present invention, and on the basis of fig. 1, an execution policy of a first application is exemplarily shown, but not limited to the above method.
As shown in fig. 2, the method for controlling firmware upgrade of a terminal device specifically includes the following steps:
step S101: and judging whether the firmware is required to be upgraded or not.
If the firmware is required to be upgraded, executing the step S102; otherwise, step S1 is executed.
Step S102: copying the firmware stored in the firmware cache area to the first application program area, and returning to execute the step S101.
The firmware cache region is used for storing the firmware issued by the cloud platform when the remote firmware is upgraded.
Step S1: and adopting the first bootstrap program to guide the execution of the first application program.
The first application program has a function of detecting the firmware abnormity and rolling back the terminal firmware when the terminal is abnormally started, namely, copying the firmware which is successfully operated last time to the first application program area when the terminal is abnormally started. The execution strategy of the first application program specifically comprises the following steps:
step S201: and judging whether a terminal starting fault occurs or not.
The terminal start failure refers to a failure that a plurality of times of start failures are continued.
If a terminal start failure occurs, executing step S202; if the terminal is successfully started, step S203 is executed.
Optionally, the determining whether a terminal start failure occurs includes: judging whether the number of times of terminal start failure reaches a preset start number threshold, for example, the preset start number threshold is equal to 3; and if the number of times of terminal start failure does not reach the preset start number threshold, running and restarting by using the firmware currently stored in the first application program area.
Step S202: the firmware rollback is executed, and the execution returns to step S101.
Optionally, performing a firmware rollback comprises: and copying the historical version firmware stored in the firmware backup area to the first application program area so that the first application program is restarted by running the historical version firmware.
The firmware backup area is used for storing the firmware which is normally operated last time by the terminal equipment.
Step S203: and judging whether a fault of the terminal connected with the cloud platform occurs.
If the terminal is connected with the cloud platform, executing step S3; otherwise, step S204 is executed.
Step S204: the first application program is run to end.
Step S3: and when the firmware operation exception occurs, adopting a second BOOT program (BOOT2) to BOOT and execute a second application program.
Step S4: and carrying out abnormal problem troubleshooting on the terminal equipment according to the second application program.
Specifically, the steps S101 to S102 may be performed by a first BOOT program (BOOT1) stored in the first BOOT area, and the steps S201 to S204 may be performed by a first application program stored in the first application program area. After the terminal equipment is powered on, a first BOOT program (BOOT1) firstly detects whether new firmware needs to be upgraded to a first application program area, records the firmware upgrading condition, and copies the firmware stored in a firmware cache area to the first application program area if the firmware needs to be upgraded so as to enable the first application program area to replace the currently stored firmware with the new firmware; if there is no firmware upgrade, the first application program area continues to run the currently stored firmware requiring a firmware upgrade. After the first BOOT program (BOOT1) completes the firmware upgrade check, the BOOT program jumps to the first application program area.
Under a first application program running mode, firstly, executing a self-checking subprogram, and if the continuous running time of the program is lower than the preset time, determining that the terminal is failed to start; and judging whether the number of times of terminal start failure reaches a preset start number threshold (for example, 3 times) by using the first boot area, if the number of times of terminal start failure does not reach 3 times, the first boot area guides the execution of the first application program again, at the moment, the first application program area starts the operation by using the firmware currently stored in the first application program area, and detects whether the continuous operation time of the program is lower than the preset time again, and the steps are repeated until the terminal is started successfully, or the number of times of terminal start failure reaches 3 times. And if the number of times of terminal start failure reaches 3 times, determining that the terminal start failure occurs, executing a firmware rollback subprogram, copying the historical version firmware stored in the firmware backup area to the first application program area, and starting and running the first application program by adopting the historical version firmware after the terminal is powered on next time. If the terminal is started successfully, executing a cloud platform connection detection sub-program to automatically connect the cloud platform, and if the terminal is not connected to the cloud platform for a plurality of times (for example, 5 times), determining that a fault of the terminal connected to the cloud platform occurs, at this time, starting the terminal from a second boot area in a manual mode, and executing a second application program under the guidance of a second boot program to perform problem troubleshooting.
It should be noted that, in a default case (i.e., the boot area switch is idle), the terminal device automatically enters the first boot program area after being powered on each time, and the first boot program guides the terminal device to perform the above steps.
Therefore, according to the technical scheme of the embodiment of the invention, when the terminal cannot be started due to the fact that the firmware is remotely upgraded through the programs of the first boot area and the first application program area, the rollback fault-tolerant strategy of the terminal firmware is realized; in the manual mode, the second boot area and the second application area together complete the problem troubleshooting of abnormal conditions (for example, the terminal cannot be connected with the cloud platform, or the terminal equipment is frequently restarted due to a firmware program error) after the terminal runs for a long time, the control strategy is simple, the reliability is high, the fault tolerance of various problems in the firmware upgrading and running processes is favorably improved, and the reliability of the firmware upgrading is improved.
In an embodiment, the method for controlling firmware upgrade of a terminal device further includes: and acquiring terminal starting information and terminal networking information, and storing the terminal starting information and the terminal networking information in a first guide area. Wherein, the terminal start information includes: terminal starting time and terminal starting state; the terminal networking information comprises: terminal networking time, terminal networking status and network signal strength.
Specifically, the terminal starting state comprises a starting success state and a starting failure state, and the terminal starting time comprises starting success time and starting failure time; the terminal networking state comprises a networking success state and a networking failure state, the terminal networking time comprises networking success time and networking failure time, and the network signal strength represents the data transmission performance after the networking is successful.
Optionally, fig. 3 is a flowchart of another method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention, where a status recording function is added on the basis of fig. 1.
As shown in fig. 2, the method for controlling firmware upgrade of a terminal device specifically includes the following steps:
step S101: and judging whether the firmware is required to be upgraded or not.
If the firmware is required to be upgraded, executing the step S102; otherwise, step S1 is executed.
Step S102: copying the firmware stored in the firmware cache area to the first application program area, and returning to execute the step S101.
Step S1: and adopting the first bootstrap program to guide the execution of the first application program.
Step S201: and judging whether a terminal starting fault occurs or not.
If the terminal start failure occurs, executing step S2011; if the terminal is successfully started, step S2012 is executed.
Step S2011: the start failure time and the start failure state are recorded, and the execution continues to step S202.
Step S2012: the start success time and the start success status are recorded, and the execution continues to step S203.
Step S202: the firmware rollback is executed, and the execution returns to step S101.
Optionally, performing a firmware rollback comprises: and copying the historical version firmware stored in the firmware backup area to the first application program area so that the first application program is restarted by running the historical version firmware.
The firmware backup area is used for storing the firmware which is successfully operated last time by the terminal equipment.
Step S203: and judging whether a fault of the terminal connected with the cloud platform occurs.
If the fault that the terminal is connected with the cloud platform occurs, executing the step S2031; otherwise, step S2032 is performed.
Step S2031: the networking failure time and the networking failure status are recorded, and the process proceeds to step S3.
Step S2032: and recording the networking success time, the networking success status and the signal strength, and continuing to execute the step S204.
Step S204: and finishing the operation.
Step S3: and when the firmware operation exception occurs, adopting a second BOOT program (BOOT2) to BOOT and execute a second application program.
Step S4: and carrying out abnormal problem troubleshooting on the terminal equipment according to the second application program.
Specifically, the step S2011, the step S2012, the step S2031, and the step S2032 are configured to perform status recording, and information such as start failure time, start failure status, start success time, start success status, networking failure time, networking success status, and signal strength may be recorded in the first boot area in each operation cycle of the terminal, which is beneficial to implementing problem troubleshooting of the terminal, does not occupy an application program operation space, and is beneficial to improving performance of the terminal device.
Optionally, fig. 4 is a flowchart of a further method for controlling firmware upgrade of a terminal device according to an embodiment of the present invention, and on the basis of fig. 1, an execution policy of a second application is exemplarily shown, but not limited to the above method.
As shown in fig. 4, the step S4 includes the following steps:
step S401: and executing the terminal state detection subprogram to obtain the state record data of the terminal equipment.
Wherein the status record data includes: a start status flag bit and a networking status flag bit.
Step S402: and executing the terminal firmware upgrading subprogram.
The terminal firmware upgrading subprogram has a function of connecting the cloud platform.
Step S403: and judging whether the second application program area is connected to the cloud platform.
If the second application program area is connected to the cloud platform, executing step S404; otherwise, step S405 is executed.
Step S404: and operating the firmware issued by the cloud platform, and uploading the state record data to the cloud platform.
Step S405: and finishing the operation.
Specifically, in the manual mode, the terminal device enters the second BOOT area, and the BOOT program (BOOT2) in the second BOOT area BOOTs the execution of the second application program. After the second application program is started, firstly executing a terminal state detection subprogram, and extracting state record data (such as a starting state flag bit and a networking state flag bit) of the terminal equipment; when the terminal state detection subprogram is executed, the terminal firmware upgrading subprogram can be executed, the terminal firmware upgrading subprogram is connected with the cloud platform, and if the second application program area is connected with the cloud platform, the fault of the terminal connection cloud platform caused by the firmware problem of the first application program area can be determined; copying the firmware issued by the operating cloud platform to a second application program area, starting operation through the firmware issued by the cloud platform, and uploading the state record data of the terminal equipment to the cloud platform, so that an operator can acquire the state record data of the terminal equipment by connecting the cloud platform, and remote operation and troubleshooting are realized.
Example two
According to another aspect of the present invention, a terminal device firmware upgrade control device is provided, configured to execute the firmware upgrade control method, where the terminal device firmware upgrade control device provided in the embodiment of the present invention may execute the terminal device firmware upgrade control method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method. The terminal equipment firmware upgrading control device can be integrally arranged in the terminal equipment.
Fig. 5 is a schematic structural diagram of a terminal device firmware upgrade control apparatus according to a second embodiment of the present invention.
As shown in fig. 5, the terminal device firmware upgrade control apparatus 100 includes: a first boot area 101, a second boot area 102, a first application area 103 and a second application area 104. A first boot area 101, configured to store a first boot program, and to use the first boot program to boot and execute a first application program, where the first application program is stored in the first application program area 103; the first application program area 103 is configured to perform firmware exception determination and firmware rollback according to the first application program, where the firmware exception includes: a terminal starting fault and a terminal connection cloud platform fault; the second boot area 102 is used for storing a second boot program, and when the firmware operation exception occurs, the second boot program is used for booting and executing a second application program, and the second application program is stored in the second application program area 104; and the second application program area 104 is used for performing abnormal problem troubleshooting on the terminal equipment according to the second application program.
As shown in fig. 5, the terminal device firmware upgrade control apparatus 100 includes: a firmware cache area 105 and a firmware backup area 106, wherein the firmware cache area 105 is used for storing new firmware received by the terminal, and the firmware backup area 106 is used for storing the firmware which is successfully operated last time by the terminal device.
Optionally, the first application program area 103 is configured to determine whether a terminal start fault occurs, and execute a firmware rollback when the terminal start fault occurs; and when the terminal starting fault does not occur, executing and judging whether the fault of the terminal connection cloud platform occurs or not.
Optionally, the determining whether a terminal start failure occurs includes: judging whether the number of times of terminal start failure reaches a preset start number threshold value or not; and if the terminal start failure does not reach the preset start frequency threshold value, running and restarting by using the firmware currently stored in the first application program area.
Optionally, performing a firmware rollback comprises: the historical version firmware stored in the firmware backup area 106 is copied to the first application area so that the first application is restarted by running the historical version firmware.
Optionally, the second application program includes a terminal state detection subroutine and a terminal firmware upgrade subroutine; the terminal state detection subprogram is used for acquiring running state record data of the terminal equipment; and the terminal firmware upgrading subprogram is used for connecting the cloud platform and receiving the firmware issued by the cloud platform.
Optionally, the second application program area 104 is configured to execute a terminal state detection subprogram and a terminal firmware upgrade subprogram, and obtain operation state record data of the terminal device through the terminal state detection subprogram; executing the terminal firmware upgrading subprogram to judge whether the second application program area is connected to the cloud platform or not; and if the second application program area is connected to the cloud platform, operating the firmware issued by the cloud platform, and uploading the status flag bit to the cloud platform.
In one embodiment, the first boot area is provided with a storage unit, and the storage unit is used for storing terminal start information and terminal networking information of each operation cycle of the terminal, wherein the terminal start information includes: terminal starting time and terminal starting state; the terminal networking information comprises: terminal networking time, terminal networking status and network signal strength.
The firmware upgrade control device provided in the embodiment of the present invention sets a first boot area, a second boot area, a first application area, and a second application area, and after a terminal device is powered on, uses the first boot program in the first boot area to boot and execute a first application, and executes firmware exception judgment and firmware rollback according to the first application, where the firmware exception includes: a terminal starting fault and a terminal connection cloud platform fault; when the firmware operation abnormity is judged to occur, the second boot program of the second boot area is adopted to guide and execute the second application program, abnormal problem troubleshooting is carried out on the terminal equipment according to the second application program, the problems that the equipment is in fault halt and the terminal cannot be remotely debugged in the operation process caused by the existing firmware upgrading fault-tolerant mechanism are solved, the fault-tolerant performance of various problems in the firmware upgrading and operation processes is improved, the reliability of firmware upgrading is improved, the equipment is in fault halt caused by remote upgrading faults is avoided, and the user experience is favorably improved.
EXAMPLE III
Based on any of the above embodiments, a third embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where the processor implements the method for controlling firmware upgrade of the terminal device when executing the program, and the method has a functional module and a beneficial effect for executing the method for controlling firmware upgrade of the terminal device.
Fig. 6 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. Computer devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The computer device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the computer device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the computer device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the computer device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the computer device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the terminal device firmware upgrade control method.
In some embodiments, the terminal device firmware upgrade control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the computer device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the terminal device firmware upgrade control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the terminal device firmware upgrade control method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A terminal device firmware upgrade control method is characterized in that the terminal device is provided with a first boot area, a second boot area, a first application area and a second application area, the first application area is used for storing a first application program, the second application area is used for storing a second application program, the first boot area is used for storing a first boot program, and the second boot area is used for storing a second boot program, the method comprises the following steps:
adopting the first bootstrap program to guide and execute the first application program;
executing firmware exception judgment and firmware rollback according to the first application program, wherein the firmware exception comprises: a terminal starting fault and a terminal connection cloud platform fault;
when the firmware operation exception occurs, the second application program is guided and executed by the second guiding program;
and performing abnormal problem investigation on the terminal equipment according to the second application program.
2. The method of claim 1, wherein performing a firmware exception determination and a firmware rollback according to the first application comprises:
judging whether a terminal starting fault occurs or not;
when a terminal starting fault occurs, the first application program executes firmware rollback;
and when the terminal starting fault does not occur, the first application program executes and judges whether the fault of the terminal connection cloud platform occurs or not.
3. The method of claim 2, wherein the determining whether a terminal start-up failure occurs comprises:
judging whether the number of times of terminal start failure reaches a preset start number threshold value or not;
and if the terminal start failure does not reach the preset start frequency threshold value, running and restarting by using the firmware currently stored in the first application program area.
4. The method of claim 2, wherein the first application performs a firmware rollback comprising:
copying the historical version firmware stored in the firmware backup area to the first application program area so that the first application program is restarted by running the historical version firmware.
5. The method of claim 2, further comprising:
acquiring terminal starting information and terminal networking information, and storing the terminal starting information and the terminal networking information in the first guide area;
wherein the terminal start information includes: terminal starting time and terminal starting state; the terminal networking information includes: terminal networking time, terminal networking status and network signal strength.
6. The method according to any of claims 1-5, wherein the second application comprises a terminal state detection subroutine and a terminal firmware upgrade subroutine; the terminal state detection subprogram is used for acquiring running state record data of the terminal equipment; the terminal firmware upgrading subprogram is used for connecting a cloud platform and receiving the firmware issued by the cloud platform.
7. The method of claim 6, wherein performing troubleshooting on the terminal device according to the second application comprises:
executing the terminal state detection subprogram to obtain the running state record data of the terminal equipment;
executing the terminal firmware upgrading subprogram;
judging whether the second application program area is connected to a cloud platform;
and if the second application program area is connected to a cloud platform, operating the firmware issued by the cloud platform, and uploading the status flag bit to the cloud platform.
8. A terminal device firmware upgrade control apparatus for executing the firmware upgrade control method according to any one of claims 1 to 7, the apparatus comprising: a first boot area, a second boot area, a first application area, and a second application area;
the first boot area is used for storing a first boot program and adopting the first boot program to boot and execute a first application program, and the first application program is stored in the first application program area;
the first application program area is used for executing firmware exception judgment and firmware rollback according to the first application program, and the firmware exception comprises: a terminal starting fault and a terminal connection cloud platform fault;
the second boot area is used for storing a second boot program, and when the firmware operation is abnormal, the second boot program is adopted to boot and execute the second application program, and the second application program is stored in the second application program area;
and the second application program area is used for carrying out abnormal problem troubleshooting on the terminal equipment according to the second application program.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the firmware upgrade control method of a terminal device according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a terminal device firmware upgrade control method according to any one of claims 1 to 7.
CN202210440900.2A 2022-04-25 2022-04-25 Terminal equipment firmware upgrading control method and device, computer equipment and medium Pending CN114860292A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210440900.2A CN114860292A (en) 2022-04-25 2022-04-25 Terminal equipment firmware upgrading control method and device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210440900.2A CN114860292A (en) 2022-04-25 2022-04-25 Terminal equipment firmware upgrading control method and device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN114860292A true CN114860292A (en) 2022-08-05

Family

ID=82632590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210440900.2A Pending CN114860292A (en) 2022-04-25 2022-04-25 Terminal equipment firmware upgrading control method and device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN114860292A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700061A (en) * 2023-04-12 2023-09-05 广东为辰信息科技有限公司 Quick starting method based on safe starting technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700061A (en) * 2023-04-12 2023-09-05 广东为辰信息科技有限公司 Quick starting method based on safe starting technology
CN116700061B (en) * 2023-04-12 2024-05-03 广东为辰信息科技有限公司 Quick starting method based on safe starting technology

Similar Documents

Publication Publication Date Title
CN112948157B (en) Server fault positioning method, device and system and computer readable storage medium
CN109542744B (en) Method, device, storage medium and terminal for detecting abnormal starting problem of terminal
CN111694710A (en) Method, device and equipment for monitoring faults of substrate management controller and storage medium
CN114860292A (en) Terminal equipment firmware upgrading control method and device, computer equipment and medium
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
CN111124509A (en) Server starting method and device
CN111221683A (en) Double-flash hot backup method, system, terminal and storage medium for data center switch
CN115562900B (en) AMD server system installation power-off processing method, device, equipment and medium
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN111488246A (en) CP L D upgrading method and device, electronic equipment and readable storage medium
CN114860322A (en) Substrate management controller, control method and electronic equipment
CN115454515A (en) System processing method and device and electronic equipment
CN114995854A (en) Application program online upgrading method and device, terminal and operation machine
CN106130815B (en) Board level testing method and device
CN104834574B (en) A kind of method and device solving system partitioning damage
CN111475339A (en) BIOS firmware updating method, device, equipment and storage medium
CN111400094A (en) Method, device, equipment and medium for restoring factory settings of server system
CN113312214B (en) Method, apparatus, electronic device and storage medium for operating computer
US20220206823A1 (en) Information processing method and electronic apparatus
CN117075977A (en) Method and device for starting processor, electronic equipment and storage medium
CN117539523A (en) Firmware upgrading method, device, controller, system and storage medium
CN115202928A (en) Method and device for processing boot configuration data of operating system
CN118012660A (en) System abnormal starting recovery method, device, equipment and storage medium
CN117992305A (en) Virtual machine monitoring method and device, electronic equipment and storage medium
CN115794163A (en) BMC upgrading method and device, 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