WO2021115477A1 - 程序升级方法、装置、电子设备及存储介质 - Google Patents

程序升级方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021115477A1
WO2021115477A1 PCT/CN2020/136077 CN2020136077W WO2021115477A1 WO 2021115477 A1 WO2021115477 A1 WO 2021115477A1 CN 2020136077 W CN2020136077 W CN 2020136077W WO 2021115477 A1 WO2021115477 A1 WO 2021115477A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
group
upgrade
program
updated
Prior art date
Application number
PCT/CN2020/136077
Other languages
English (en)
French (fr)
Inventor
程俊
张伟
石思潮
周华敏
沈星
李建国
李秋实
穆芬
张怡然
张强
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021115477A1 publication Critical patent/WO2021115477A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • This application relates to the field of power supplies, and in particular to a program upgrade method, device, electronic equipment, and storage medium.
  • the power module when the power module is being upgraded, it will shut down, and it will not be able to supply power normally after shutting down, resulting in insufficient power supply for the device, which in turn causes the device to fail to work normally.
  • An external power supply or an additional backup power module can be configured to supplement the power supply for the device. If the device is a communication device and it is installed on a high pole, it is difficult to connect an external power source at this time. The additional configuration of a backup power module will result in more power consumption, leading to an increase in the power supply cost of the device.
  • This application provides methods, devices, electronic equipment, and storage media for program upgrades.
  • An embodiment of the present application provides a program upgrade method, including: running a first application program group; during the running of the first application program group, obtaining an upgrade package of an application program to be upgraded, and updating the first application program group according to the upgrade package.
  • the application program to be upgraded in the second application program group the first application program group is the same as the second application program group, the first application program group is located in the first storage area, and the second application program group is located in the first storage area.
  • Two storage areas; the update of the application to be upgraded in the second application group is completed, run the updated second application group, and update the application to be upgraded in the first application group according to the upgrade package Program so that the updated first application group is the same as the updated second application group.
  • An embodiment of the present application provides a program upgrade device, including: a current application program group running module, used to run a first application program group; an upgrade package upgrade module, used to obtain during the operation of the first application program group Upgrade package of the application program to be upgraded, and update the application program to be upgraded in the second application program group according to the upgrade package, the first application program group is the same as the second application program group, and the first application program The group is located in the first storage area, and the second application group is located in the second storage area, so that the updated first application group is the same as the updated second application group; the application group running module is updated for After the update of the application program to be upgraded in the second application program group is completed, the updated second application program group is run, and the application program to be upgraded in the first application program group is updated according to the upgrade package.
  • An embodiment of the present application provides an electronic device, including: at least one processor and a memory; the processor is configured to execute a program stored in the memory to implement any method in the embodiments of the present application.
  • the embodiment of the present application provides a storage medium storing a computer program, and when the computer program is executed by a processor, any one of the methods in the embodiments of the present application is implemented.
  • Fig. 1 is a flowchart of a program upgrade method in an embodiment of the application
  • Figure 2 is a schematic diagram of a storage area in an embodiment of the application.
  • FIG. 3 is a schematic diagram of an application group storage area in a storage area in an embodiment of the application
  • FIG. 4 is a schematic diagram of a storage area before upgrade in an embodiment of the application
  • FIG. 5 is a schematic diagram of the upgraded storage area in an embodiment of the application.
  • FIG. 6 is a schematic diagram of a single CPU running a non-main application program in a flash memory in an embodiment of the application;
  • FIG. 7 is a schematic diagram of a dual CPU running a non-main application program in a flash memory in an embodiment of the application
  • FIG. 8 is a schematic diagram of a single CPU running a non-main application program in the memory in an embodiment of the application;
  • FIG. 9 is a schematic diagram of dual CPUs running non-main application programs in memory in an embodiment of the application.
  • FIG. 10 is a schematic diagram of a power supply device in an embodiment of the application.
  • FIG. 11 is a flowchart of a program upgrade method applied to a power supply device in an embodiment of the application
  • FIG. 12 is a flowchart of a program upgrade method applied to a power supply device in an embodiment of the application
  • FIG. 13 is a schematic diagram of a program upgrade device in an embodiment of the application.
  • FIG. 14 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention.
  • FIG. 1 is a flowchart of a program upgrade method provided by an embodiment of the application. This embodiment is applicable to the situation where the application program in the electronic device is upgraded when the electronic device is working normally.
  • the method can be provided by the embodiment of the application.
  • the program upgrade device is implemented, which can be implemented by software and/or hardware, and can generally be integrated into electronic equipment. As shown in Figure 1, it specifically includes:
  • the first application program group is a collection of application programs required by the electronic device to realize normal operation. At least one application can be included.
  • the electronic device is a power device, which may be a power device integrated by one or more power modules.
  • the power supply is used to supply power to communication equipment.
  • the running the first application group includes: running the first main application in the first application group.
  • the application program group includes a main application program and at least one non-main application program.
  • the main application is used to implement the functions of the electronic device.
  • the running of the main application it needs to obtain the running result of at least one non-main application (which may be the final result of running or the intermediate result of running) before it can run normally or continue to run.
  • the running of the main application is associated with other non-main applications in the application group.
  • running the first application group actually means starting to run from the first address of the first main application in the first application group. More specifically, loading the first main application on the processor (Central Processing Unit (CPU) starts to run in the memory. At the same time, the operation of the first main application program may involve the operation of the first non-main application program of the first application group except the first main application program or the operation result provided by the historical operation.
  • CPU Central Processing Unit
  • the first main application program is always running and waiting for a trigger signal to respond.
  • the trigger signal may be issued by the first non-main application program.
  • the completion of a response can be regarded as the completion of the current round of task execution of the first main application.
  • the main application program is a control program that sets the DC voltage function for feedback control output, where the main application program needs to obtain the feedback value, process the feedback value, obtain the corresponding control instruction, and send it to at least one external Set up equipment to control each peripheral device to increase or decrease the voltage in the circuit, so as to ensure that the voltage is stable at the target DC voltage value, where the feedback value is obtained by the operation of the non-main application program.
  • the main application and the non-main application are running at different times.
  • the upgrade of the non-main application program will affect the result or the running process of the main application program. Only the upgrade of the non-main application program.
  • the power module in the prior art also needs to be restarted, and the normal operation of the power module cannot be realized. Perform online program upgrades.
  • the completion of the current round of task execution of the main application program may refer to the completion of a feedback control output.
  • the main application program needs to generate a feedback value according to the transient change. Send the corresponding control command to control the peripheral device to respond to the transient change.
  • a feedback control output is completed, that is, the current round of task execution of the main application program is completed; or
  • a feedback control output is completed, that is, the current round of task execution of the main application program is completed.
  • the application group storage area is used to store a main application program and a non-main application program
  • the main application program is loaded into the memory to run
  • the program runs by being loaded into the memory, or runs in a storage area formed by the first storage area and the second storage area.
  • the main application is loaded and run in the memory, which can improve the real-time performance of the main application.
  • the real-time requirements of non-main application programs and bootloaders are not high, and they can be loaded and run in the memory or run directly in the flash memory (Flash).
  • flash flash memory
  • the storage area also stores data required by the application program or running results output by the application program, etc.
  • the real-time performance of the application can be improved.
  • computing resources can be allocated reasonably, the burden of memory can be reduced, and the number of IOs can be reduced.
  • the application to be upgraded refers to the application in the application group that needs to be upgraded.
  • the upgrade package is used to upgrade at least one application program to be upgraded, and includes update data corresponding to at least one application program to be upgraded.
  • the first application program group always keeps normal operation. That is, the operation of the first application program group and the upgrading of the application program to be upgraded in the second application program group are performed at the same time.
  • the first application group is the same as the second application group, indicating that the first application group and the second application group can implement the same function, and the electronic device can replace the first application group and the second application group to run, both can be To achieve normal operation, for example, to supply power to communication equipment normally.
  • the first application program group and the second application program group are both used for the power supply device to realize the output setting DC voltage conversion function based on feedback control, so as to provide the target DC voltage for the communication device.
  • the first application group and the second application group are the same when the power supply device leaves the factory, and at the same time, after each update, the first application group and the second application group are the same.
  • the first application group is located in the first storage area
  • the second application group is located in the second storage area, indicating that the first application group and the second application group are stored in different locations.
  • the first storage area and the second storage area are both areas in the storage area, and the stored data is the same.
  • the storage area is actually the area on the Flash.
  • the first storage area and the second storage area each include a bootloader storage area and an application group storage area.
  • the first storage area is the same, the application group is located in the application group storage area, the boot loader is located in the boot loader storage area, and the boot loader is used to update the application program to be upgraded according to the upgrade package, and boot loading Application group.
  • the bootloader is a program that runs before the operating system kernel runs, and is used to initialize hardware devices and establish a map of memory space, etc., to build the software and hardware environment required for the operating system kernel to run Call the operating system kernel correctly in the environment.
  • the application programs of the application program group all use the operating system as the operating environment.
  • the boot loader runs before the application group runs and has the authority to upgrade the application group, so the boot loader is used to update the application to be upgraded according to the upgrade package.
  • Both the first storage area and the second storage area store a boot loader and an application program group, that is, separately obtaining the stored data in each storage area can realize independent and correct operation of the application program group, thereby realizing the normal operation of the electronic device. It is understandable that the first storage area and the second storage area are not only mutual backups, but also programs that can run normally are stored in each storage area.
  • each storage area stores application program groups and bootloaders, to ensure that the programs in each storage area can run independently and normally, and to keep the programs in the two storage areas synchronized to ensure that the two storage areas
  • the programs in the area can be replaced with each other to ensure that the programs in the application group can be upgraded online.
  • the application group storage area includes at least one functional unit area, different functional unit areas store different applications in the application group, and different functional unit areas are stored in different Flash areas.
  • the application program group storage area is divided according to the application program. As shown in FIG. 3, the corresponding relationship between the application program and the functional unit area can be established to facilitate the identification of the storage location of the application program to be upgraded. Update the functional unit area corresponding to the application program to be upgraded, reducing the workload of program upgrading and improving the efficiency of program upgrading.
  • a functional unit area is a Flash area, specifically a Flash sector. A unique digital number can be assigned to each Flash area.
  • a Flash area may be one Flash physical sector or multiple Flash physical sectors, that is, there is a single mapping relationship between the functional unit area and the digital number of the Flash area.
  • Application program group The storage area includes at least one of the following: a functional unit area for storing main application programs, a functional unit area for storing peripheral initialization program data, and a functional unit area for storing task scheduler data.
  • the upgrade package includes the data of all functional unit areas in the application group storage area, including not only the data of the functional unit areas that do not need to be updated, but also the data of the functional unit areas that need to be updated.
  • the data of the functional unit area that does not need to be updated is the same as the data of the corresponding functional unit area in the application group storage area, and the data of the functional unit area that needs to be updated is different from the data of the corresponding functional unit area in the application group storage area.
  • the data in the upgrade package can be directly written to the application group storage area. As a result, the data in the functional unit area that needs to be updated in the application group storage area is updated, and the data in the functional unit area that does not need to be updated remains unchanged. Thereby, the program of the application group can be upgraded.
  • the information of the functional unit area that needs to be updated can also be obtained through the upgrade package, and only the functional unit area that needs to be updated in the application group storage area can be updated to realize the incremental update program.
  • the updating the application to be upgraded in the second application group according to the upgrade package includes: obtaining at least one functional unit area to be updated that matches the upgrade package;
  • the function or function interface in the bootloader area of the first storage area erases the data in each functional unit area to be updated in the second storage area, and writes the upgrade package.
  • the functional unit area to be updated stores the application program to be upgraded, that is, the functional unit area to be updated is the functional unit area that needs to be updated in the application program group storage area.
  • a functional unit area to be updated stores a corresponding application program to be updated.
  • the information of the functional unit area to be updated is used to determine the functional unit area to be updated. Specifically, it may refer to the identification information of the functional unit area to be updated, such as the storage location in the storage area or the area number of the functional unit area to be updated.
  • the upgrade of the application program to be upgraded is actually to update the corresponding update data in the upgrade package to the functional unit area to be updated that stores the application program to be upgraded. Specifically, the functional unit area to be updated is erased and the upgrade package is Write the corresponding update data in.
  • the currently running program is the first application group, that is, the operating environment of the first application group at this time is built by the bootloader in the first storage area, and the upgrade of the application group is performed by the bootloader Program implementation.
  • the function or function interface is used to realize functions such as erasing and writing of the storage area of the application group.
  • the function interface or function in the storage area of the bootloader can be called to realize the operation of the bootloader to erase the data in each functional unit area to be updated, and to write the upgrade package, so as to realize the realization of the data in each functional unit area to be updated.
  • the stored applications to be upgraded are upgraded.
  • the acquiring at least one functional unit area to be updated that matches the upgrade package includes: receiving information about at least one functional unit area to be updated that matches the upgrade package; or according to the The upgrade package and the application program group determine the information of at least one functional unit area to be updated that matches the upgrade package.
  • the information of the functional unit area to be updated sent by the upgrade interaction unit that communicates with the electronic device may be directly received, where the upgrade interaction unit may communicate with the electronic device through wired or wireless communication.
  • the upgrade interactive unit can receive the .out file or hex file that stores the data stored in the application group storage area, which is used to store the code data corresponding to the application group and the upgrade package file, compare it, and query the functional unit area with differences
  • the file can be received through wired (such as U disk transmission) or wireless network transmission.
  • the electronic device directly compares the .out file or hex file of the data stored in the application group storage area and the upgrade package file, queries the functional unit area with differences, and determines at least one functional unit area to be updated that matches the upgrade package Information.
  • the functional unit area to be updated that needs to be updated can be determined, and the functional unit area to be updated can be accurately determined, thereby achieving incremental upgrades and avoiding all application group storage areas Updates result in a large workload and low efficiency of the update, thereby improving the efficiency of updating the application group storage area and increasing the speed of application upgrades.
  • the memory includes a main application core information fixed area and a main application core information reserved area.
  • the main application core information fixed area is used to store current core parameters required for the operation of the main application.
  • the main application core information reserved area is used to store the extended core parameters required for the operation of the main application, the memory address of each core parameter is fixed, and the core parameter is used by the first main application and the second main application.
  • the current core parameters may refer to static variables or global variables required by the main application in the application group.
  • the main application core information fixed area is used to store the current core parameters.
  • the extended core parameters can refer to the data that is currently not needed by the main application in the application group, but the static variables or global variables required in the future. For example, it can be the static variables or global variables required by the main application after the upgrade.
  • the initial value of the extended core parameter is 0, which needs to be assigned later.
  • the main application core information reserved area is used to store extended core parameters. Both the current core parameters and the extended core parameters are used by the first main application and the second main application.
  • the storage locations of the main application core information fixed area and the main application core information reserved area are fixed, and the memory address of each core parameter (including the current core parameter and the extended core parameter) stored therein is also fixed.
  • the initial value of the extended core parameter is 0, and the main application needs to add a new core parameter.
  • the core parameter is the value of the current core parameter (such as x) plus 1, and the extended core parameter can be assigned a value of x+1.
  • the extended core parameters are used as static variables or global variables of the main application during the running of the main application.
  • the core parameters associated with the application group before and after the application group switch that is, for the core information associated with the application group before the switch to be used by the application group after the switch
  • these core parameters need to be stored in a fixed storage location in the preset memory, so that the first application group and the second application group Both can be obtained from the storage location in the preset memory.
  • Configuring the core parameters directly in the memory can increase the speed of obtaining the core parameters, thereby increasing the speed of the main application switching operation.
  • the core parameters associated with the first application group can be used by the second application group, ensuring that the first application group and the second application group Switch the continuity of the core parameters during the operation, so as to ensure the stable operation of the electronic equipment.
  • the update of the application program to be upgraded in the second application program group is completed, indicating that this program upgrade is completed, and at least one application program to be upgraded that needs to be upgraded in this program upgrade has been upgraded.
  • Running the updated second application group that is, the electronic device changes from running the first application group to running the updated second application group, which actually changes from running the pre-upgraded application group to running the upgraded application Program group, so as to realize online upgrade program.
  • the program upgrade method, device, electronic device, and storage medium provided in the embodiments of the present application update the second application program group that is the same as the first application program group when the first application program group is running, and update the second application program group in the second application program group.
  • the running the updated second application group includes: verifying the updated second application group; if the calculated verification code matches the upgrade package, If the verification code is the same, the verification is passed, and the updated second application group is run.
  • the updated program needs to be verified.
  • the verification is used to determine whether the second application group is upgraded correctly.
  • the check code matching the upgrade package may be data issued together with the upgrade package. Passing the verification indicates that it is guaranteed that the second application group has been correctly upgraded according to the upgrade package.
  • the check method may be to obtain the data of the second application program group, perform cyclic redundancy check code (Circulating Redundancy Code, CRC) calculation, and compare it with the check code matched by the upgrade package. If the calculated check code is the same as the check code matched by the upgrade package, the check is passed; otherwise, the check fails. If it is determined that the verification fails, continue to run the first application group and feedback a verification failure message, and then continue to update the second application group, or write the first application group into the application group in the second storage area The storage area, so that the second application program group is returned to an unupgraded state, and remains the same as the first application program group.
  • CRC cyclic redundancy check code
  • the method further includes: updating the upgrade flag bit as an upgrade; the running the updated second application group includes: if the upgrade flag bit is determined To upgrade, it is determined whether the second main application in the second application group is an application to be upgraded; if so, when the current round of task execution of the first main application is completed, run the post-update And update the upgrade flag to non-upgrade; otherwise, run the second main application and update the upgrade flag to non-upgrade.
  • the upgrade flag bit is used to determine whether there is a program upgrade. After obtaining the upgrade package, the programs in the application group will be upgraded. At this time, the upgrade flag can be configured to indicate that the application group is in an upgraded state.
  • the upgrade flag is upgrade, indicating that there is an upgraded application group that is not running in the application group.
  • the upgrade flag is non-upgrade, indicating that there is no upgraded application group in the application group, or the upgraded application group is already running.
  • the second main application is the main application in the second application group.
  • Running the second application program group actually loads the second main application program into the memory, and starts to run from the first address of the second main application program.
  • the first main application program may include a cyclic subroutine or an interrupt response subroutine.
  • the completion of the current round of task execution of the first main application program may mean the completion of the cycle subroutine or the completion of the interrupt response subroutine.
  • the first main application program is a program for feedback control to output a constant DC voltage
  • the completion of the current round of task execution of the first main application program may refer to the completion of the current feedback control task execution, that is, the voltage output control command is adjusted in response to the feedback value. , Until the DC voltage in the circuit is adjusted to the target DC voltage, that is, the response subroutine is completed.
  • the second main application program is upgraded, when the first main application program is completed, the updated second main application program is run. If the second main application program is not upgraded, the running of the first main application program can be directly replaced with the running of the second main application program. It is understandable that the first main application program and the unupgraded second main application program are the same. Therefore, when the second main application program is not upgraded, it can be directly replaced and run, and the first main application program can be used directly during operation. The intermediate result of the main application program will not affect the integrity of the program execution, nor will it affect the stability of the system.
  • the second main application program is upgraded, unlike the first main application program, if the first main application program is directly replaced with the second main application program during the running process of the first main application program, the first main application program is not completely executed, and , The second main application program may not get the same result as the first main application program, or even the opposite result, causing system operation problems.
  • the method further includes: updating the area identifier of the second storage area from the upgrade storage area to the running storage area, and updating the first storage area The area identification of the storage area is updated from the operation storage area to the upgrade storage area; the program upgrade method further includes: if it is determined that the upgrade flag bit is non-upgrade, running the main application group in the application program group whose area identification is the operation storage area. application.
  • the zone identifier is used to identify whether the application group in it is to be run.
  • the area is identified as a running storage area, indicating that the application group located in the storage area is the currently running application group.
  • the area is identified as an upgrade storage area, indicating that the application group located in the storage area is the application group to be upgraded, that is, the storage area is the storage area to be updated.
  • the judgment of the upgrade flag is usually before running the application group. Before running the application group, judge the upgrade flag. If the upgrade flag is upgrade, it means that the application group is in the process of upgrading and running at the current moment. If the upgrade flag is non-upgrade, it means that the current moment is in the power-on process. in. Exemplarily, the upgrade flag bit is a character string, for example, 0x5555AAAA means upgrade, and 0 means non-upgrade.
  • the running storage area runs the application program, and the functional unit area to be updated in the upgrade storage area is erased and written through the boot loader.
  • the functional unit areas to be updated are partition 2 (storing the main application program) and partition 4 (storing the application program 1).
  • the functional unit area to be updated in the upgrade storage area is updated, that is, after the application group is upgraded, the running storage area and the upgrade storage area are exchanged, and the running storage area shown in Figure 4 becomes as shown in Figure 5.
  • the upgrade storage area shown in Figure 4 becomes the running storage area shown in Figure 5.
  • the data stored in the updated functional unit area to be updated in the running storage area is synchronized to the transformed upgrade storage area, so that the data in the upgraded running storage area and the upgrade storage area remain consistent.
  • the electronic device may include at least one processor, for example, a single processor or a dual processor, the main application programs in the application program group are all loaded and run in the memory, and the non-main application program may be loaded in the memory. It can also be run in Flash.
  • Figure 6-9 Figure 6 is a single processor, and the non-main application and boot loader are running in Flash; Figure 7 is a dual processor, and the non-main application and the boot loader are running in Flash ; Figure 8 is a single processor, and the non-main application and boot loader are running in memory; Figure 9 is a dual processor, and the non-main application and the boot loader are running in Flash.
  • the non-main application storage area and the main application storage area constitute the application group storage area.
  • the electronic device to which the program upgrade method is applied includes a processor
  • the running of the updated second main application includes: turning off the interrupt; Load in memory and run; turn on interrupt.
  • the electronic device to which the program upgrade method is applied includes at least two processors
  • the running of the updated second main application includes: loading the updated second main application In the memory area corresponding to the first processor, and run; turn off the interrupt; replace the second processor to run the second main application with the running result of the updated second main application on the first processor
  • the running result of the application program, as the target running result, the first processor is different from the second processor; interrupt is turned on; the updated second main application program is loaded on a processor other than the first processor
  • At least one external processor is in the corresponding memory area, and runs.
  • At least two processors run the main application program group in parallel, and during the running process, each processor shares the extended core parameters and the current core parameters. You can select the running result of any processor as the target running result for subsequent processing. The operation result of a processor can be selected and switched as the target operation result through the output selection unit.
  • each process corresponds to a memory area, and different processors correspond to different memory areas.
  • the two processors may include at least two CPUs or one CPU and a Control Law Accelerator (CLA).
  • CLA Control Law Accelerator
  • the second processor is the source processor of the target running result, that is, the running result of the second processor running the main application program is used as the target running result.
  • the first processing is any processor other than the second processor.
  • the updated second main application program When at least two processors start to run the updated second main application, first select any processor except the source processor of the target running result, and load the updated second main application in the matching memory Area, and run. At the same time, close the interrupt, select the running result of the processor as the target running result, and then open the interrupt. Afterwards, the updated second main application program is loaded into the memory area corresponding to the processor other than the first processor, and runs, so that the updated second main application program is loaded into the memory area corresponding to all processors. Application program, and run, to ensure that each processor is running the upgraded application program group. Among them, the interrupt switch at this time is used to ensure the correct switching when the operating result source processor is switched, so as to avoid temporary switching and return to the operating result source before the breakpoint.
  • the electronic device includes at least two processors, and before erasing data in each functional unit area to be updated in the second storage area, the method further includes: If the application program is an application program to be upgraded, the operation result of the second processor running the first main application program is replaced by the operation result of the first processor running the first main application program as the target operation result.
  • the running result of the first processor running the first main application can be used as the target running result, and when it is determined that the first main application needs to be upgraded, switch to the second The running result of the processor running the first main application is taken as the target running result. Therefore, when the first processor runs the second main application program, it is switched to the first processor to run the second main application program as the target operation result, which realizes the parallel operation of the main application program by multiple processors, online upgrade, and the target operation result. Switch correctly.
  • the method before determining whether the second main application in the second application group is the application to be upgraded, the method further includes: if the peripheral initialization program is the application to be upgraded, running the upgraded application The peripheral initialization program is used to initialize the peripheral module before the main application program runs.
  • Peripheral modules refer to the interface circuits and buses used in power supply devices (such as power supply chips) to connect with external devices.
  • peripheral initialization program is not the application program to be upgraded, the second main application program is directly run.
  • the data of the peripheral module is updated, so as to ensure the normal operation of the second main application program under the data of the updated peripheral module.
  • the electronic device is a power supply device, including two levels, specifically PFC (Power Factor Correction) at the front stage of the power supply device, and DC (Direct Current, direct current) at the back stage of the power supply device.
  • PFC Power Factor Correction
  • DC Direct Current, direct current
  • the downstream DC of the power supply equipment is a direct current circuit
  • the PFC at the front of the power supply equipment is an AC circuit.
  • Each level of the power supply device can independently implement any of the program upgrade methods provided in the embodiments of the present application.
  • Each level of power equipment includes a communication unit, an output selection unit, a main application running unit, and a shared memory unit.
  • the upgrade interaction unit is an independent device other than the power supply device, for example, it may be the main control system in the communication system, which is used to monitor whether the power supply device is operating normally.
  • the upgrade interaction unit obtains the upgrade package and the pre-upgrade file of the power supply device, where the pre-upgrade file includes data stored in the first storage area and the second storage area.
  • the upgrade interaction unit determines the functional unit area to be updated according to the upgrade package and the pre-upgrade file, and sends it to the communication unit together with the upgrade package.
  • Each level of the power supply equipment is equipped with a communication unit for communicating with each other and respectively with the upgrade interaction unit, and receives the information and upgrade package of the functional unit area to be updated sent by the upgrade interaction unit; or it can also be one of the first and upgrade interaction units Communication, the other level obtains the information received by the upgrade interaction unit through the communication unit, for example, the power equipment downstream DC interacts with the upgrade interaction unit, and the upgrade data of the power equipment front PFC (including the upgrade package and the information of the functional unit area to be updated) Etc.) By communicating with the downstream DC of the power supply device to receive the upgrade data obtained by the downstream DC of the power supply device from the upgrade interaction unit.
  • Each stage of the power supply device includes one or two processors, and the output selection unit is used to select the source processor of the target execution result of the main application when there are at least two processors, that is, which processor runs which main application
  • the running result is regarded as the target running result.
  • the data stored in different storage areas in the same level of the power supply device are the same, and the data stored in the storage areas in different levels are different, that is, the application program groups run by different processors in the same level in the power supply device
  • the non-main application programs in the application program groups run by different processors in different levels may be different or the same, but the main application programs are different.
  • the main application program running unit is used to run the main application program, each processor corresponds to a main application program running unit, and different processors correspond to different main application program running units.
  • the two processors in the same level of the power supply device share the core parameters with each other through the shared memory unit, and realize the smooth transition of data when the main application program is switched after the upgrade, which ensures the stable output of the power supply module during the switching process.
  • the output selection unit performs processing according to the target operation result and provides power output to the main telecommunication equipment.
  • the program upgrade method which is applied to the DC level of power supply equipment, can include:
  • the upgrade interaction unit receives the pre-upgrade file and the upgrade package.
  • the upgrade interaction unit receives the DC-level pre-upgrade file and upgrade package of the power supply device sent by other devices, where the other devices are different from the power supply device.
  • the pre-upgrade file can be a .out file or a HEX file containing all the contents of the first storage area or the second storage area of the DC level of the power supply device.
  • the upgrade interaction unit determines the information of the functional unit to be updated.
  • the upgrade interaction unit compares the pre-level files with the upgrade package, and queries the difference area of the incremental upgrade as the information of the functional unit to be updated. For example, partition 2 and partition 4.
  • S203 The power supply device and the upgrade interaction unit trigger a 3-way handshake.
  • S204 The power supply device judges whether the handshake is successful, if yes, execute S205; otherwise, execute S206.
  • S205 The power supply device updates the upgrade flag to upgrade, and executes S207.
  • the value corresponding to the upgrade is 0x5555AAAA.
  • S206 The power supply device terminates the upgrade, and feeds back the reason for the handshake failure to the upgrade interaction unit.
  • the power supply device obtains the upgrade package and the information of the functional unit to be updated.
  • the power supply device can also obtain the CRC code of the upgrade package.
  • the power supply device is received through the DC-level communication unit of the power supply device.
  • S208 The power supply device judges whether the second main application program is an application program to be upgraded, and if it is, execute S209; otherwise, execute S210.
  • S209 The power supply device uses the running result of CPU2 or CLA as the target running result.
  • S210 The power supply device starts to erase each functional unit area to be updated in the second storage area and write the upgrade package.
  • the DC level of the power supply device calls the interface function of the boot loader to erase each functional unit area to be updated in the second storage area and write the upgrade package.
  • the boot loader can erase and write only the functional unit area to be updated, or erase and write the entire second storage area.
  • the power supply device judges whether the verification is passed, if yes, execute S213; otherwise, execute S214.
  • S213 The power supply device jumps to the updated entry address of the second main application program to start running.
  • the entry address of the second main application program is also the first address of the second main application program.
  • S215 The power supply device judges whether the upgrade flag is an upgrade, and if it is, execute S220; otherwise, execute S216.
  • S216 The power supply device initializes all peripherals.
  • the power supply device When the power supply device includes multiple CPUs, the power supply device respectively loads the main application program on the running storage area to CPU1 and CPUS2 or the memory area corresponding to the CLA to run.
  • S218 The power supply device uses the running result of the CPU1 as the target running result, and executes S234.
  • S220 The power supply device obtains the information of the functional unit area to be updated.
  • S221 The power supply device judges whether the peripheral initialization program is an application program to be upgraded, and if it is, execute S222; otherwise, execute S223.
  • S222 The power supply device initializes the peripheral module.
  • the power supply device determines whether the second main application is an application to be upgraded, and if so, executes S224; otherwise, executes S233.
  • S224 The power supply device judges whether the current round of tasks of the first main application program is completed. If so, when the power supply device includes multiple CPUs, execute S225; when the power supply device includes a single CPU, execute S230; otherwise, execute S224.
  • S225 The power supply device loads the updated second main application program to the memory area corresponding to the CPU1 to run.
  • S226 The power supply device is shut down and interrupted.
  • S227 The power supply device uses the running result of the CPU1 as the target running result.
  • S229 The power supply device respectively loads the updated second main application program to the memory area corresponding to the CPUS2 or CLA to run, and executes S233.
  • S230 The power supply device is shut down and interrupted.
  • the power supply device respectively loads the updated second main application program to the memory of the single CPU to run.
  • S233 The power supply device updates the upgrade flag bit to non-upgrade.
  • S234 The power supply device starts to erase each functional unit area to be updated in the first storage area and write the upgrade package.
  • the updated functional unit area to be updated in the second storage area is synchronized to the first storage area, and the first storage area and the second storage area are always kept consistent. Moreover, the adjustment of the operating roles of the first storage area and the second storage area is completed at the same time, and the application group on the first storage area is changed to the application group on the second storage area.
  • S235 The power supply device schedules the execution of each non-main application program.
  • the non-main application program (functional component) is periodically scheduled to run through the task scheduling function. At this time, the software system composed of the non-main application program, the non-main application program scheduling and the main application program starts to run.
  • FIG. 13 is a schematic diagram of a program upgrade apparatus provided by an embodiment of the application.
  • This embodiment is a corresponding device that implements the program upgrade method provided in any of the foregoing embodiments of the present application.
  • the device may be installed in an electronic device, especially a power supply device that supplies power.
  • the current application group running module 310 is used to run the first application group
  • the upgrade package upgrade module 320 is configured to obtain the upgrade package of the application program to be upgraded during the operation of the first application program group, and update the application program to be upgraded in the second application program group according to the upgrade package.
  • the first application group is the same as the second application group, the first application group is located in a first storage area, and the second application group is located in a second storage area;
  • the updated application group running module 330 is used to run the updated second application group after the update of the application to be upgraded in the second application group is completed, and update the first application according to the upgrade package The applications to be upgraded in the group, so that the updated first application group is the same as the updated second application group.
  • the program upgrade method, device, electronic device, and storage medium provided in the embodiments of the present application update the second application program group that is the same as the first application program group when the first application program group is running, and update the second application program group in the second application program group.
  • the first storage area and the second storage area each include a bootloader storage area and an application group storage area, and the second storage area is the same as the first storage area,
  • the application group is located in the application group storage area
  • the boot loader is located in the boot loader storage area
  • the boot loader is used to update the application program to be upgraded according to the upgrade package and to boot load the application group.
  • the application group storage area includes at least one functional unit area, different functional unit areas store different applications in the application group, and different functional unit areas are stored in different flash memory areas.
  • the upgrade package upgrade module 320 is further configured to: obtain information about at least one functional unit area to be updated that matches the upgrade package; The function or function interface in the second storage area erases the data in each functional unit area to be updated in the second storage area, and writes the upgrade package.
  • the upgrade package upgrade module 320 is further configured to: receive information about at least one functional unit area to be updated that matches the upgrade package; or according to the upgrade package and the application group, Determine the information of at least one functional unit area to be updated that matches the upgrade package.
  • the update application group running module 330 is further configured to: verify the updated second application group; if the calculated verification code matches the upgrade package, If the code is the same, the verification is passed, and the updated second application group is run.
  • the current application group running module 310 is further configured to: run the first main application in the first application group.
  • the program upgrade device is further used for: after obtaining the upgrade package of the application program to be upgraded, updating the upgrade flag bit to upgrade; the updating application group running module 330 is also used for: If it is determined that the upgrade flag is an upgrade, it is determined whether the second main application in the second application group is an application to be upgraded; if so, the task is executed in the current round of the first main application When finished, run the updated second main application and update the upgrade flag to non-upgrade; otherwise, run the second main application and update the upgrade flag to non-upgrade.
  • the program upgrade device is further configured to: after updating the upgrade flag bit to non-upgrade, update the area identifier of the second storage area from the upgrade storage area to the running storage area, And update the area identification of the first storage area from the operating storage area to the upgrade storage area; the program upgrade device is further used for: if it is determined that the upgrade flag bit is non-upgrade, the operating location area identification is the operating storage The main application in the application group of the zone.
  • the electronic device to which the program upgrade method is applied includes a processor, and the update application group running module 330 is further configured to: turn off interrupts; and load the updated second main application In memory, and running; turn on interrupt.
  • the electronic device to which the program upgrade method is applied includes at least two processors
  • the updated application group running module 330 is further configured to: load the updated second main application on In the memory area corresponding to the first processor, and running; turn off the interrupt; replace the second processor with the running result of the updated second main application on the first processor to run the second main application
  • the running result of the program, as the target running result, the first processor is different from the second processor; interrupt is turned on; the updated second main application program is loaded in addition to the first processor
  • At least one of the processors respectively corresponds to the memory area and runs.
  • the program upgrade device is further configured to: before judging whether the second main application in the second application group is the application to be upgraded, if the peripheral initialization program is the application to be upgraded Program, the updated peripheral initialization program is run, and the peripheral initialization program is used to initialize the peripheral module before the main application program runs.
  • the memory includes a main application core information fixed area and a main application core information reserved area.
  • the main application core information fixed area is used to store the current core parameters required for the main application to run.
  • the application core information reserved area is used to store the extended core parameters required for the operation of the main application program, the memory address of each core parameter is fixed, and the core parameter is used by the first main application program and the second main application program.
  • the application group storage area is used to store a main application program and a non-main application program
  • the main application program is loaded into the memory to run, the non-main application program and the boot loader Run by loading into the memory, or run in a storage area formed by the first storage area and the second storage area.
  • the above-mentioned program upgrade device can execute the program upgrade method provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects of the executed program upgrade method.
  • the present application provides an electronic device.
  • the electronic device includes a processor 401 and a memory 402; the processor 401 is configured to execute a program stored in the memory 402 to implement the method in the foregoing embodiment.
  • the electronic device is a power supply device that supplies power to the device.
  • the memory can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the program upgrade method in the embodiments of the present application.
  • the memory may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, etc.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a Flash device, or other non-volatile solid-state storage devices.
  • the memory may further include a memory remotely provided with respect to the processor, and these remote memories may be connected to the device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the present application provides a storage medium that stores a computer program, and when the computer program is executed by a processor, the method in the foregoing embodiment is implemented.
  • the computer storage medium of the embodiment of the present application may adopt any combination of one or more computer-readable media.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media (non-exhaustive list) include: electrical connections with one or more wires, portable computer disks, hard disks, RAM, Read Only Memory (ROM), erasable Erasable Programmable Read Only Memory (EPROM), Flash, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal propagated in baseband or as a part of a carrier wave, and computer-readable program code is carried therein. This propagated data signal can take many forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including, but not limited to, wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
  • suitable medium including, but not limited to, wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
  • the computer program code used to perform the operations of this application can be written in one or more programming languages or a combination thereof.
  • the programming languages include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network including LAN or WAN, or may be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
  • user terminal encompasses any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable web browser, or a vehicle-mounted mobile station.
  • the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
  • some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.
  • Computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code written in any combination of one or more programming languages or Object code.
  • ISA instruction set architecture
  • the block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions.
  • the computer program can be stored on the memory.
  • the memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (ROM), random access memory (RAM), optical storage devices and systems (digital multi-function optical discs) DVD or CD) etc.
  • Computer-readable media may include non-transitory storage media.
  • the data processor can be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSP), application-specific integrated circuits (ASIC), programmable logic devices (FGPA) And processors based on multi-core processor architecture.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FGPA programmable logic devices

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

一种程序升级方法、装置、电子设备及存储介质。该方法包括:运行第一应用程序组(S110);在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序(S120),所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区;所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序,以使更新后的第一应用程序组与更新后的第二应用程序组相同(S130)。

Description

程序升级方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请基于申请号为201911286106.1、申请日为2019年12月13日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及电源领域,具体涉及一种程序升级方法、装置、电子设备和存储介质。
背景技术
随着技术的发展,为了支持更多设备正常工作,需要大量的电源模块并联输出供电。
目前电源模块在进行升级时,会关机,关机后无法正常供电,导致设备的供电不足,进而导致设备无法正常工作。
可以外接电源或者额外配置备用电源模块为设备补充供电。若该设备为通讯设备,且设置在高杆上,此时难以外接电源。而额外配置备用电源模块会导致更多的功耗,导致设备的供电成本增加。
发明内容
本申请提供用于程序升级方法、装置、电子设备和存储介质。
本申请实施例提供一种程序升级方法,包括:运行第一应用程序组;在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区;所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序,以使更新后的第一应用程序组与更新后的第二应用程序组相同。
本申请实施例提供一种程序升级装置,包括:当前应用程序组运行模块,用于运行第一应用程序组;升级包升级模块,用于在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区,以使更新后的第一应用程序组与更新后的第二应用程序组相同;更新应用程序组运行模块,用于所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序。
本申请实施例提供一种电子设备,包括:至少一个处理器以及存储器;所述处理器用于执行存储器中存储的程序,以实现本申请实施例中的任意一种方法。
本申请实施例提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现权利要求本申请实施例中的任意一种方法。
关于本申请的以上实施例和其他方面以及其实现方式,在附图说明、具体实施方式和权利要求中提供更多说明。
附图说明
图1为本申请实施例中的程序升级方法的流程图;
图2为本申请实施例中的存储区域的示意图;
图3为本申请实施例中的存储区域中应用程序组存储区的示意图;
图4为本申请实施例中的升级前存储区域的示意图;
图5为本申请实施例中的升级后存储区域的示意图;
图6为本申请实施例中单CPU在闪存中运行非主应用程序的示意图;
图7为本申请实施例中双CPU在闪存中运行非主应用程序的示意图;
图8为本申请实施例中单CPU在内存中运行非主应用程序的示意图;
图9为本申请实施例中双CPU在内存中运行非主应用程序的示意图;
图10为本申请实施例中电源设备的示意图;
图11为本申请实施例中应用在电源设备中的程序升级方法的流程图;
图12为本申请实施例中应用在电源设备中的程序升级方法的流程图;
图13为本申请实施例中程序升级装置的示意图;
图14为本发明实施例中电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
实施例
图1为本申请实施例提供的程序升级方法的流程图,本实施例可适用于在电子设备在正常工作时,电子设备中的应用程序进行升级的情况,该方法可以由本申请实施例提供的程序升级装置来执行,该装置可采用软件和/或硬件的方式实现,并一般可集成电子设备中。如图1所示,具体包括:
S110,运行第一应用程序组。
其中,第一应用程序组是电子设备实现正常工作所需的应用程序的集合。可以包括至少一个应用程序。
具体的,电子设备为电源设备,可以是由一个或多个电源模块集成的电源设备。电源设备用于为通讯设备供电。
在一个示例性实施方式中,所述运行第一应用程序组,包括:运行所述第一应用程序组中的第一主应用程序。
其中,应用程序组包括主应用程序和至少一个非主应用程序。其中,主应用程序用于实现电子设备的功能。主应用程序在运行的过程中需要获取至少一个非主应用程序的运行结果(可以是运行的最终结果,也可以是运行的中间结果),才能正常运行,或者继续运行。主应用程序的运行与应用程序组中的其他非主应用程序相关联。
可以理解的是,运行第一应用程序组,实际是指从第一应用程序组中第一主应用程序的首地址开始运行,更具体的是,将第一主应用程序加载在处理器(Central Processing Unit,CPU)的内存中开始运行。同时在第一主应用程序的运行过程中可能会涉及第一应用程序组除第一主应用程序之外的第一非主应用程序的运行或历史运行提供的运行结果。
具体的,运行第一应用程序组的过程中,第一主应用程序一直在运行,并等待触发信号进行响应,触发信号可以是第一非主应用程序发出的。其中,一次响应结束可以认为是第一主应用程序的当前轮次任务执行完成。
示例性的,主应用程序为反馈式控制输出设定直流电压功能的控制程序,其中,主应用程序需要获取反馈值,并将反馈值进行处理,得到相应的控制指令,并发送至至少一个外设设备,以控制各外设设备实现升高或下降电路中的电压,从而保证电压稳定在目标直流电压值,其中,反馈值是非主应用程序运行得到的。此外,主应用程序和非主应用程序是在不同时刻运行的。但非主应用程序的升级会影响到主应用程序运行的结果或者运行的过程,仅有非主应用程序的升级,现有技术中的电源模块同样需要重新启动,无法实现电源模块正常工作过程中进行程序在线升级。从而仅有非主应用程序的升级,同样需要重新开始运行主应用程序,才能保证升级后的非主应用程序关联到主应用程序的运行的结果或者运行的过程上,以保证主应用程序的输出(如反馈控制指令)的准确。
相应的,主应用程序的当前轮次任务执行完成可以是指一次反馈控制输出完成,例如,当负载电路的负载电压出现瞬态变化时,主应用程序需要根据该瞬态变化产生的反馈值,发送相应控制指令,控制外设设备对该瞬态变化进行响应,可以理解的是,发出控制指令的时候可以认为一次反馈控制输出完成,即主应用程序的当前轮次任务执行完成;或者可以在负载电路的负载电压重新稳定在目标直流电压值时,认为一次反馈控制输出完成,即主应用程序的当前轮次任务执行完成。此外,还有其他情况,可以根据需要进行设定,对此,本申请实施例不作具体限制。
在一个示例性实施方式中,所述应用程序组存储区用于存储主应用程序和非主应用程序,所述主应用程序通过加载到内存中运行,所述非主应用程序和所述引导加载程序通过加载到所述内存中运行,或者在所述第一存储区和所述第二存储区形成的存储区域中运行。
主应用程序加载在内存中运行,可以提高主应用程序的实时性。非主应用程序和引导加载程序的实时性要求不高,可以选择加载在内存中运行,或者直接在闪存(Flash)中运行。此外,存储区中除了存储应用程序之外,还存储应用程序所需的数据或者应用程序输出的运行结果等。
通过配置应用程序在内存中运行,可以提高应用程序的实时性,通过将除主应用程序以外的应用程序配置在Flash中运行,可以合理分配计算资源,减少内存的负担,以及减少IO次数,进而提高运行在内存中的主应用程序的实时性。
S120,在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区。
待升级应用程序是指应用程序组中需要升级的应用程序。升级包用于对至少一个待升级应用程序进行升级,包括至少一个待升级应用程序对应的更新数据。在对第二应用程序组中的待升级应用程序进行升级的过程中,第一应用程序组始终保持正常运行。也即第一应用程序组的运行和第二应用程序组中的待升级应用程序的升级是同时进行的。
第一应用程序组与第二应用程序组相同,表明第一应用程序组和第二应用程序组可以实现相同的功能,电子设备可以替换运行第一应用程序组和第二应用程序组,均可以实现正常工作,例如,为通讯设备正常供电。示例性的,第一应用程序组和第二应用程序组均用于电源设备基于反馈式控制实现输出设定直流电压转换功能,以为通讯设备提供目标直流电压。第一应用程序组和第二应用程序组在电源设备出厂时相同,同时,每次更新完毕后,第一应用程序组和第二应用程序组相同。
第一应用程序组位于第一存储区,第二应用程序组位于第二存储区,表明第一应用程序组和第二应用程序组分别存储在不同位置。第一存储区和第二存储区均为存储区域中的区域,且存储的数据相同。存储区域实际为Flash上的区域。
在一个示例性实施方式中,如图2所示,所述第一存储区和所述第二存储区均分别包括引导加载程序存储区和应用程序组存储区,所述第二存储区与所述第一存储区相同,应用程序组位于所述应用程序组存储区,引导加载程序位于所述引导加载程序存储区,所述引导加载程序用于根据升级包更新待升级应用程序,以及引导加载应用程序组。
具体的,引导加载程序(Bootloader)为在操作系统内核运行之前运行的程序,用于初始化硬件设备和建立内存空间的映射图等,以搭建操作系统内核运行所需的软硬件环境,以便在该环境中正确调用操作系统内核。而应用程序组的应用程序均以操作系统为运行环境。引导加载程序是在应用程序组运行之前运行,具备对应用程序组进行升级的权限,从而引导加载程序用于根据升级包更新待升级应用程序。
第一存储区和第二存储区均存储有引导加载程序和应用程序组,也即单独获取每个存储区中的存储数据均可以实现独立正确运行应用程序组,从而实现电子设备的正常运行。可以理解的是,第一存储区和第二存储区不仅互为备份,每个存储区中存储的都是可正常运行的程序。
通过配置两个存储区,每个存储区均存储有应用程序组和引导加载程序,保证每个存储区中的程序可以独立正常运行,而且,保持两个存储区的程序同步,保证两个存储区中的程序可以相互替换运行,从而保证应用程序组中的程序在线升级。
在一个示例性实施方式中,所述应用程序组存储区包括至少一个功能单元区,不同功能单元区分别存储所述应用程序组中不同应用程序,不同功能单元区分别存储在不同Flash区。
示例性的,对应用程序组存储区按照应用程序进行划分,具体如图3所示,可以建立应用程序与功能单元区的对应关系,方便识别待升级应用程序的存储位置,从而,可以实现仅对待升级应用程序对应的功能单元区进行更新,减少程序升级的工作量,提高程序升级的效率。示例性的,一个功能单元区为一个Flash区,具体是Flash扇区。可以为每个Flash区分配唯一数字编号,一个Flash区可能是一个Flash物理扇区或多个Flash物理扇区,即功能单元区与Flash区的数字编号存在单一映射关系。应用程序组 存储区包括下述至少一项:存储主应用程序的功能单元区、存储外设初始化程序数据的功能单元区和存储任务调度程序数据的功能单元区等。
其中,升级包中包括应用程序组存储区中全部功能单元区的数据,既包括不需要更新的功能单元区的数据,同时还包括需要更新的功能单元区的数据。其中,不需要更新的功能单元区的数据与应用程序组存储区中相应功能单元区的数据相同,需要更新的功能单元区的数据与应用程序组存储区中相应功能单元区的数据不同。可以直接将升级包中的数据写入到应用程序组存储区,由此,应用程序组存储区中需要更新的功能单元区的数据发生更新,而不需要更新的功能单元区的数据没有变化,从而实现对应用程序组的程序进行升级。
此外,还可以通过升级包获取需要更新的功能单元区的信息,并仅对应用程序组存储区中需要更新的功能单元区进行更新,实现增量更新程序。
在一个示例性实施方式中,所述根据所述升级包更新第二应用程序组中的待升级应用程序,包括:获取与所述升级包匹配的至少一个待更新功能单元区;通过位于所述第一存储区的引导加载程序区中的函数或功能接口,对所述第二存储区中各所述待更新功能单元区中数据进行擦除,以及将所述升级包写入。
其中,待更新功能单元区存储待升级应用程序,也即待更新功能单元区是应用程序组存储区中需要进行更新的功能单元区。一个待更新功能单元区对应存储一个待升级应用程序。待更新功能单元区的信息用于确定待更新功能单元区,具体的,可以是指待更新功能单元区的标识信息,例如在存储区域中的存储位置或待更新功能单元区的区编号等。
待升级应用程序升级实际是将升级包中对应的更新数据更新到存储待升级应用程序升级的待更新功能单元区中,具体的,是对该待更新功能单元区进行擦除,并将升级包中对应的更新数据写入。
可以理解的是,当前运行的程序为第一应用程序组,也即此时第一应用程序组的运行环境为第一存储区的引导加载程序搭建的,而应用程序组的升级是由引导加载程序实现。函数或功能接口用于实现应用程序组存储区的擦除和写入等功能。可以通过调用引导加载程序存储区中的功能接口或函数,实现运行引导加载程序对各个待更新功能单元区中数据进行擦除,以及将升级包写入,从而实现对各待更新功能单元区中存储的待升级应用程序进行升级。
通过为仅对需要更新的待更新功能单元区进行更新,从而实现增量升级,避免对全部应用程序组存储区进行更新,导致更新工作量大,效率低的情况,从而提高应用程序组存储区更新的效率,以及提高应用程序升级速度。
在一个示例性实施方式中,所述获取与所述升级包匹配的至少一个待更新功能单元区,包括:接收与所述升级包匹配的至少一个待更新功能单元区的信息;或者根据所述升级包和所述应用程序组,确定与所述升级包匹配的至少一个待更新功能单元区的信息。
具体的,可以直接接收与电子设备通信的升级交互单元发送的待更新功能单元区的信息,其中,升级交互单元可以通过有线或者无线与电子设备通信。升级交互单元可以接收存储有应用程序组存储区中存储数据的.out文件或hex文件,用于存储应用程序组对应的代码数据,以及升级包文件,进行比对,查询存在差异的功能单元区,确定升级包匹配的至少一个待更新功能单元区的信息,例如可以通过有线(如U盘传输)或无线网络传输等方式接收文件。
或者,由电子设备直接对应用程序组存储区中存储数据的.out文件或hex文件,以及升级包文件进行比较,查询存在差异的功能单元区,确定升级包匹配的至少一个待更新功能单元区的信息。
通过将升级包与应用程序组存储区中存储数据进行对比,从而确定需要更新的待更新功能单元区,可以准确确定待更新功能单元区,从而实现增量升级,避免对全部应用程序组存储区进行更新,导致更新工作量大,效率低的情况,从而提高应用程序组存储区更新的效率,以及提高应用程序升级速度。
在一个示例性实施方式中,内存中包括主应用核心信息固定区和主应用核心信息预留区,所述主应用核心信息固定区用于存储主应用程序运行所需的当前核心参数,所述主应用核心信息预留区用于存储主应用程序运行所需的扩展核心参数,各核心参数的内存地址固定,所述核心参数用于第一主应用程序和第二主应用程序使用。
其中,当前核心参数可以是指应用程序组中主应用程序所需的静态变量或全局变量。主应用核心信息固定区用于存储当前核心参数。扩展核心参数可以是指应用程序组中主应用程序当前不需要的数据,但未来所需的静态变量或全局变量,例如,可以是在升级之后主应用程序所需的静态变量或全局变量,该扩展核心参数的初始值为0,待后续需要进行赋值。主应用核心信息预留区用于存储扩展核心参数。当前核心参数和扩展核心参数均用于第一主应用程序和第二主应用程序使用。
主应用核心信息固定区和主应用核心信息预留区的存储位置固定,且其中存储的每个核心参数(包括当前核心参数和扩展核心参数)的内存地址也固定。其中,扩展核心参数的初始值为0,主应用程序需要新增一个核心参数,该核心参数为当前核心参数(如x)的数值加1,可以对扩展核心参数赋值为x+1,由此,扩展核心参数作为主应用程序的静态变量或全局变量在主应用程序运行过程中使用。
具体的,为了保证应用程序组切换前后的应用程序组关联的核心参数的连续性,也即为了切换前的应用程序组关联的核心信息能被切换后的应用程序组使用,在本申请实施例中即为了第一应用程序组关联的核心参数能被第二应用程序组使用,需要将这些核心参数存储在固定的预设内存中的存储位置,以便第一应用程序组和第二应用程序组均可以从该预设内存中的存储位置处获取。将核心参数直接配置与内存中,可以提高核心参数的获取速度,从而提高主应用程序切换运行的速度。
通过预先配置主应用核心信息固定区和主应用核心信息预留区,以便第一应用程序组关联的核心参数能被第二应用程序组使用,保证在第一应用程序组和第二应用程序组切换运行过程中核心参数的连续性,从而保证电子设备稳定工作。
S130,所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序。
第二应用程序组中的待升级应用程序更新完毕,表明本次程序升级完成,本次程序升级需要升级的至少一个待升级应用程序均已升级完成。
运行更新后的第二应用程序组,即电子设备由运行第一应用程序组,变为运行更新后的第二应用程序组,实际是由运行升级前的应用程序组变为运行升级后的应用程序组,从而实现在线升级程序。
将升级包继续更新第一应用程序组中的待升级应用程序,保证更新后的第一应用程序组与更新后的第二应用程序组相同,以进行后续再次升级。
本申请实施例所提供的程序升级方法、装置、电子设备及存储介质,通过在运行第一应用程序组时,对与第一应用程序组相同的第二应用程序组进行更新,并在第二应用程序组更新完毕后,运行第二应用程序组,实现应用程序组可以在工作时升级,解决了现有技术中应用程序在升级时无法正常工作的问题,实现应用程序组可以实时升级,并在升级的同时保证正常工作,从而提高配置应用程序组的设备的可靠性和稳定性,而且无需配置多个硬件设备以实现程序在线升级,降低程序升级的成本,并提高程序升级的效率。
在一个示例性实施方式中,所述运行更新后的第二应用程序组,包括:对更新后的第二应用程序组进行校验;如果计算得到的校验码与所述升级包匹配的校验码相同,则校验通过,并运行更新后的第二应用程序组。
具体的,更新后的程序需要经过校验。校验用于判断第二应用程序组是否正确升级。其中,与升级包匹配的校验码可以是与升级包一起下发的数据。校验通过,表明保证第二应用程序组已根据升级包正确升级。
其中,校验方式可以是获取第二应用程序组的数据进行循环冗余校验码(Circulating Redundancy Code,CRC)计算,并与升级包匹配的校验码进行比较。如果计算得到的校验码与升级包匹配的校验码相同,则校验通过;否则,校验失败。如果确定校验失败,则继续运行第一应用程序组,并反馈校验失败消息,之后可以继续更新第二应用程序组,或者,将第一应用程序组写入第二存储区中应用程序组存储区,以使第二应用程序组退回未升级状态,保持与第一应用程序组相同。
通过对第二应用程序组进行校验,并在第二应用程序组正确升级之后,运行更新后的第二应用程序组,保证第二应用程序组正确升级之后开始运行,从而实现电子设备正常运行,提高系统工作的稳定性。
在一个示例性实施方式中,在获取待升级应用程序的升级包之后,还包括:更新升级标志位为升级; 所述运行更新后的第二应用程序组,包括:如果确定所述升级标志位为升级,则判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序;如果是,则在所述第一主应用程序的当前轮次任务执行完成时,运行更新后的第二主应用程序,并将所述升级标志位更新为非升级;否则,运行所述第二主应用程序,并将所述升级标志位更新为非升级。
具体的,升级标志位用于判断是否存在程序升级。获取升级包之后,会对应用程序组中程序进行升级,此时可以通过配置升级标志位,表示应用程序组处于升级状态。
升级标志位为升级,表明应用程序组中存在未运行的已升级的应用程序组。升级标志位为非升级,表明应用程序组中不存在已升级的应用程序组,或者已升级的应用程序组已经运行。
第二主应用程序为第二应用程序组中的主应用程序。运行第二应用程序组实际是将第二主应用程序加载在内存中,从第二主应用程序的首地址开始运行。
第一主应用程序可以包括循环子程序,或者中断响应子程序。第一主应用程序的当前轮次任务执行完成,可以是指循环子程序运行完成,或者中断响应子程序运行完成。示例性的,第一主应用程序为反馈控制输出恒定直流电压的程序,第一主应用程序的当前轮次任务执行完成可以是指当前反馈控制任务执行完成,即响应反馈值调整电压输出控制指令,直至电路中直流电压调整为目标直流电压,也即响应子程序运行完成。
如果第二主应用程序进行升级,则在第一主应用程序运行完成时,运行更新后的第二主应用程序。如果第二主应用程序未进行升级,则可以由运行第一主应用程序直接替换为运行第二主应用程序。可以理解的是,第一主应用程序和未升级的第二主应用程序是相同的,由此,在第二主应用程序未升级时,可以直接替换运行,而且运行过程中可以直接使用第一主应用程序的中间结果,不会影响程序执行的完整性,也不会影响系统的稳定性。当第二主应用程序升级后时,和第一主应用程序不同,若在第一主应用程序运行过程中,直接替换为第二主应用程序,导致第一主应用程序的未完整执行,而且,第二主应用程序可能无法得到与第一主应用程序相同的结果,甚至是相反的结果,导致系统运行出现问题。
将升级标志位更新为非升级,表明升级后的应用程序组已运行,可以重新接收升级包进行下一次升级。
通过配置升级标志位,以及根据升级标志位的状态判断是否有进行过程序升级,若有程序升级时,进一步判断主应用程序是否升级,如果没有升级可以直接运行升级后的应用程序组中的主应用程序,如果升级,需要等待未升级的主应用程序的当前轮次任务运行完成后,替换运行升级后的应用程序组中的主应用程序,保证程序运行的完整性,避免程序当前轮次任务未完成,导致系统出错的情况,从而提高系统稳定性。
在一个示例性实施方式中,在将所述升级标志位更新为非升级之后,还包括:将所述第二存储区的区标识由升级存储区更新为运行存储区,并将所述第一存储区的区标识由运行存储区更新为升级存储区;所述程序升级方法,还包括:如果确定所述升级标志位为非升级,则运行位于区标识为运行存储区的应用程序组中主应用程序。
区标识用于标识位于其中的应用程序组是否待运行。区标识为运行存储区,表明位于该存储区中的应用程序组为当前运行的应用程序组。区标识为升级存储区,表明位于该存储区中的应用程序组为待升级的应用程序组,也即该存储区为待更新的存储区。
升级标志位的判断通常是在运行应用程序组之前。在运行应用程序组之前,判断升级标志位,如果升级标志位为升级,则表明当前时刻处于应用程序组升级并运行的过程中,如果升级标志位为非升级,则表明当前时刻处于上电过程中。示例性的,升级标志位为字符串,例如,0x5555AAAA为升级,0为非升级。
在上电过程中,对所有外设模块进行初始化,运行区标识为运行存储区上的应用程序组。
如图4-图5所示,运行存储区运行应用程序,并通过引导加载程序对升级存储区中的待更新功能单元区进行擦除和写入。示例性的,如图4-图5所示,待更新功能单元区为分区2(存储主应用程序)和分区4(存储应用程序1)。在升级存储区中的待更新功能单元区更新完毕后,也即应用程序组升级完毕后,将运行存储区和升级存储区进行互换,图4所示的运行存储区变为图5所示的升级存储区,图4 所示的升级存储区变为图5所示的运行存储区。再通过引导加载程序将运行存储区中的更新后的待更新功能单元区中存储数据同步到变换后的升级存储区中,从而升级后的运行存储区和升级存储区的数据仍然保持一致。
通过配置区标识,区分运行存储区和升级存储区,而且在程序升级后进行同步,保证运行存储区和升级存储区中的数据始终一致,而且在运行应用程序组之前判断升级标志位,并在升级标志位为非升级时,确定处于设备上电过程中,可以直接从默认的引导地址运行运行储存区中的应用程序组,减少易失性数据存储和读取,提高应用程序组运行效率,并根据接收到的升级包更新升级存储区中的应用程序组,实现准确区分上电过程的应用程序组运行过程和工作过程的升级后的应用程序组运行过程,从保证设备正常上电以及正常工作。
在一个示例性实施方式中,电子设备可以包括至少一个处理器,例如,单处理器或者双处理器,应用程序组中主应用程序均加载在内存中运行,而非主应用程序可以加载在内存中运行,也可以在Flash中运行。如图6-图9所示,图6为单处理器,且非主应用程序和引导加载程序在Flash中运行;图7为双处理器,且非主应用程序和引导加载程序在Flash中运行;图8为单处理器,且非主应用程序和引导加载程序在内存中运行;图9为双处理器,且非主应用程序和引导加载程序在Flash中运行。其中,非主应用程序存储区和主应用程序存储区构成应用程序组存储区。
在一个示例性实施方式中,所述程序升级方法应用的电子设备包括一个处理器,所述运行更新后的第二主应用程序,包括:关闭中断;将所述更新后的第二主应用程序加载在内存中,并运行;打开中断。
可以理解的是,在由第一应用程序切换到更新后的第二应用程序运行时,如果存在中断,则会导致CPU自动暂时停止当前运行的第一主应用程序的执行转而执行处理更新后的第二主应用程序,当第二主应用程序覆盖第一主应用程序拷贝在内存并运行时,CPU会返回断点继续执行第一主应用程序。实际上,而此时第一主应用程序已经被覆盖掉,无法正常运行,导致系统运行存在问题。所以为了避免发生中断而产生不可预知的错误,需要预先关闭中断,保证第二主应用程序完整运行。
打开或关闭中断可以通过中断控制指令实现。
通过在切换运行更新后的第二主应用程序之前关闭中断,并在运行更新后的第二主应用程序之后打开中断,保证CPU切换到更新后的第二主应用程序持续运行,避免暂时切换的情况,从而实现准确运行更新后的第二主应用程序。
在一个示例性实施方式中,所述程序升级方法应用的电子设备包括至少两个处理器,所述运行更新后的第二主应用程序,包括:将所述更新后的第二主应用程序加载在第一处理器对应的内存区域中,并运行;关闭中断;将所述第一处理器运行所述更新后的第二主应用程序的运行结果,替换第二处理器运行所述第二主应用程序的运行结果,作为目标运行结果,所述第一处理器与所述第二处理器不同;打开中断;将所述更新后的第二主应用程序加载在除所述第一处理器之外的至少一个处理器分别对应的内存区域中,并运行。
其中,至少两个处理器并行运行主应用程序组,在运行过程中,各处理器共享扩展核心参数和当前核心参数。可以选择任意一个处理器的运行结果作为目标运行结果,进行后续处理。可以通过输出选择单元选择和切换一个处理器的运行结果作为目标运行结果。同时,每个处理对应一个内存区域,不同处理器对应的内存区域不同。示例性的,若处理器的数量为两个,两个处理器可以包括至少两个CPU或者一个CPU和控制律加速器(Control Law Accelerator,CLA)。
第二处理器为目标运行结果的来源处理器,即第二处理器运行主应用程序的运行结果作为目标运行结果。而第一处理为除第二处理器之外的任意一个处理器。
在至少两个处理器开始运行更新后的第二主应用程序时,先选择除目标运行结果的来源处理器之外的任意一个处理器,将更新后的第二主应用程序加载在匹配的内存区域中,并运行。同时关闭中断,选择该处理器的运行结果作为目标运行结果,再开中断。之后将更新后的第二主应用程序分别加载在除第一处理器之外的处理器对应的内存区域中,并运行,从而实现全部处理器对应的内存区域中均加载更新后的第二主应用程序,并运行,保证各个处理器均运行升级后的应用程序组。其中,此时中断开关用于保证在运行结果来源处理器切换时正确切换,避免暂时切换导致返回断点前的运行结果来源。
通过对多个处理器对应的内存区域同步更新后的第二主应用程序,保证运行的均为最新的主应用程序,有助于保持系统稳定工作,同时,直接在内存区域中进行同步,提高升级后的应用程序组的运行效率,提高在线升级的效率。
在一个示例性实施方式中,所述电子设备包括至少两个处理器,在所述第二存储区中对各所述待更新功能单元区中数据进行擦除之前,还包括:如果第二主应用程序为待升级应用程序,则将第二处理器运行第一主应用程序的运行结果,替换第一处理器运行第一主应用程序的运行结果,作为目标运行结果。
实际上,在未根据升级包进行升级之前,可以将第一处理器运行第一主应用程序的运行结果,作为目标运行结果,并在确定第一主应用程序需要升级时,切换至将第二处理器运行第一主应用程序的运行结果作为目标运行结果。从而在第一处理器运行第二主应用程序时,切换到将第一处理器运行第二主应用程序作为目标运行结果,实现多处理器并行运行主应用程序,在线升级,以及目标运行结果的正确切换。
在一个示例性实施方式中,在判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序之前,还包括:如果外设初始化程序为待升级应用程序,则运行升级后的外设初始化程序,所述外设初始化程序用于在主应用程序运行之前,对外设模块进行初始化。
其中,外设初始化程序用于对外设模块进行初始化。外设模块是指电源设备(如电源芯片)内部用于与外部设备连接的接口电路和总线等。
如果外设初始化程序不是待升级应用程序,则直接运行第二主应用程序。
通过在外设初始化程序升级时,运行升级后的外设初始化程序,对外设模块的数据更新,从而保证第二主应用程序在更新后的外设模块的数据下正常运行。
在一个示例中,如图10所示电子设备为电源设备,包括2级,具体为电源设备前级PFC(Power Factor Correction,功率因数校正),电源设备后级DC(Direct Current,直流)。实际上,电源设备后级DC为直流电路,而电源设备前级PFC为交流电路。电源设备的每级均可以独立实现本申请实施例提供的任一项所述的程序升级方法。电源设备的每级均包括通讯单元、输出选择单元、主应用运行单元和共享内存单元等。
其中,升级交互单元为电源设备以外的独立设备,例如可以是通信系统中的主控制系统,用于监控电源设备是否正常运行等。升级交互单元获取升级包以及该电源设备的升级前文件,其中,升级前的文件中包括第一存储区和第二存储区中存储的数据。升级交互单元根据升级包以及升级前文件,确定待更新功能单元区,并和升级包一起发送至通讯单元中。电源设备的每级都具备通讯单元,用于相互通信,以及分别和升级交互单元通信,接收升级交互单元发送的待更新功能单元区的信息和升级包;或者还可以其中一级和升级交互单元通信,另外一级通过通讯单元获取升级交互单元接收到的信息,例如,电源设备后级DC和升级交互单元交互,电源设备前级PFC的升级数据(包括升级包和待更新功能单元区的信息等)通过与电源设备后级DC进行通信,以接收电源设备后级DC从升级交互单元获取的升级数据。
电源设备的每级均包括一个或两个处理器,输出选择单元用于在存在至少两个处理器时选择主应用程序的目标运行结果的来源处理器,即将哪个处理器运行哪个主应用程序的运行结果作为目标运行结果。
需要说明的是,电源设备中的同级中的不同存储区存储的数据相同,不同级中的存储区存储的数据不同,也即电源设备中的同级中的不同处理器运行的应用程序组相同,不同级中的不同处理器运行的应用程序组中非主应用程序可以不同也可以相同,但主应用程序不同。
主应用程序运行单元用于运行主应用程序,每个处理器对应一个主应用程序运行单元,不同处理器对应不同主应用程序运行单元。
电源设备的同级中的两个处理器彼此之间通过共享内存单元实现核心参数的共享,以及实现升级后主应用程序切换时的数据平滑过渡,保证了电源模块在切换过程中的输出稳定。
输出选择单元根据目标运行结果进行处理,并向电信主设备提供电源输出。
相应的,如图11-图12所示,程序升级方法,应用在电源设备DC级中,可以包括:
S201,升级交互单元接收升级前文件和升级包。
升级交互单元在接收其他设备发送的电源设备DC级的升级前文件和升级包,其中,其他设备与电源设备不同。升级前文件可以是包含电源设备DC级的第一存储区或第二存储区全部内容的.out文件或HEX文件。
S202,升级交互单元确定待更新功能单元的信息。
升级交互单元通过比对级前文件和升级包,查询增量升级的差异区域,作为待更新功能单元的信息。例如,分区2和分区4。
S203,电源设备与升级交互单元触发3次握手。
通过3次握手,可以避免仅1次握手的通信成功概率低的问题,以及避免多次握手造成电源设备的功耗增加的问题,从而提高通信成功的概率,以及降低握手的功耗。
S204,电源设备判断握手是否成功,如果是,则执行S205;否则执行S206。
S205,电源设备将升级标志位更新为升级,执行S207。
例如,升级对应的值为0x5555AAAA。
S206,电源设备终止升级,将握手失败原因反馈给升级交互单元。
S207,电源设备获取升级包和待更新功能单元的信息。
此外,电源设备还可以获取升级包的CRC码。电源设备通过电源设备DC级的通讯单元接收。
S208,电源设备判断第二主应用程序是否为待升级应用程序,如果是,则执行S209;否则执行S210。
S209,电源设备将CPU2或CLA的运行结果,作为目标运行结果.
S210,电源设备开始对第二存储区中的各待更新功能单元区进行擦除,以及写入所述升级包。
具体的,电源设备DC级调用引导加载程序的接口函数对第二存储区中的各待更新功能单元区进行擦除,以及写入升级包。
实际上,引导加载程序可以仅针对待更新功能单元区进行擦写,也可以对整个第二存储区进行擦写。
S211,电源设备对升级后的应用程序组进行校验。
对升级后的第二应用程序组CRC校验计算,得到校验码。
S212,电源设备判断校验是否通过,如果是,则执行S213;否则,执行S214。
通过比对接收的CRC码和计算得到的校验码,如果相同,则校验通过;如果不同,则校验失败。
S213,电源设备跳转到更新后的第二主应用程序入口地址开始运行。
第二主应用程序入口地址也即第二主应用程序的首地址。
S214,电源设备保持第一主应用程序运行。
S215,电源设备判断升级标志位是否为升级,如果是,则执行S220;否则执行S216。
S216,电源设备对所有外设进行初始化。
S217,当电源设备包括多CPU时,电源设备分别加载运行存储区上的主应用程序至CPU1和CPUS2或CLA对应的内存区域中运行。
S218,电源设备将CPU1的运行结果作为目标运行结果,执行S234。
S219,当电源设备包括单CPU时,电源设备加载运行存储区上的主应用程序至单CPU的内存中运行,执行S234。
S220,电源设备获取待更新功能单元区的信息。
S221,电源设备判断外设初始化程序是否为待升级应用程序,如果是,则执行S222;否则,执行S223。
S222,电源设备初始化外设模块。
S223,电源设备判断第二主应用程序是否为待升级应用程序,如果是,则执行S224;否则,执行S233。
S224,电源设备判断第一主应用程序的当前轮次任务是否执行完成,如果是,当电源设备包括多CPU时,执行S225,当电源设备包括单CPU时,执行S230;否则,执行S224。
实际是判断当前是否存在第一主应用程序正在执行任务,如果存在,则需要等待当前轮次的任务执行完成,才能进行切换;否则,无需等待直接进行切换。
S225,电源设备加载更新后的第二主应用程序至CPU1对应的内存区域中运行。
S226,电源设备关中断。
S227,电源设备将CPU1的运行结果作为目标运行结果。
S228,电源设备开中断。
S229,电源设备分别加载更新后的第二主应用程序至CPUS2或CLA对应的内存区域中运行,执行S233。
S230,电源设备关中断。
S231,电源设备分别加载更新后的第二主应用程序至单CPU的内存中运行.
S232,电源设备开中断。
S233,电源设备将升级标志位更新为非升级。
S234,电源设备开始对第一存储区中的各待更新功能单元区进行擦除,以及写入所述升级包。
实际是将第二存储区的更新的待更新功能单元区同步到第一存储区中,始终保持第一存储区和第二存储区一致。而且同时完成了第一存储区和第二存储区的运行角色调整,由运行第一存储区上的应用程序组变为运行第二存储区上的应用程序组。
S235,电源设备调度各非主应用程序执行。
通过任务调度函数周期性调度各非主应用程序(功能组件)运行,此时由各非主应用程序、非主应用程序调度和主应用程序组成的软件系统开始运行。
图13为本申请实施例提供的一种程序升级装置的示意图。本实施例是实现本申请上述任意实施例提供的程序升级方法的相应装置,该装置可以设置于电子设备中,尤其是供电的电源设备。
当前应用程序组运行模块310,用于运行第一应用程序组;
升级包升级模块320,用于在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区;
更新应用程序组运行模块330,用于所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序,以使更新后的第一应用程序组与更新后的第二应用程序组相同。
本申请实施例所提供的程序升级方法、装置、电子设备及存储介质,通过在运行第一应用程序组时,对与第一应用程序组相同的第二应用程序组进行更新,并在第二应用程序组更新完毕后,运行第二应用程序组,实现应用程序组可以在工作时升级,解决了现有技术中应用程序在升级时无法正常工作的问题,实现应用程序组可以实时升级,并在升级的同时保证正常工作,从而提高配置应用程序组的设备的可靠性和稳定性,而且无需配置多个硬件设备以实现程序在线升级,降低程序升级的成本,并提高程序升级的效率。
在一种实施方式中,所述第一存储区和所述第二存储区均分别包括引导加载程序存储区和应用程序组存储区,所述第二存储区与所述第一存储区相同,应用程序组位于所述应用程序组存储区,引导加载程序位于所述引导加载程序存储区,所述引导加载程序用于根据升级包更新待升级应用程序,以及引导加载应用程序组。
在一种实施方式中,所述应用程序组存储区包括至少一个功能单元区,不同功能单元区分别存储所述应用程序组中不同应用程序,不同功能单元区分别存储在不同闪存区。
在一种实施方式中,所述升级包升级模块320,还用于:获取与所述升级包匹配的至少一个待更新功能单元区的信息;通过位于所述第一存储区的引导加载程序区中的函数或功能接口,对所述第二存储区中各所述待更新功能单元区中数据进行擦除,以及将所述升级包写入。
在一种实施方式中,所述升级包升级模块320,还用于:接收与所述升级包匹配的至少一个待更新功能单元区的信息;或者根据所述升级包和所述应用程序组,确定与所述升级包匹配的至少一个待更新功能单元区的信息。
在一种实施方式中,所述更新应用程序组运行模块330,还用于:对更新后的第二应用程序组进行 校验;如果计算得到的校验码与所述升级包匹配的校验码相同,则校验通过,并运行更新后的第二应用程序组。
在一种实施方式中,所述当前应用程序组运行模块310,还用于:运行所述第一应用程序组中的第一主应用程序。
在一种实施方式中,所述程序升级装置,还用于:在获取待升级应用程序的升级包之后,更新升级标志位为升级;所述更新应用程序组运行模块330,还用于:如果确定所述升级标志位为升级,则判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序;如果是,则在所述第一主应用程序的当前轮次任务执行完成时,运行更新后的第二主应用程序,并将所述升级标志位更新为非升级;否则,运行所述第二主应用程序,并将所述升级标志位更新为非升级。
在一种实施方式中,所述程序升级装置,还用于:在将所述升级标志位更新为非升级之后,将所述第二存储区的区标识由升级存储区更新为运行存储区,并将所述第一存储区的区标识由运行存储区更新为升级存储区;所述程序升级装置,还用于:如果确定所述升级标志位为非升级,则运行位于区标识为运行存储区的应用程序组中主应用程序。
在一种实施方式中,所述程序升级方法应用的电子设备包括一个处理器,所述更新应用程序组运行模块330,还用于:关闭中断;将所述更新后的第二主应用程序加载在内存中,并运行;打开中断。
在一种实施方式中,所述程序升级方法应用的电子设备包括至少两个处理器,所述更新应用程序组运行模块330,还用于:将所述更新后的第二主应用程序加载在第一处理器对应的内存区域中,并运行;关闭中断;将所述第一处理器运行所述更新后的第二主应用程序的运行结果,替换第二处理器运行所述第二主应用程序的运行结果,作为目标运行结果,所述第一处理器与所述第二处理器不同;打开中断;将所述更新后的第二主应用程序加载在除所述第一处理器之外的至少一个处理器分别对应的内存区域中,并运行。
在一种实施方式中,所述程序升级装置,还用于:在判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序之前,如果外设初始化程序为待升级应用程序,则运行更新后的外设初始化程序,所述外设初始化程序用于在主应用程序运行之前,对外设模块进行初始化。
在一种实施方式中,内存中包括主应用核心信息固定区和主应用核心信息预留区,所述主应用核心信息固定区用于存储主应用程序运行所需的当前核心参数,所述主应用核心信息预留区用于存储主应用程序运行所需的扩展核心参数,各核心参数的内存地址固定,所述核心参数用于第一主应用程序和第二主应用程序使用。
在一种实施方式中,所述应用程序组存储区用于存储主应用程序和非主应用程序,所述主应用程序通过加载到内存中运行,所述非主应用程序和所述引导加载程序通过加载到所述内存中运行,或者在所述第一存储区和所述第二存储区形成的存储区域中运行。
上述程序升级装置可执行本申请实施例所提供的程序升级方法,具备执行的程序升级方法相应的功能模块和有益效果。
本申请提供一种电子设备,所述电子设备包括处理器401以及存储器402;所述处理器401用于执行存储器402中存储的程序,以实现上述实施例中的方法。其中,电子设备为设备供电的电源设备。
存储器作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的程序升级方法对应的程序指令/模块。
存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、Flash器件、或其他非易失性固态存储器件。在一些实例中,存储器可进一步包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
本申请提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述实施例中的方法。
本申请实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、RAM、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、Flash、光纤、便携式CD-ROM、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、电线、光缆、无线电频率(Radio Frequency,RF)等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本申请操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括LAN或WAN——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
以上所述,仅为本申请的示例性实施例而已,并非用于限定本申请的保护范围。
本领域内的技术人员应明白,术语用户终端涵盖任何适合类型的无线用户设备,例如移动电话、便携数据处理装置、便携网络浏览器或车载移动台。
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。
本申请的实施例可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。
本申请附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(ROM)、随机访问存储器(RAM)、光存储器装置和系统(数码多功能光碟DVD或CD光盘)等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、可编程逻辑器件(FGPA)以及基于多核处理器架构的处理器。
通过示范性和非限制性的示例,上文已提供了对本申请的示范实施例的详细描述。但结合附图和权利要求来考虑,对以上实施例的多种修改和调整对本领域技术人员来说是显而易见的,但不偏离本申请的范围。因此,本申请的恰当范围将根据权利要求确定。

Claims (17)

  1. 一种程序升级方法,包括:
    运行第一应用程序组;
    在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区;
    所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序,以使更新后的第一应用程序组与更新后的第二应用程序组相同。
  2. 根据权利要求1所述的方法,其中,所述第一存储区和所述第二存储区均分别包括引导加载程序存储区和应用程序组存储区,所述第二存储区与所述第一存储区相同,应用程序组位于所述应用程序组存储区,引导加载程序位于所述引导加载程序存储区,所述引导加载程序用于根据升级包更新待升级应用程序,以及引导加载应用程序组。
  3. 根据权利要求2所述的方法,其中,所述应用程序组存储区包括至少一个功能单元区,不同功能单元区分别存储所述应用程序组中不同应用程序,不同功能单元区分别存储在不同闪存区。
  4. 根据权利要求3所述的方法,其中,所述根据所述升级包更新第二应用程序组中的待升级应用程序,包括:
    获取与所述升级包匹配的至少一个待更新功能单元区的信息;
    通过位于所述第一存储区的引导加载程序区中的函数或功能接口,对所述第二存储区中各所述待更新功能单元区中数据进行擦除,以及将所述升级包写入。
  5. 根据权利要求4所述的方法,其中,所述获取与所述升级包匹配的至少一个待更新功能单元区,包括:
    接收与所述升级包匹配的至少一个待更新功能单元区的信息;或者
    根据所述升级包和所述应用程序组,确定与所述升级包匹配的至少一个待更新功能单元区的信息。
  6. 根据权利要求1所述的方法,其中,所述运行更新后的第二应用程序组,包括:
    对更新后的第二应用程序组进行校验;
    如果计算得到的校验码与所述升级包匹配的校验码相同,则校验通过,并运行更新后的第二应用程序组。
  7. 根据权利要求1所述的方法,其中,所述运行第一应用程序组,包括:
    运行所述第一应用程序组中的第一主应用程序。
  8. 根据权利要求7所述的方法,其中,在获取待升级应用程序的升级包之后,还包括:
    更新升级标志位为升级;
    所述运行更新后的第二应用程序组,包括:
    如果确定所述升级标志位为升级,则判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序;
    如果是,则在所述第一主应用程序的当前轮次任务执行完成时,运行更新后的第二主应用程序,并将所述升级标志位更新为非升级;
    否则,运行所述第二主应用程序,并将所述升级标志位更新为非升级。
  9. 根据权利要求8所述的方法,其中,在将所述升级标志位更新为非升级之后,还包括:
    将所述第二存储区的区标识由升级存储区更新为运行存储区,并将所述第一存储区的区标识由运行存储区更新为升级存储区;
    所述程序升级方法,还包括:
    如果确定所述升级标志位为非升级,则运行位于区标识为运行存储区的应用程序组中主应用程序。
  10. 根据权利要求8所述的方法,其中,所述程序升级方法应用的电子设备包括一个处理器,
    所述运行更新后的第二主应用程序,包括:
    关闭中断;
    将所述更新后的第二主应用程序加载到内存中,并运行;
    打开中断。
  11. 根据权利要求8所述的方法,其中,所述程序升级方法应用的电子设备包括至少两个处理器,
    所述运行更新后的第二主应用程序,包括:
    将所述更新后的第二主应用程序加载在第一处理器对应的内存区域中,并运行;
    关闭中断;
    将所述第一处理器运行所述更新后的第二主应用程序的运行结果,替换第二处理器运行所述第二主应用程序的运行结果,作为目标运行结果,所述第一处理器与所述第二处理器不同;
    打开中断;
    将所述更新后的第二主应用程序加载在除所述第一处理器之外的至少一个处理器分别对应的内存区域中,并运行。
  12. 根据权利要求8所述的方法,其中,在判断所述第二应用程序组中的第二主应用程序是否为待升级应用程序之前,还包括:
    如果外设初始化程序为待升级应用程序,则运行更新后的外设初始化程序,所述外设初始化程序用于在主应用程序运行之前,对外设模块进行初始化。
  13. 根据权利要求2所述的方法,其中,内存中包括主应用核心信息固定区和主应用核心信息预留区,所述主应用核心信息固定区用于存储主应用程序运行所需的当前核心参数,所述主应用核心信息预留区用于存储主应用程序运行所需的扩展核心参数,各核心参数的内存地址固定,所述核心参数用于第一主应用程序和第二主应用程序使用。
  14. 根据权利要求2所述的方法,其中,所述应用程序组存储区用于存储主应用程序和非主应用程序,所述主应用程序通过加载到内存中运行,所述非主应用程序和所述引导加载程序通过加载到所述内存中运行,或者在所述第一存储区和所述第二存储区形成的存储区域中运行。
  15. 一种程序升级装置,包括:
    当前应用程序组运行模块,用于运行第一应用程序组;
    升级包升级模块,用于在所述第一应用程序组运行的过程中,获取待升级应用程序的升级包,并根据所述升级包更新第二应用程序组中的待升级应用程序,所述第一应用程序组与所述第二应用程序组相同,所述第一应用程序组位于第一存储区,所述第二应用程序组位于第二存储区;
    更新应用程序组运行模块,用于所述第二应用程序组中的待升级应用程序更新完毕,则运行更新后的第二应用程序组,并根据所述升级包更新所述第一应用程序组中的待升级应用程序,以使更新后的第一应用程序组与更新后的第二应用程序组相同。
  16. 一种电子设备,包括至少一个处理器以及存储器;
    所述处理器用于执行存储器中存储的程序,以实现权利要求1-14任一项所述的方法。
  17. 一种存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1-14任一项所述的方法。
PCT/CN2020/136077 2019-12-13 2020-12-14 程序升级方法、装置、电子设备及存储介质 WO2021115477A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911286106.1 2019-12-13
CN201911286106.1A CN112988183A (zh) 2019-12-13 2019-12-13 程序升级方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021115477A1 true WO2021115477A1 (zh) 2021-06-17

Family

ID=76329633

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136077 WO2021115477A1 (zh) 2019-12-13 2020-12-14 程序升级方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN112988183A (zh)
WO (1) WO2021115477A1 (zh)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407217A (zh) * 2021-06-30 2021-09-17 迈普通信技术股份有限公司 芯片程序升级方法、通信设备及计算机可读存储介质
CN113608758A (zh) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 软件升级方法、装置、电池管理系统、电池及用电装置
CN113608772A (zh) * 2021-06-25 2021-11-05 天津津航计算技术研究所 一种应用程序升级方法及装置
CN114296819A (zh) * 2021-12-23 2022-04-08 上海易咖智车科技有限公司 车身控制器的程序刷写方法、装置、计算机设备及介质
CN114356382A (zh) * 2021-12-31 2022-04-15 北京伏尔特技术有限公司 对胰岛素泵主控制器进行iap应用程序升级的方法
CN114880008A (zh) * 2022-05-17 2022-08-09 联陆智能交通科技(上海)有限公司 软件升级方法及系统
CN115421756A (zh) * 2022-09-16 2022-12-02 杭州云动智能汽车技术有限公司 一种服务型网关升级方法
CN115437672A (zh) * 2022-09-15 2022-12-06 深圳思凌科技术有限公司 基于soc芯片的用户程序更新方法、装置、设备及存储介质
CN116578327A (zh) * 2023-07-12 2023-08-11 苏州浪潮智能科技有限公司 一种程序更新方法、装置及电子设备和存储介质
US11928460B2 (en) 2022-04-20 2024-03-12 International Business Machines Corporation Dynamic update of a computer program in memory
CN118051245A (zh) * 2024-04-16 2024-05-17 所托(杭州)汽车智能设备有限公司 双分区升级方法、装置、设备及存储介质
CN118295685A (zh) * 2024-06-04 2024-07-05 浙江恒业电子股份有限公司 一种广播式升级方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020092010A1 (en) * 1999-07-28 2002-07-11 Robert Fiske Upgrade of a program
CN1556474A (zh) * 2003-12-30 2004-12-22 浙江中控技术股份有限公司 软件的在线升级方法及装置
CN101436138A (zh) * 2007-11-16 2009-05-20 苏州科达通信技术发展有限公司 一种用于软件升级且动态回滚的控制装置以及控制方法
CN105511929A (zh) * 2015-12-31 2016-04-20 青岛高校信息产业股份有限公司 一种设备远程无线升级方法
CN107071570A (zh) * 2017-02-13 2017-08-18 青岛海信宽带多媒体技术有限公司 一种机顶盒升级方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020092010A1 (en) * 1999-07-28 2002-07-11 Robert Fiske Upgrade of a program
CN1556474A (zh) * 2003-12-30 2004-12-22 浙江中控技术股份有限公司 软件的在线升级方法及装置
CN101436138A (zh) * 2007-11-16 2009-05-20 苏州科达通信技术发展有限公司 一种用于软件升级且动态回滚的控制装置以及控制方法
CN105511929A (zh) * 2015-12-31 2016-04-20 青岛高校信息产业股份有限公司 一种设备远程无线升级方法
CN107071570A (zh) * 2017-02-13 2017-08-18 青岛海信宽带多媒体技术有限公司 一种机顶盒升级方法及装置

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113608772A (zh) * 2021-06-25 2021-11-05 天津津航计算技术研究所 一种应用程序升级方法及装置
CN113608772B (zh) * 2021-06-25 2024-03-19 天津津航计算技术研究所 一种应用程序升级方法及装置
CN113407217A (zh) * 2021-06-30 2021-09-17 迈普通信技术股份有限公司 芯片程序升级方法、通信设备及计算机可读存储介质
CN113608758A (zh) * 2021-07-15 2021-11-05 东莞新能安科技有限公司 软件升级方法、装置、电池管理系统、电池及用电装置
CN114296819A (zh) * 2021-12-23 2022-04-08 上海易咖智车科技有限公司 车身控制器的程序刷写方法、装置、计算机设备及介质
CN114356382A (zh) * 2021-12-31 2022-04-15 北京伏尔特技术有限公司 对胰岛素泵主控制器进行iap应用程序升级的方法
US11928460B2 (en) 2022-04-20 2024-03-12 International Business Machines Corporation Dynamic update of a computer program in memory
CN114880008A (zh) * 2022-05-17 2022-08-09 联陆智能交通科技(上海)有限公司 软件升级方法及系统
CN115437672A (zh) * 2022-09-15 2022-12-06 深圳思凌科技术有限公司 基于soc芯片的用户程序更新方法、装置、设备及存储介质
CN115421756A (zh) * 2022-09-16 2022-12-02 杭州云动智能汽车技术有限公司 一种服务型网关升级方法
CN115421756B (zh) * 2022-09-16 2023-07-18 杭州云动智能汽车技术有限公司 一种服务型网关升级方法
CN116578327B (zh) * 2023-07-12 2023-11-03 苏州浪潮智能科技有限公司 一种程序更新方法、装置及电子设备和存储介质
CN116578327A (zh) * 2023-07-12 2023-08-11 苏州浪潮智能科技有限公司 一种程序更新方法、装置及电子设备和存储介质
CN118051245A (zh) * 2024-04-16 2024-05-17 所托(杭州)汽车智能设备有限公司 双分区升级方法、装置、设备及存储介质
CN118295685A (zh) * 2024-06-04 2024-07-05 浙江恒业电子股份有限公司 一种广播式升级方法及系统

Also Published As

Publication number Publication date
CN112988183A (zh) 2021-06-18

Similar Documents

Publication Publication Date Title
WO2021115477A1 (zh) 程序升级方法、装置、电子设备及存储介质
CN110231952B (zh) 一种ecu程序备份及循环升级控制方法及装置
US8136108B2 (en) Updating firmware with multiple processors
EP2831722B1 (en) Method and system for verifying proper operation of a computing device after a system change
WO2022007656A1 (zh) Bootloader软件更新方法、装置、嵌入式控制器以及存储介质
US11347429B2 (en) Live firmware activation in a memory system
US20110302572A1 (en) Embedded network device and firmware upgrading method
CN110633091A (zh) 一种电子模块及其软件无线升级方法
US20210357202A1 (en) Firmware updating
WO2021136200A1 (zh) 引导程序的加载方法、存储介质及嵌入式终端
WO2013013396A1 (zh) 基本输入/输出系统bios配置数据管理方法及系统
CN116521209B (zh) 操作系统的升级方法及装置、存储介质及电子设备
WO2022188690A1 (zh) 升级电子设备的方法及装置
CN108874422B (zh) 一种冰箱电控板的软件在线升级方法、冰箱电控板和冰箱
CN112527365A (zh) 应用程序更新方法、非易失存储器、存储介质及家用电器
CN104636159A (zh) 对虚拟机中的软件进行升级的方法和装置
CN116501357A (zh) 一种单片机的在线升级方法
US9495146B2 (en) Host and method of upgrading connection manager of dongles
CN105677416A (zh) 一种Uboot的升级控制系统及方法
CN110825421A (zh) 一种固件升级方法、系统及可读存储介质
CN116501343A (zh) 一种程序升级方法、电源及计算设备
CN102455919A (zh) 基本输入输出系统自动最佳化设定方法
CN118092989B (zh) 一种存储器的固件升级方法、系统、设备及介质
CN116594661B (zh) 一种编译阶段确保固件与工程匹配的单片机升级方法
US20240192743A1 (en) Customized thermal and power policies in computers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20899216

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20899216

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 280223)

122 Ep: pct application non-entry in european phase

Ref document number: 20899216

Country of ref document: EP

Kind code of ref document: A1