Embedded software online upgrading method, device and equipment

By using the dual-system software partition method in embedded software upgrades, switching and maintaining the normal operating partition mount, the problem of unreliable system operation caused by abnormalities during the embedded software upgrade process is solved, ensuring the stability and reliability of the system.

CN120723264APending Publication Date: 2025-09-30EMERSON NETWORK POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410373640.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

During the upgrade process of existing embedded software, anomalies may cause the system to be unable to operate online reliably in a timely manner. Especially in high-reliability critical infrastructure, it may cause system downtime and economic losses.

Method used

Adopt the dual-system software partition method, switch the system software partition mounted in the embedded software running directory, keep one partition running normally during the upgrade process, ensure that after the software upgrade is successful, change the partition mounting at startup or restart to ensure the normal operation of the system; in abnormal circumstances, keep the original partition running and trigger a restart or upgrade again.

Benefits of technology

This ensures that even if anomalies occur during software upgrades, the system can still operate normally, avoiding system downtime and ensuring the reliability and stability of critical infrastructure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723264A_ABST
    Figure CN120723264A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded software online upgrading method, device and equipment, and is used for upgrading target embedded software in the equipment, the equipment comprises two system software partitions, and the method comprises the following steps: responding to a target embedded software upgrading instruction, and upgrading the target embedded software between the two system software partitions; switching a system software partition mounted by the target embedded software running directory; copying an upgrading software package of the target embedded software to the switched system software partition, upgrading the target embedded software, and starting the upgraded target embedded software; and under the condition that the target embedded software runs normally, changing a system software partition mounted by a software running directory during starting or restarting into the switched system software partition. Therefore, the problem that in the existing target embedded software upgrading process, if any abnormality exists, a system cannot run online and reliably in time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software upgrade technology, and in particular to a method, device and equipment for online upgrading of embedded software. Background Art

[0002] Embedded system software, such as power system monitoring software, is frequently upgraded online due to new market / customer demands (such as adding new features or improving network security) or to address inherent software bugs. The typical software upgrade process involves confirming the correctness / legitimacy of the received software package in the cache / backup area, erasing the current system software partition, and then decompressing / copying the cached software to the system software partition. The system is then restarted or the newly upgraded software program is directly run.

[0003] If any abnormality occurs during the process of erasing the system software partition or if an incorrect software program is upgraded due to human factors, the system may crash and be unable to start normally. At this time, manual intervention is required, such as burning it in production mode or re-entering the online upgrade mode to upgrade the software to repair it. This is a serious accident for high-reliability critical infrastructure such as power systems, which may cause significant economic losses to customers / markets. Summary of the Invention

[0004] The purpose of this application is to provide an embedded software online upgrade method, device and equipment to solve the problem that if there is any abnormality in the existing embedded software upgrade process, the system cannot be timely and reliably operated online.

[0005] In a first aspect, an embodiment of the present application provides an embedded software online upgrade method for upgrading target embedded software in a device, wherein the device includes two system software partitions, and the method includes:

[0006] In response to a target embedded software upgrade instruction, switching the system software partition mounted on the target embedded software running directory between the two system software partitions;

[0007] Copying the upgrade software package of the target embedded software to the switched system software partition, upgrading the target embedded software, and starting the upgraded target embedded software;

[0008] When the target embedded software runs normally, the system software partition mounted in the software running directory during startup or restart is changed to the switched system software partition.

[0009] In some possible embodiments, the method further includes:

[0010] In the case where the target embedded software runs abnormally, the system software partition mounted in the software running directory during restart is kept unchanged, and a restart operation is triggered;

[0011] Run the target embedded software in the system software partition mounted in the software running directory during the restart.

[0012] In some possible embodiments, triggering the restart operation includes:

[0013] Actively trigger a restart; or

[0014] Triggering a restart operation according to a software restart instruction or in response to a restart operation indication.

[0015] In some possible embodiments, after changing the system software partition mounted in the software execution directory at startup or restart to the switched system software partition, the method further includes:

[0016] If a restart anomaly or an abnormal operation of the target embedded software after restart is detected, the system software partition mounted in the current software running directory is automatically switched and the target embedded software in the switched system software partition is run; the system software partition mounted in the software running directory during startup or restart is automatically switched;

[0017] or

[0018] According to user instructions, switch the system software partition mounted in the current software running directory and run the target embedded software of the switched system software partition; according to user instructions, switch the system software partition mounted in the software running directory during startup or restart.

[0019] In some possible embodiments, after changing the system software partition mounted in the software execution directory at startup or restart to the switched system software partition, the method further includes:

[0020] Detecting a restart anomaly or an abnormal operation of the target embedded software after the restart, triggering the generation of a target embedded software upgrade instruction to execute another upgrade;

[0021] Wherein, when performing the upgrade again, copying the upgrade software package of the target embedded software to the switched system software partition includes:

[0022] Copy the upgrade software package of the version before the most recent successful upgrade to the system software partition after the switch.

[0023] In some possible embodiments, the following method is used to trigger the generation of the target embedded software upgrade instruction:

[0024] Receiving a software upgrade request sent by a user via remote communication, triggering the generation of a target embedded software upgrade instruction; or

[0025] According to the upgrade operation instruction indicating the upgrade of the target embedded software, a target embedded software upgrade instruction is triggered to be generated.

[0026] In some possible embodiments, switching the system software partition mounted on the target embedded software running directory includes:

[0027] Exit the currently running target embedded software, deregister related resources and reinitialize the target embedded software's operating environment;

[0028] Switch the system software partition mounted in the target embedded software running directory.

[0029] In some possible embodiments, switching the system software partition mounted on the target embedded software running directory between the two system software partitions includes:

[0030] Modify the parameters or flags of the system software partition after switching read during current / startup / restart according to the parameters or flags respectively corresponding to the two system software partitions;

[0031] According to the jumpers between the different metal contact points corresponding to the two system software partitions, the jumpers for obtaining the switched system software partition during current / startup / restart are modified through the user's hardware operation.

[0032] In some possible embodiments, after starting the upgraded target embedded software, the method further includes:

[0033] receiving directory change instructions input by a user through an interface;

[0034] According to the directory change indication, the system software partition mounted on the target embedded software running directory is switched between the two system software partitions.

[0035] In some possible embodiments, copying the upgrade software package of the target embedded software to the switched system software partition includes:

[0036] Performing a digital signature verification process on the upgrade software package of the target embedded software;

[0037] After the verification is passed, the upgrade software package of the target embedded software is copied to the switched system software partition.

[0038] In a second aspect, an embodiment of the present application provides an embedded software online upgrade device, the device comprising:

[0039] A first mounted partition switching module is configured to switch the system software partition mounted on the target embedded software running directory between the two system software partitions in response to a target embedded software upgrade instruction;

[0040] A target embedded software upgrade module, configured to copy the upgrade software package of the target embedded software to the switched system software partition, upgrade the target embedded software, and start the upgraded target embedded software;

[0041] The second mounting partition switching module is used to change the system software partition mounted in the software running directory during startup or restart to the switched system software partition when the target embedded software is running normally.

[0042] In the third aspect, another embodiment of the present application also provides an embedded software online upgrade device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any embedded software online upgrade method provided in the embodiment of the present application.

[0043] In a fourth aspect, another embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is used to enable a computer to execute any embedded software online upgrade method provided in the embodiment of the present application.

[0044] In a fifth aspect, another embodiment of the present application further provides a computer program product, including a computer program / instruction, wherein the computer program / instruction is executed by a processor to perform any embedded software online upgrade method provided in an embodiment of the present application.

[0045] The target embedded software online upgrade method, device, and apparatus provided in the embodiments of the present application set up two system software partitions to implement online upgrades and run the upgraded target embedded software. Upon confirming that the software upgrade is successful, the system software partition mounted in the software running directory during startup or restart is modified to ensure that the upgraded target embedded software runs successfully. Otherwise, the system software partition mounted in the software running directory during startup or restart is not modified. This ensures the normal operation of the target embedded software even if the software upgrade fails. This solves the problem of existing embedded software upgrade processes where any anomalies prevent the system from running online and reliably in a timely manner.

[0046] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 A flowchart of an embedded software upgrade method provided according to one embodiment of the present application;

[0049] Figure 2 A detailed flowchart of an embedded software upgrade method provided according to one embodiment of the present application is provided;

[0050] Figure 3 This is a structural diagram of an embedded software online upgrade device provided according to an embodiment of the present application;

[0051] Figure 4 The figure is a structural diagram of an embedded software online upgrade device according to one embodiment of the present application. DETAILED DESCRIPTION

[0052] To further illustrate the technical solutions provided by the embodiments of the present application, this is described in detail below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. During the actual processing process or when the control device is executed, the method can be executed in the order of the methods shown in the embodiments or drawings or in parallel.

[0053] In view of the problem in the related art that during the embedded software upgrade process, if any abnormality occurs, the system cannot be timely and reliably operated online. This application proposes an embedded software online upgrade method that can ensure the normal operation of the system regardless of any situation during the software upgrade.

[0054] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0055] Figure 1 A flow chart of an embedded software online upgrade method provided by one embodiment of the present application is shown. The method is used to upgrade embedded software in a device, wherein the device includes two system software partitions, and the two system software partitions are two different physical areas. The method includes:

[0056] Step 101, in response to a target embedded software upgrade instruction, switching the system software partition mounted in the target embedded software running directory between the two system software partitions;

[0057] The target embedded software in the embodiment of the present application may be, but is not limited to, communication power system software, and the target embedded software upgrade instruction may be triggered by software or hardware.

[0058] The above two system software partitions can be identified as the first system software partition and the second system software. When the device leaves the factory, the target embedded software of the first system software partition and the second system software partition are the same. Of course, they can also be different versions of the target embedded software, or the target embedded software is stored in the system software partition where the target embedded software running directory is mounted, and the other system software partition is empty. The upgrade software package will be copied to the above other system software partition during the next upgrade. The system software partition where the current software running directory is mounted is one of the two system software partitions, which may be the first system software partition or the second system software partition. If the current running directory is mounted on the first system software partition, then in response to the target embedded software upgrade instruction, the current running directory is mounted on the first system software partition and switched to being mounted on the second system software partition; if the current running directory is mounted on the second system software partition, then in response to the target embedded software upgrade instruction, the current running directory is mounted on the second system software partition and switched to being mounted on the first system software partition.

[0059] The embodiment of the present application switches the physical area where the target embedded software running directory is mounted between the two system software partitions, so as to save the newly upgraded target embedded software in the newly mounted system software partition while retaining the target embedded software running before the upgrade in the system software partition before the switch.

[0060] Step 102: copy the upgrade software package of the target embedded software to the switched system software partition, upgrade the target embedded software, and start the upgraded target embedded software;

[0061] In the embodiment of the present application, the software package to be upgraded is downloaded to the cache in advance. When the target embedded software upgrade instruction is triggered, the software package to be upgraded stored in the cache is copied to the system software partition mounted in the current software running directory. The target embedded software is upgraded using the software package to be upgraded in the newly mounted system software partition. Since the system software partition newly mounted in the software running directory stores the software package to be upgraded, the software startup instruction can be automatically triggered after the upgrade is completed, and the upgraded target embedded software in the newly mounted system software partition is run according to the software running directory.

[0062] Step 103 , when the target embedded software is running normally, the system software partition mounted in the software running directory during startup or restart is changed to the switched system software partition.

[0063] The embodiment of the present application can run for a period of time for verification after the target embedded software is upgraded. The operation results are used to determine whether the upgraded target embedded software can run normally. If it can run normally, it means the upgrade is successful. The system software partition mounted on the software running directory at startup or restart is changed to the system software partition after the switch, so that it is consistent with the system software partition mounted on the current software running directory. Similarly, the system software partition mounted on the software running directory at startup / restart is one of the two system software partitions. If the software running directory at startup / restart is mounted to the first system software partition before the upgrade is successful, it will be changed to be mounted to the second system software partition after the software upgrade is successful; if the software running directory at startup / restart is mounted to the second system software partition before the upgrade is successful, it will be changed to be mounted to the first system software partition after the software upgrade is successful. And the system software partition mounted on the software running directory at startup or restart after each successful upgrade is consistent with the system software partition mounted on the current software running directory. In this way, after each successful upgrade, it can be guaranteed that the upgraded target embedded software will run the next time it is started or restarted.

[0064] The device runs the target embedded software of the mounted system software partition through the software running directory to realize system operation. In the embodiment of the present application, the software running directory for startup or restart and the current software running directory are two working logical directories. The software running directory at startup or restart is the default working directory of the device or restart. When the device is started or restarted, the current software running directory is the same directory as the software running directory at startup or restart. After the device startup or restart is completed, the modification of the current software running directory does not affect the default working directory of the device or restart. It is necessary to modify the default working directory of the device startup or restart through a separate default working directory modification instruction.

[0065] In order to solve / avoid the problem that a high-reliability embedded device cannot timely and reliably run online due to any abnormality during software upgrade, an embodiment of the present application provides a method for online upgrading of target embedded software based on two physical partitions. During the upgrade process, the physical partition mounted on the software running directory is switched to achieve online upgrading and running of the upgraded software. After the software upgrade is confirmed to be successful, the system software partition mounted on the startup or restart software running directory is changed to ensure that the successfully upgraded target embedded software is run at the next startup. Otherwise, the system software partition mounted on the startup or restart software running directory is not changed to ensure that the original target embedded software can still be used.

[0066] In some possible embodiments, the method further includes:

[0067] In the case where the target embedded software runs abnormally, the system software partition mounted in the software running directory during restart is kept unchanged, and a restart operation is triggered;

[0068] Run the target embedded software in the system software partition mounted in the software running directory during the restart.

[0069] Since the target embedded software in the system software partition mounted in the software running directory during restart is the version before the upgrade, the system will still run online with the target embedded software that worked normally last time, and will not be unable to run online due to any abnormality in this software upgrade.

[0070] When it is determined that the upgrade of the target embedded software is unsuccessful, the embodiment of the present application does not change the physical partition mounted on the software running directory at the time of startup or restart and automatically triggers the restart operation. By running the target embedded software before the upgrade, the normal operation of the target embedded software is guaranteed. This method can ensure that even if any abnormality occurs during the upgrade process, such as human-induced or environmental sudden abnormality such as power failure, the target embedded software can be reliably run online according to the most recent normal state, and the system will not crash and be unable to run online.

[0071] A specific way to verify whether the upgraded target embedded software can run normally is to test certain software functions or use the target embedded software running normally for a period of time as a reference (such as 1 hour of normal operation). When no abnormal problems occur, the system software partition mounted in the software running directory at startup or restart is changed to be consistent with the system software partition mounted in the current software running directory. At this time, the software upgrade is completed.

[0072] In some possible embodiments, when verifying that the upgraded target embedded software cannot operate normally, triggering a restart operation includes:

[0073] Actively trigger a restart; or

[0074] Triggering a restart operation according to a software restart instruction or in response to a restart operation indication.

[0075] In the embodiment of the present application, when an abnormality occurs during the verification process, the system will automatically restart or trigger a restart in a passive manner. The passive manner can be inputting a software restart instruction or a restart operation instruction. The restart operation instruction can be a hardware operation, for example, the restart can be triggered by a watchdog.

[0076] In some possible embodiments, after changing the system software partition mounted on the software execution directory during startup or restart from the first system software partition to the second system software partition, the method further includes:

[0077] After changing the system software partition mounted in the software running directory at startup or restart to be consistent with the system software partition mounted in the current software running directory, it also includes: detecting a restart abnormality or an abnormal operation of the target embedded software after restart, automatically switching the system software partition mounted in the current software running directory, and running the target embedded software of the switched system software partition; automatically switching the system software partition mounted in the software running directory at startup or restart. If the most recent software upgrade is successful, a software abnormality may occur after running for a period of time, causing a restart, that is, a restart abnormality occurs. If the restart still fails to run successfully, for example, the number of restarts exceeds the set number, the system software partition mounted by automatic switching is automatically switched, and the system software partition mounted in the current software running directory is automatically switched, and the target embedded software of the switched system software partition is run; the system software partition mounted in the software running directory at startup or restart is automatically switched, so as to achieve fallback to run the target embedded software of the version before the most recent successful upgrade.

[0078] In another possible implementation, after changing the system software partition mounted in the software running directory at startup or restart to be consistent with the system software partition mounted in the current software running directory, if a restart abnormality or an abnormal operation of the target embedded software after restart is detected, a corresponding prompt message can be output, and the system software partition mounted in the current software running directory is switched according to the user's instructions, and the target embedded software of the switched system software partition is run; the system software partition mounted in the software running directory at startup or restart is switched according to the user's instructions, so that the target embedded software will be rolled back to the version before the most recent successful upgrade.

[0079] As another possible implementation, after the system software partition mounted in the software execution directory at startup or restart is changed to be consistent with the system software partition mounted in the current software execution directory, a restart anomaly or an abnormal operation of the target embedded software after restart is detected, triggering the generation of a target embedded software upgrade instruction to execute a second upgrade; wherein, when executing the second upgrade, copying the upgrade software package of the target embedded software to the switched system software partition includes: copying the upgrade software package of the version before the most recent successful upgrade to the switched system software partition. In this way, through the rollback operation of the second upgrade, the previous version of the target embedded software is executed, ensuring the normal operation of the system.

[0080] In some possible embodiments, the following method is used to trigger the generation of the target embedded software upgrade instruction:

[0081] Receiving a software upgrade request sent by a user via remote communication, triggering the generation of a target embedded software upgrade instruction; or

[0082] According to the upgrade operation instruction indicating the upgrade of the target embedded software, a target embedded software upgrade instruction is triggered to be generated.

[0083] The triggering of the target embedded software upgrade instruction can be based on a remote communication method, which can be, but is not limited to, a remote communication method such as Ethernet, CAN (Controller Area Network), or RS485, and the software upgrade request is received through the corresponding communication port. The triggering of the target embedded software upgrade instruction can also be a local hardware operation or a touch operation of the user interface, for example, it can be triggered by a local external condition such as a button, a touch screen, or the insertion of a storage device such as a USB flash drive.

[0084] In some possible embodiments, switching the system software partition mounted on the target embedded software running directory includes:

[0085] Exit the currently running target embedded software, deregister related resources and reinitialize the target embedded software's operating environment;

[0086] Switch the system software partition mounted in the target embedded software running directory.

[0087] The embodiment of the present application responds to the target embedded software upgrade instruction, exits the currently running switch, deregisters the associated system resources and reinitializes the target embedded software's operating environment, the purpose of which is to change the software running directory to the system software partition for mounting the upgrade, and to prepare for the subsequent startup verification of the newly upgraded target embedded software. Otherwise, there will be an error in mounting the system software partition for the upgrade or an error in starting the newly upgraded software.

[0088] In some possible embodiments, switching the system software partition mounted on the target embedded software running directory between the two system software partitions includes:

[0089] According to the parameters or flags corresponding to the two system software partitions respectively, modify the parameters or flags of the system software partition after switching read during current / startup / restart. Specifically, if it is necessary to switch the first system software partition currently / startup / restart mounted to the second system software partition, the parameters or flags corresponding to the first system software partition read accordingly are modified to the parameters or flags corresponding to the second system software partition. If it is necessary to switch the second system software partition currently / startup / restart mounted to the first system software partition, the parameters or flags corresponding to the second system software partition read accordingly are modified to the parameters or flags corresponding to the first system software partition.

[0090] In some possible embodiments, switching the system software partition mounted on the target embedded software running directory between the two system software partitions includes:

[0091] Based on the jumpers between the different metal contact points corresponding to the two system software partitions, the jumpers of the system software partition after switching are modified during the current / startup / restart. Specifically, if the first system software partition currently mounted / startup / restart needs to be switched to the second system software partition, the jumpers corresponding to the first system software partition obtained are modified to the jumpers corresponding to the second system software partition through the user's hardware operation. If the second system software partition currently mounted / startup / restart needs to be switched to the first system software partition, the jumpers corresponding to the second system software partition obtained are modified to the jumpers corresponding to the first system software partition through the user's hardware operation.

[0092] The embodiments of the present application involve changing the system software partition mounted in the current software running directory, and changing the system software partition mounted in the software running directory during startup / restart. Specifically, both can be achieved by setting the corresponding parameters or flags as mentioned above, or setting the corresponding jumpers. If it is currently / starting / restarting, this parameter / standard or jumper will be judged to determine which physical area to automatically mount to the software running directory and run the corresponding target embedded software.

[0093] In some possible embodiments, after starting the upgraded target embedded software, the method further includes:

[0094] receiving directory change instructions input by a user through an interface;

[0095] According to the directory change indication, the system software partition mounted on the target embedded software running directory is switched between the two system software partitions.

[0096] In the embodiment of the present application, after the newly mounted system software partition is successfully upgraded, if the user wants to return to the target embedded software version before the last software upgrade, the system software partition mounted in the current software running directory in the interface can be changed to the previously mounted system software partition, thereby supporting manual return to the state before the upgrade after a successful upgrade.

[0097] In some possible embodiments, copying the upgrade software package of the target embedded software to the switched system software partition includes:

[0098] Performing a digital signature verification process on the upgrade software package of the target embedded software;

[0099] After the verification is passed, the upgrade software package of the target embedded software is copied to the switched system software partition, thereby ensuring the upgrade correctness of the upgraded target embedded software.

[0100] The following example takes the system software partitions as physical area #1 and physical area #2, which have equal status and are mounted alternately as workspaces with each software upgrade. The detailed flow chart of the target embedded software online upgrade method in the embodiment of the present application is as follows: Figure 2 As shown, it mainly includes:

[0101] Step 201: receiving a software upgrade request triggered externally;

[0102] Step 202: Exit the currently running target embedded software and deregister the associated system resources, and initialize the target embedded software's operating environment;

[0103] Step 203: Switch the current software running directory from being mounted on physical area #1 to being mounted on physical area #2;

[0104] Step 204: Acquire and verify the software package to be upgraded in the cache, decompress and copy the verified software package to be upgraded to physical area #2, and upgrade the target embedded software.

[0105] Step 205 , verifying the upgraded target embedded software by testing certain software functions or taking the system software running normally for a period of time as a reference;

[0106] Step 206, determining whether an abnormality occurs during the verification process, if so, executing step 207, otherwise executing step 209;

[0107] Step 207: When an exception occurs during the verification process of the upgraded target embedded software, the device is actively or passively restarted;

[0108] Step 208: Since the software running directory mount parameter is still physical partition #1 during startup or restart, the target embedded software in physical partition #1 before the upgrade is run according to the startup logic, ensuring that the normally working software runs online and that any abnormality in the software upgrade will not cause the system to stop running online.

[0109] Step 209: If no abnormal problems occur, the software running directory during system startup or restart is changed from the physical area #1 before mounting to the physical area #2;

[0110] Step 210: Software upgrade ends.

[0111] After the software upgrade is successful, the software running directory is mounted in physical partition #2. After the software is successfully upgraded again, the software running directory will be switched to physical partition #1. With subsequent upgrades, the mounting of the software running directory will alternate between partition #1 and partition #2. In addition, if the user wants to roll back to the previous software version, he can also manually change the working directory to the previous partition in the interface.

[0112] Based on the same inventive concept, the present application also provides a target embedded software online upgrade device 300, such as Figure 3 As shown, the device includes:

[0113] A first mounted partition switching module 301 is configured to switch the system software partition mounted in the target embedded software running directory between the two system software partitions in response to a target embedded software upgrade instruction;

[0114] The target embedded software upgrade module 302 is used to copy the upgrade software package of the target embedded software to the switched system software partition, upgrade the target embedded software, and start the upgraded target embedded software;

[0115] The second mounted partition switching module 303 is configured to change the system software partition mounted in the software running directory during startup or restart to the switched system software partition when the target embedded software is running normally.

[0116] In some possible embodiments, the second mounting partition switching module is further configured to:

[0117] In the case where the target embedded software runs abnormally, the system software partition mounted in the software running directory during restart is kept unchanged, and a restart operation is triggered;

[0118] Run the target embedded software in the system software partition mounted in the software running directory during the restart.

[0119] In some possible embodiments, the second mounted partition switching module triggering the restart operation includes:

[0120] Actively trigger a restart; or

[0121] Triggering a restart operation according to a software restart instruction or in response to a restart operation indication.

[0122] In some possible embodiments, after the second mounting partition switching module changes the system software partition mounted in the software running directory during startup or restart to the switched system software partition, it is further configured to:

[0123] If a restart anomaly or an abnormal operation of the target embedded software after restart is detected, the system software partition mounted in the current software running directory is automatically switched and the target embedded software in the switched system software partition is run; the system software partition mounted in the software running directory during startup or restart is automatically switched;

[0124] or

[0125] According to user instructions, switch the system software partition mounted in the current software running directory and run the target embedded software of the switched system software partition; according to user instructions, switch the system software partition mounted in the software running directory during startup or restart.

[0126] In some possible embodiments, after the second mounting partition switching module changes the system software partition mounted in the software running directory during startup or restart to the switched system software partition, it is further configured to:

[0127] Detecting a restart anomaly or an abnormal operation of the target embedded software after the restart, triggering the generation of a target embedded software upgrade instruction to execute another upgrade;

[0128] Wherein, when performing the upgrade again, copying the upgrade software package of the target embedded software to the switched system software partition includes:

[0129] Copy the upgrade software package of the version before the most recent successful upgrade to the system software partition after the switch.

[0130] In some possible embodiments, the first mounted partition switching module triggers the generation of the target embedded software upgrade instruction in the following manner:

[0131] Receiving a software upgrade request sent by a user via remote communication, triggering the generation of a target embedded software upgrade instruction; or

[0132] According to the upgrade operation instruction indicating the upgrade of the target embedded software, a target embedded software upgrade instruction is triggered to be generated.

[0133] In some possible embodiments, the first mounted partition switching module switches the system software partition mounted on the target embedded software running directory, including:

[0134] Exit the currently running target embedded software, deregister related resources and reinitialize the target embedded software's operating environment;

[0135] Switch the system software partition mounted in the target embedded software running directory.

[0136] In some possible embodiments, the first mounted partition switching module switches the system software partition mounted in the target embedded software running directory between the two system software partitions, including:

[0137] Modify the parameters or flags of the system software partition after switching read during current / startup / restart according to the parameters or flags respectively corresponding to the two system software partitions;

[0138] According to the jumpers between the different metal contact points corresponding to the two system software partitions, the jumpers for obtaining the switched system software partition during current / startup / restart are modified through the user's hardware operation.

[0139] In some possible embodiments, after the target embedded software upgrade module starts the upgraded target embedded software, the method further includes:

[0140] receiving directory change instructions input by a user through an interface;

[0141] According to the directory change indication, the system software partition mounted on the target embedded software running directory is switched between the two system software partitions.

[0142] In some possible embodiments, the target embedded software upgrade module copies the upgrade software package of the target embedded software to the switched system software partition, including:

[0143] Performing a digital signature verification process on the upgrade software package of the target embedded software;

[0144] After the verification is passed, the upgrade software package of the target embedded software is copied to the switched system software partition.

[0145] After introducing the target embedded software online upgrade method and apparatus according to an exemplary embodiment of the present application, next, a target embedded software online upgrade device according to another exemplary embodiment of the present application is introduced.

[0146] In some possible implementations, according to the target embedded software online upgrade device of the present application, at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the target embedded software online upgrade method provided in the above embodiment.

[0147] Refer to the following Figure 4 hereinafter, the target embedded software online upgrade device 140 according to this embodiment of the present application is described. Figure 4 The target embedded software online upgrade device 140 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0148] like Figure 4 As shown, the target embedded software online upgrade device 140 is implemented as a general electronic device. Components of the target embedded software online upgrade device 140 may include, but are not limited to, the at least one processor 141, the at least one memory 142, and a bus 143 connecting different system components (including the memory 142 and the processor 141).

[0149] Bus 143 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, and a processor or local bus using any of a variety of bus architectures.

[0150] The memory 142 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1421 and / or a cache memory 1422 , and may further include a read-only memory (ROM) 1423 .

[0151] The memory 142 may also include a program / utility 1425 having a set (at least one) of program modules 1424, such program modules 1424 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0152] The target embedded software online upgrade device 140 can also communicate with one or more external devices 144 (e.g., a keyboard, pointing device, etc.), one or more devices that enable a user to interact with the target embedded software online upgrade device 140, and / or any device that enables the target embedded software online upgrade device 140 to communicate with one or more other electronic devices (e.g., a router, a modem, etc.). Such communication can be performed via an input / output (I / O) interface 145. Furthermore, the target embedded software online upgrade device 140 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 146. As shown in the figure, the network adapter 146 communicates with other modules of the target embedded software online upgrade device 140 via a bus 143. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the target embedded software online upgrade device 140, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0153] In some possible implementations, various aspects of a target embedded software online upgrade method provided by the present application can also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a target embedded software online upgrade method according to various exemplary embodiments of the present application described above in this specification.

[0154] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0155] The program product for online upgrading of target embedded software of the embodiment of the present application can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on electronic devices. However, the program product of the present application is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, and the program can be used by or in combination with an instruction execution system, device or device.

[0156] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0157] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0158] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user electronic device, partially on the user device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on the remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).

[0159] It should be noted that although several units or subunits of the device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, depending on the embodiment of the application, the features and functions of two or more units described above can be embodied in a single unit. Conversely, the features and functions of a single unit described above can be further divided and embodied by multiple units.

[0160] Furthermore, although the operations of the method of the present application are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0161] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0162] The present application is described with reference to the flowcharts and block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowcharts and block diagrams, as well as the combination of processes and boxes in the flowcharts and block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts. Figure 1 A process or multiple processes and boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0163] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and boxes Figure 1 The function specified in one or more boxes.

[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and boxes Figure 1 A step that specifies a function in one or more boxes.

[0165] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0166] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. An embedded software online upgrade method for upgrading target embedded software in a device, characterized in that: The device includes two system software partitions, and the method includes: In response to a target embedded software upgrade instruction, switching the system software partition mounted on the target embedded software running directory between the two system software partitions; Copying the upgrade software package of the target embedded software to the switched system software partition, upgrading the target embedded software, and starting the upgraded target embedded software; When the target embedded software runs normally, the system software partition mounted in the software running directory during startup or restart is changed to the switched system software partition.

2. The method according to claim 1, characterized in that Also includes: In the case where the target embedded software runs abnormally, the system software partition mounted in the software running directory during restart is kept unchanged, and a restart operation is triggered; Run the target embedded software in the system software partition mounted in the software running directory during the restart.

3. The method according to claim 2, characterized in that The triggering of the restart operation includes: Actively trigger a restart; or Triggering a restart operation according to a software restart instruction or in response to a restart operation indication.

4. The method according to claim 1, wherein After changing the system software partition mounted in the software running directory at startup or restart to the switched system software partition, the method further includes: If a restart anomaly or an abnormal operation of the target embedded software after restart is detected, the system software partition mounted in the current software running directory is automatically switched and the target embedded software in the switched system software partition is run; the system software partition mounted in the software running directory during startup or restart is automatically switched; or According to user instructions, switch the system software partition mounted in the current software running directory and run the target embedded software of the switched system software partition; according to user instructions, switch the system software partition mounted in the software running directory during startup or restart.

5. The method according to claim 2, characterized in that After changing the system software partition mounted in the software running directory at startup or restart to the switched system software partition, the method further includes: Detecting a restart anomaly or an abnormal operation of the target embedded software after the restart, triggering the generation of a target embedded software upgrade instruction to execute another upgrade; Wherein, when performing the upgrade again, copying the upgrade software package of the target embedded software to the switched system software partition includes: Copy the upgrade software package of the version before the most recent successful upgrade to the system software partition after the switch.

6. The method according to claim 1, characterized in that The target embedded software upgrade instruction is triggered to be generated in the following manner: Receiving a software upgrade request sent by a user via remote communication, triggering the generation of a target embedded software upgrade instruction; or According to the upgrade operation instruction indicating the upgrade of the target embedded software, a target embedded software upgrade instruction is triggered to be generated.

7. The method according to claim 1, characterized in that Switching the system software partition mounted in the target embedded software running directory includes: Exit the currently running target embedded software, deregister related resources and reinitialize the target embedded software's operating environment; Switch the system software partition mounted in the target embedded software running directory.

8. The method according to claim 1, characterized in that Switching the system software partition mounted on the target embedded software running directory between the two system software partitions includes: Modify the parameters or flags of the system software partition after switching read during current / startup / restart according to the parameters or flags respectively corresponding to the two system software partitions; According to the jumpers between the different metal contact points corresponding to the two system software partitions, the jumpers for obtaining the switched system software partition during current / startup / restart are modified through the user's hardware operation.

9. The method according to claim 1 or 2, characterized in that After starting the upgraded target embedded software, the method further includes: receiving directory change instructions input by a user through an interface; According to the directory change indication, the system software partition mounted on the target embedded software running directory is switched between the two system software partitions.

10. The method according to claim 1, characterized in that Copying the upgrade software package of the target embedded software to the switched system software partition includes: Performing a digital signature verification process on the upgrade software package of the target embedded software; After the verification is passed, the upgrade software package of the target embedded software is copied to the switched system software partition.

11. An embedded software online upgrade device, characterized in that: The device comprises: A first mounted partition switching module is configured to switch the system software partition mounted on the target embedded software running directory between the two system software partitions in response to a target embedded software upgrade instruction; A target embedded software upgrade module, configured to copy the upgrade software package of the target embedded software to the switched system software partition, upgrade the target embedded software, and start the upgraded target embedded software; The second mounting partition switching module is used to change the system software partition mounted in the software running directory during startup or restart to the switched system software partition when the target embedded software is running normally.

12. An embedded software online upgrade device, characterized in that: The invention comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1 to 10.

13. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.