Dual partition upgrade method, device, equipment and storage medium

By updating and switching the backup partition and the effective partition of the application in the dual-partition controller, the problems of inflexible multi-application upgrade and version rollback in the existing technology are solved, and a fast and accurate upgrade process is realized.

CN118051245BActive Publication Date: 2024-09-13HANGZHOU SOTEREA AUTOMOBILE INTELLIGENT EQUIP LMITED CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410451949.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-09-13
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

The existing dual-partition upgrade method cannot flexibly and accurately upgrade multiple applications, which may cause application version rollback and take a long time to upgrade, affecting user experience.

Method used

In the dual-partition controller, the current running program of the application is stored in the effective partition, and the backup program is stored in the backup partition. The backup program in the backup partition is updated according to the upgrade requirements, and the hash value is recorded to ensure version consistency. Switch Avoid version rollback during partitioning and improve upgrade speed and flexibility.

Benefits of technology

It realizes flexible upgrade of single or partial programs, avoids version rollback, shortens upgrade time, and improves upgrade speed and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118051245B
    Figure CN118051245B
Patent Text Reader

Abstract

The present invention provides a dual-partition upgrade method, device, equipment and storage medium, the method comprising: determining the application to be upgraded in the dual-partition controller based on the issued upgrade application; if it is determined that only part of the application needs to be upgraded, then updating the backup program corresponding to the target upgrade program in the backup partition to the upgrade application corresponding to the target upgrade program, and updating the backup program corresponding to the target non-upgraded program in the backup partition to the application corresponding to the target non-upgraded program in the effective partition; wherein the target upgrade program is any application to be upgraded, and the target non-upgraded program is any application that does not need to be upgraded; when it is determined that the backup programs of all target upgrade programs are all updated, and the backup programs of all target non-upgraded programs are all updated, then switching the effective partition and the backup partition. The present invention can realize flexible upgrade of each application and improve upgrade efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile technology, and in particular to a dual-partition upgrade method, device, equipment and storage medium. Background Art

[0002] With the development of advanced driver assistance and the introduction of autonomous driving, a large number of applications are installed in cars. As applications are constantly upgraded, the frequency of software updates on the car side is gradually increasing.

[0003] At present, the steps of application upgrade can be simplified through Over the Air (OTA) technology. The OTA upgrade architecture is that the cloud server downloads the upgrade package to the vehicle cache through the Internet of Vehicles system. The internal storage of the vehicle is divided into an effective partition and a backup partition. The effective partition is used to store currently running applications, and the backup partition is used to store backup applications. The latest download program is downloaded to the backup partition, and the partition is switched after the download is successful.

[0004] However, when there are multiple applications, the current dual-partition upgrade method cannot flexibly upgrade the multiple applications, and may even cause a rollback of a certain application version. Summary of the invention

[0005] The embodiments of the present invention provide a dual partition upgrade method, device, equipment and storage medium to solve the problem that the current program upgrade method cannot upgrade the program flexibly and accurately.

[0006] In a first aspect, an embodiment of the present invention provides a dual-partition upgrade method, wherein an application storage area in a dual-partition controller includes an effective partition and a backup partition, wherein the effective partition is used to store programs currently running by all applications, and the backup partition is used to store backup programs of all applications, and the method includes:

[0007] Determine an application program to be upgraded in the dual-partition controller based on the upgraded application program issued;

[0008] If it is determined that only some of the applications need to be upgraded, the backup program corresponding to the target upgraded program in the backup partition is updated to the upgraded application corresponding to the target upgraded program, and the backup program corresponding to the target non-upgraded program in the backup partition is updated to the application corresponding to the target non-upgraded program in the valid partition; wherein the target upgraded program is any application that needs to be upgraded, and the target non-upgraded program is any application that does not need to be upgraded;

[0009] When it is determined that the backup programs of all target upgraded programs are completely updated, and the backup programs of all target non-upgraded programs are completely updated, the valid partition and the backup partition are switched.

[0010] In a possible implementation, a backup program corresponding to each application program in the backup partition is provided with a corresponding memory address segment;

[0011] Updating the backup program corresponding to the target upgrade program in the backup partition to the upgrade application program corresponding to the target upgrade program, including:

[0012] The upgrade application program corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition, so as to update the backup program of the target upgrade program in the backup partition.

[0013] In a possible implementation, after downloading the upgrade application corresponding to the target upgrade program to the memory address segment corresponding to the target upgrade program in the backup partition, the method further includes:

[0014] Record the hash value of the application upgrade program downloaded to the memory address segment corresponding to the target upgrade program in the backup partition.

[0015] In a possible implementation, each application in the valid partition is provided with a corresponding address segment, and each application in the backup partition is also provided with a corresponding address segment;

[0016] Updating the backup program corresponding to the target non-upgraded program in the backup partition to the application program corresponding to the target non-upgraded program in the valid partition, including:

[0017] When the hash value of the backup program corresponding to the target program that does not need to be updated in the backup partition is different from the hash value of the application program corresponding to it in the valid partition, the target program that does not need to be updated is determined as the target non-upgraded program; wherein the target program that does not need to be updated is any application program that does not need to be upgraded;

[0018] The application program corresponding to the target non-upgraded program in the memory address segment of the effective partition is copied to the corresponding memory address segment in the backup partition to update the backup program of the target non-upgraded program in the backup partition.

[0019] In a possible implementation, after copying the application program corresponding to the target non-upgraded program in the memory address segment of the valid partition to the corresponding memory address segment in the backup partition, the method further includes:

[0020] Records the hash value of the application program updated to the memory address segment of the target non-upgraded program in the backup partition.

[0021] In a possible implementation, after determining the application program to be upgraded in the valid partition based on the delivered upgrade application program, the method further includes:

[0022] If it is determined that all applications need to be upgraded, the upgrade application corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition;

[0023] When it is determined that the backup programs of all target upgrade programs are completely updated, the valid partition and the backup partition are switched.

[0024] In a possible implementation, after determining that all backup programs of all target upgrade programs are updated, the following steps are performed:

[0025] Record the hash value of the application upgrade program downloaded to the memory address segment corresponding to each target upgrade program in the backup partition.

[0026] In a second aspect, an embodiment of the present invention provides a dual-partition upgrade device, wherein the application storage area in the dual-partition controller includes an effective partition and a backup partition, the effective partition is used to store programs currently running by all applications, and the backup partition is used to store backup programs of all applications, and the device includes:

[0027] A determination module, used to determine the application program to be upgraded in the valid partition based on the upgraded application program issued;

[0028] An update module, for updating the backup program corresponding to the target upgraded program in the backup partition to the upgraded application corresponding to the target upgraded program, and updating the backup program corresponding to the target non-upgraded program in the backup partition to the application corresponding to the target non-upgraded program in the valid partition if it is determined that only some of the applications need to be upgraded; wherein the target upgraded program is any application that needs to be upgraded, and the target non-upgraded program is any application that does not need to be upgraded;

[0029] The upgrade module is used to switch the valid partition and the backup partition when it is determined that the backup programs of all target upgraded programs are all updated and the backup programs of all target non-upgraded programs are all updated.

[0030] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.

[0031] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0032] The embodiment of the present invention provides a dual-partition upgrade method, device, equipment and storage medium. First, based on the issued upgrade application, the application to be upgraded in the dual-partition controller is determined. Then, if it is determined that only part of the application needs to be upgraded, the backup program corresponding to the target upgrade program in the backup partition is updated to the upgrade application corresponding to the target upgrade program, and the backup program corresponding to the target non-upgraded program in the backup partition is updated to the application corresponding to the target non-upgraded program in the effective partition. Finally, when it is determined that the backup programs of all target upgrade programs are all updated and the backup programs of all target non-upgraded programs are all updated, the effective partition and the backup partition are switched. The present invention stores the currently running programs of all applications in the effective partition and the backup programs of all applications in the backup partition. When it is determined that only part of the application needs to be upgraded, the backup program of the program to be upgraded is first updated to the upgrade application, and the backup program of the non-upgraded program is updated to the program in its effective partition, thereby ensuring that the program of the upgrade program in the backup partition and the effective partition is the same, and ensuring that when different application upgrades switch partitions, there will be no software version rollback caused by different applications not being upgraded at the same time. And improve the flexibility and upgrade speed of a single program or part of the program. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0034] Figure 1 is a process block diagram of a dual partition upgrade method provided by an embodiment of the present invention;

[0035] Figure 2 is a schematic diagram of a dual-partition controller including two application programs provided by an embodiment of the present invention;

[0036] Figure 3 It is a schematic diagram of a rollback program version error when two application programs are upgraded in a dual partition controller provided by an embodiment of the present invention;

[0037] Figure 4 It is a schematic diagram of some application programs that need to be upgraded according to an embodiment of the present invention;

[0038] Figure 5 It is a schematic diagram that all application programs provided by the embodiment of the present invention need to be upgraded;

[0039] Figure 6is a flow chart of the implementation of the dual partition upgrade method provided by an embodiment of the present invention;

[0040] Figure 7 is a schematic diagram of the structure of a dual-partition upgrade device provided by an embodiment of the present invention;

[0041] Figure 8 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0043] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0044] As the frequency of automotive software updates increases, the traditional upgrade method requires erasing the current application before updating the new application. When the flashing under this method is interrupted or fails, all applications will be erased, making it impossible for customers to use them normally. In addition, when all applications are updated again, it takes a long time to download and update, which reduces the customer experience comfort.

[0045] At present, although some car controllers also support dual partition mode, that is, the internal storage space is divided into two parts, namely the effective partition and the backup partition. The effective partition stores the currently running program, and the backup partition is used to store the backup program of the currently running program. The latest program is downloaded to the backup partition. After the verification is successful, the backup partition and the effective partition are switched through the switching of the address mapping, and the latest program can be run in the effective partition.

[0046] In order to solve the problems of the prior art, an embodiment of the present invention provides a dual partition upgrade method, device, equipment and storage medium. The dual partition upgrade method can be applied to upgrade application programs in a vehicle. The dual partition upgrade method provided by an embodiment of the present invention is first introduced below.

[0047] See also Figure 1, which shows a flowchart of the implementation of the dual partition upgrade method provided by an embodiment of the present invention. All applications in the present invention are stored in the application storage area in the dual partition controller. The application storage area includes an effective partition and a backup partition. The effective partition is used to store the currently running programs of all applications, and the backup partition is used to store the backup programs of all applications. The dual partition upgrade method is described in detail as follows:

[0048] S110: Determine an application program to be upgraded in the dual-partition controller based on the delivered upgrade application program.

[0049] The host computer or gateway in the vehicle sends the upgraded application to the dual-partition controller through the Unified Diagnostic Services (UDS) or serial port protocol.

[0050] The dual partition controller can determine which application programs in the dual partition controller need to be upgraded by erasing the logical address range of the flash.

[0051] S120. If it is determined that only some applications need to be upgraded, the backup program corresponding to the target upgraded program in the backup partition is updated to the upgraded application corresponding to the target upgraded program, and the backup program corresponding to the target non-upgraded program in the backup partition is updated to the application corresponding to the target non-upgraded program in the valid partition.

[0052] The target upgraded program is any application program that needs to be upgraded, and the target non-upgraded program is any application program that does not need to be upgraded.

[0053] In order to ensure the integrity of the currently running applications in the effective partition and prevent the applications from failing to run after a download failure, the upgrade application that needs to be updated can be forced to be downloaded only to the backup partition, and then the backup partition and the effective partition are switched after the download is successful. At this time, the program can be upgraded and rolled back directly through the backup partition and the effective partition to achieve the program upgrade.

[0054] But when there are multiple applications, such as Figure 2 and 3As shown, the dual-partition controller has a boot program and an APP program. When the two applications need to be upgraded separately, that is, not at the same time, when the dual-partition controller receives the upgrade application boot 1 of the boot, it will first download the upgrade application of boot 1 to the memory address segment of the boot program in the backup partition, then the effective partition and the backup partition switch partitions, the boot 0 program in the effective partition is upgraded to boot1, and APP 0 in the effective partition is also updated to APP 0. When the dual-partition controller receives the upgrade application of APP 1, it will first download the upgrade application of APP 1 to the memory address segment of the APP program in the backup partition, then the effective partition and the backup partition switch partitions, the boot 1 program in the effective partition is rolled back to boot 0, and APP 0 in the effective partition is upgraded to APP 1. Since the two applications are not upgraded at the same time, the boot application version is rolled back to boot0, resulting in errors in the boot application, making it impossible for multiple applications to be upgraded flexibly and stably. At this time, in order to ensure the stability of the upgrade, the two applications need to be upgraded at the same time, which makes the upgrade time longer and inflexible, so that customers cannot use it normally.

[0055] In some embodiments, when there are multiple applications in the dual-partition controller and it is determined that only some of the applications need to be upgraded, in order to flexibly upgrade multiple applications and ensure that the software version of the application will not be rolled back, different processing is performed for the applications that need to be upgraded and the applications that do not need to be upgraded. Specifically:

[0056] Each application in the dual-partition controller has a corresponding memory address segment in the effective partition and the backup partition.

[0057] First, if it is determined that only some applications need to be upgraded, the upgrade application corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition to update the backup program of the target upgrade program in the backup partition.

[0058] After downloading the upgrade application program of the target upgrade program into the memory address segment corresponding to the backup partition of the target upgrade program, the hash value of the application upgrade program downloaded into the memory address segment corresponding to the backup partition of the target upgrade program can also be recorded for use in subsequent upgrade processes.

[0059] Then, after the upgrade application corresponding to the target upgrade program is downloaded and the corresponding backup program is updated, in order to prevent the remaining versions that do not need to be upgraded from being rolled back, they can be processed by copying.

[0060] In this embodiment, all the backup programs corresponding to the programs that do not need to be updated in the backup partition can be updated to their corresponding applications in the effective partition, ensuring that the backup program in the backup partition is the same as the program of the application in the effective partition. Although all the programs that do not need to be updated in the effective partition are copied to their memory address segments in the backup partition, the original backup program can be updated, which can prevent the program version from accidentally rolling back when swapping partitions. However, when there are multiple programs that do not need to be updated, copying all of them will also take a certain amount of time.

[0061] In this embodiment, in order to further improve the upgrade speed, it is possible to determine which programs that do not need to be upgraded are different in the backup partition and the valid partition, and then only copy the different programs that do not need to be upgraded, thereby saving a little processing time. The specific process is:

[0062] When the hash value of the backup program corresponding to the target program that does not need to be updated in the backup partition is different from the hash value of the application program corresponding to the target program that does not need to be updated in the valid partition, the target program that does not need to be updated is determined as the target non-upgraded program. The target program that does not need to be updated is any application program that does not need to be upgraded.

[0063] The application program corresponding to the target non-upgraded program in the memory address segment of the effective partition is copied to the corresponding memory address segment in the backup partition to update the backup program of the target non-upgraded program in the backup partition.

[0064] By copying the program in the effective partition and backup partition inside the dual-partition controller, the processing efficiency can be improved, the processing time can be shortened, and the upgrade speed can be increased compared to downloading the program through the UDS protocol or serial port protocol through the host computer or gateway controller. In addition, by copying the program in the effective partition and the backup partition, the management of the software version can be simplified, and there is no need to determine which version the previous version of the application is, which reduces the difficulty of processing.

[0065] In addition, after copying the application corresponding to the target non-upgraded program in the memory address segment of the valid partition to the corresponding memory address segment in the backup partition, the hash value of the application updated to the memory address segment of the target non-upgraded program in the backup partition can also be recorded for subsequent comparison.

[0066] In some embodiments, when it is determined that all application programs need to be upgraded, the upgrade application program corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition.

[0067] S130: When it is determined that the backup programs of all target upgraded programs are completely updated, and the backup programs of all target non-upgraded programs are completely updated, the valid partition and the backup partition are switched.

[0068] After it is determined that the backup programs of all target upgraded programs are completely updated, and the backup programs of all target non-upgraded programs are completely updated, the valid partition and the backup partition can be switched through address mapping.

[0069] The dual-partition upgrade method provided by the present invention can support flexible upgrades of a single program and multiple programs, ensure program compatibility, shorten program upgrade time, and ensure that the application program is rolled back to the version before the upgrade.

[0070] The dual partition upgrade method provided by the present invention is described in detail below through a specific example;

[0071] There are application A, application B and application CAL in the dual-partition controller. During compilation, each application has a fixed reserved memory address segment in the effective partition and the backup partition.

[0072] like Figure 4 and 6 As shown, when it is determined that only application CAL has an upgraded application, first, download the upgraded application CAL 2 in the memory address segment corresponding to the backup partition of application CAL, so that the backup program CAL 0 is updated to the upgraded application CAL 2. After the update is completed, the dual-partition controller will verify and record the hash value of the backup program CAL 2 of application CAL, waiting for the next call. Then, the hash values ​​of application A and application B in the effective partition and the backup partition are judged. The hash values ​​of application A and application B in the effective partition and the backup partition are not the same. It is necessary to copy program A1 of application A in the effective partition to its memory address segment in the backup partition, and update the original program A0 to A1. Copy program B1 of application B in the effective partition to its memory address segment in the backup partition, and update the original program B0 to B1. After the copying is completed, the dual-partition controller will verify and record the hash value of backup program A1 of application A and the hash value of backup program B1 of application B, waiting for the next call. After all applications are successfully verified, the partition can be switched to complete the upgrade.

[0073] By comparing hash values ​​and copying programs that do not need to be updated, it can be ensured that the backup programs in the backup partition of all programs that do not need to be updated are the same as the program versions in the effective partition. When switching partitions, there will be no software version rollback caused by different applications being upgraded at different times, which improves the flexibility of upgrading a single program or part of the program. And compared to re-downloading the application through the UDS protocol or serial port protocol, by copying in the program storage area in the dual-partition controller, the upgrade speed can be further improved.

[0074] It should be noted that after downloading and copying the program, verification is required, that is, the correctness of the downloaded program and the copied program needs to be determined.

[0075] like Figure 5 and 6 As shown, when it is determined that application A, application B and application CAL all correspond to upgrade applications, then the upgrade application CAL 1 is downloaded in the memory address segment corresponding to the backup partition of application CAL, so that the backup program CAL 0 is updated to the upgrade application CAL 1. The upgrade application A 1 is downloaded in the memory address segment corresponding to the backup partition of application A, so that the backup program A 0 is updated to the upgrade application A 1. The upgrade application B 1 is downloaded in the memory address segment corresponding to the backup partition of application B, so that the backup program B 0 is updated to the upgrade application B 1. After the download is completed, the dual-partition controller will verify and record the hash values ​​of the backup programs A1, B1, and CAL 1 of application A, application B, and application CAL, waiting for the next call. After all applications have been verified successfully, the partition can be switched to complete the upgrade.

[0076] The embodiment of the present invention provides a dual-partition upgrade method. First, based on the issued upgrade application program, the application program to be upgraded in the dual-partition controller is determined. Then, if it is determined that only part of the application programs need to be upgraded, the backup program corresponding to the target upgrade program in the backup partition is updated to the upgrade application corresponding to the target upgrade program, and the backup program corresponding to the target non-upgraded program in the backup partition is updated to the application corresponding to the target non-upgraded program in the effective partition. Finally, when it is determined that the backup programs of all target upgrade programs are all updated and the backup programs of all target non-upgraded programs are all updated, the effective partition and the backup partition are switched. The present invention stores the currently running programs of all applications in the effective partition and the backup programs of all applications in the backup partition. When it is determined that only part of the application programs need to be upgraded, the backup program of the program to be upgraded is first updated to the upgrade application, and the backup program of the non-upgraded program is updated to the program in its effective partition, thereby ensuring that the program of the upgrade program in the backup partition and the effective partition is the same, and ensuring that when different application programs are upgraded and switched partitions, the problem of software version rollback caused by different applications not being upgraded at the same time will not occur. And the flexibility and upgrade speed of a single program or part of the program are improved.

[0077] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0078] Based on the dual-partition upgrade method provided in the above embodiment, the present invention also provides a specific implementation of a dual-partition upgrade device applied to the dual-partition upgrade method. Please refer to the following embodiment.

[0079] like Figure 7 As shown, a dual-partition upgrade device 700 is provided, wherein the application storage area in the dual-partition controller includes an effective partition and a backup partition, wherein the effective partition is used to store currently running programs of all applications, and the backup partition is used to store backup programs of all applications, and the device includes:

[0080] A determination module 710, configured to determine an application program to be upgraded in a valid partition based on the upgraded application program issued;

[0081] The updating module 720 is used for updating the backup program corresponding to the target upgraded program in the backup partition to the upgraded application corresponding to the target upgraded program, and updating the backup program corresponding to the target non-upgraded program in the backup partition to the application corresponding to the target non-upgraded program in the valid partition if it is determined that only some of the applications need to be upgraded; wherein the target upgraded program is any application that needs to be upgraded, and the target non-upgraded program is any application that does not need to be upgraded;

[0082] The upgrade module 730 is used to switch the valid partition and the backup partition when it is determined that the backup programs of all target upgraded programs are all updated and the backup programs of all target non-upgraded programs are all updated.

[0083] In a possible implementation, a backup program corresponding to each application program in the backup partition is provided with a corresponding memory address segment;

[0084] The updating module 720 is used to download the upgrading application program corresponding to the target upgrading program to the memory address segment corresponding to the target upgrading program in the backup partition, so as to update the backup program of the target upgrading program in the backup partition.

[0085] In a possible implementation, the update module 720 is used to record the hash value of the application upgrade program downloaded to the memory address segment corresponding to the target upgrade program in the backup partition.

[0086] In a possible implementation, each application in the valid partition is provided with a corresponding address segment, and each application in the backup partition is also provided with a corresponding address segment;

[0087] The updating module 720 is used to determine the target program that does not need to be updated as a target non-upgraded program when the hash value of the backup program corresponding to the target program that does not need to be updated in the backup partition is different from the hash value of the application program corresponding to the target program that does not need to be updated in the valid partition; wherein the target program that does not need to be updated is any application program that does not need to be upgraded;

[0088] The application program corresponding to the target non-upgraded program in the memory address segment of the effective partition is copied to the corresponding memory address segment in the backup partition to update the backup program of the target non-upgraded program in the backup partition.

[0089] In a possible implementation, the update module 720 is used to record the hash value of the application program updated to the memory address segment of the target non-upgraded program in the backup partition.

[0090] In a possible implementation, the update module 720 is used to download the upgrade application corresponding to the target upgrade program to the memory address segment corresponding to the target upgrade program in the backup partition if it is determined that all the applications need to be upgraded;

[0091] When it is determined that the backup programs of all target upgrade programs are all updated, all application programs in the effective partition and the backup partition are switched.

[0092] In a possible implementation, the update module 720 is used to record the hash value of the application upgrade program downloaded to the memory address segment corresponding to each target upgrade program in the backup partition.

[0093] Figure 8 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 8 As shown, the electronic device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned dual partition upgrade method embodiments are implemented, for example Figure 1 Alternatively, when the processor 80 executes the computer program 82, the functions of each module in the above-mentioned device embodiments are realized, for example, Figure 7 Functions of modules 710 to 730 are shown.

[0094] Exemplarily, the computer program 82 may be divided into one or more modules, which are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules may be a series of computer program instruction segments that can implement specific functions, and the instruction segments are used to describe the execution process of the computer program 82 in the electronic device 8. For example, the computer program 82 may be divided into Figure 7 Modules 710 to 730 are shown.

[0095] The electronic device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the electronic device 8 and does not constitute a limitation of the electronic device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0096] The processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0097] The memory 81 may be an internal storage unit of the electronic device 8, such as a hard disk or memory of the electronic device 8. The memory 81 may also be an external storage device of the electronic device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 8. Further, the memory 81 may also include both an internal storage unit and an external storage device of the electronic device 8. The memory 81 is used to store the computer program and other programs and data required by the electronic device. The memory 81 may also be used to temporarily store data that has been output or is to be output.

[0098] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0099] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0100] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0101] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0104] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned dual partition upgrade method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.

[0105] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A dual partition upgrade method, characterized in that: The application storage area in the dual-partition controller includes an effective partition and a backup partition, wherein the effective partition is used to store programs currently running by all applications, and the backup partition is used to store backup programs of all applications. The method includes: Determine an application program to be upgraded in the dual-partition controller based on the upgraded application program issued; If it is determined that only some of the applications need to be upgraded, the backup program corresponding to the target upgraded program in the backup partition is updated to the upgraded application corresponding to the target upgraded program, and when the hash value of the backup program corresponding to the target program that does not need to be updated in the backup partition is different from the hash value of the application corresponding to it in the valid partition, the target program that does not need to be updated is determined to be a target non-upgraded program, and the backup program corresponding to the target non-upgraded program in the backup partition is updated to the application corresponding to the target non-upgraded program in the valid partition; wherein the target upgraded program is any application that needs to be upgraded, and the target non-upgraded program is any application that does not need to be upgraded; the target program that does not need to be updated is any application that does not need to be upgraded; When it is determined that all backup programs of the target upgraded programs are completely updated, and all backup programs of the target non-upgraded programs are completely updated, switching the valid partition and the backup partition; If it is determined that all applications need to be upgraded, the upgrade application corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition; when it is determined that all backup programs of the target upgrade program are updated, the valid partition and the backup partition are switched.

2. The dual partition upgrade method according to claim 1, characterized in that: A corresponding memory address segment is provided for a backup program corresponding to each application program in the backup partition; The step of updating the backup program corresponding to the target upgrade program in the backup partition to the upgrade application program corresponding to the target upgrade program includes: The upgrade application program corresponding to the target upgrade program is downloaded to the memory address segment corresponding to the target upgrade program in the backup partition, so as to update the backup program of the target upgrade program in the backup partition.

3. The dual partition upgrade method according to claim 2, characterized in that: After downloading the upgrade application corresponding to the target upgrade program to the memory address segment corresponding to the backup partition of the target upgrade program, the method further includes: Record the hash value of the application upgrade program downloaded to the memory address segment corresponding to the target upgrade program in the backup partition.

4. The dual partition upgrade method according to claim 1, characterized in that: Each application in the effective partition is provided with a corresponding address segment, and each application in the backup partition is also provided with a corresponding address segment; The step of updating the backup program corresponding to the target non-upgraded program in the backup partition to the application program corresponding to the target non-upgraded program in the valid partition includes: The application program corresponding to the target non-upgraded program in the memory address segment of the effective partition is copied to the corresponding memory address segment in the backup partition to update the backup program of the target non-upgraded program in the backup partition.

5. The dual partition upgrade method according to claim 4, characterized in that: After copying the application program corresponding to the target non-upgraded program in the memory address segment of the valid partition to the corresponding memory address segment in the backup partition, the method further includes: Record the hash value of the application program updated to the memory address segment of the target non-upgraded program in the backup partition.

6. The dual partition upgrade method according to claim 1, characterized in that: After determining that all backup programs of the target upgrade program are updated, the method includes: Record the hash value of the application upgrade program downloaded to the memory address segment corresponding to each target upgrade program in the backup partition.

7. A dual partition upgrade device, characterized in that: The application storage area in the dual-partition controller includes an effective partition and a backup partition, wherein the effective partition is used to store programs currently running by all applications, and the backup partition is used to store backup programs of all applications. The device includes: A determination module, configured to determine the application program to be upgraded in the valid partition based on the upgraded application program issued; An update module, for updating the backup program corresponding to the target upgrade program in the backup partition to the upgrade application corresponding to the target upgrade program if it is determined that only some of the applications need to be upgraded, and when the hash value of the backup program corresponding to the target program that does not need to be upgraded in the backup partition is different from the hash value of the application corresponding to it in the valid partition, determining the target program that does not need to be upgraded as a target program that has not been upgraded, and updating the backup program corresponding to the target program that has not been upgraded in the backup partition to the application corresponding to the target program that has not been upgraded in the valid partition; wherein the target upgrade program is any application that needs to be upgraded, and the target program that has not been upgraded is any application that does not need to be upgraded; An upgrade module, configured to switch the valid partition and the backup partition when it is determined that all backup programs of the target upgraded programs are completely updated and all backup programs of the target non-upgraded programs are completely updated; The upgrade module is also used to download the upgrade application corresponding to the target upgrade program to the memory address segment corresponding to the target upgrade program in the backup partition if it is determined that all applications need to be upgraded; when it is determined that all backup programs of the target upgrade program are updated, the valid partition and the backup partition are switched.

8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.