CN112650513B - Program upgrading method, device, computer equipment and storage medium - Google Patents

Program upgrading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN112650513B
CN112650513B CN202011587275.1A CN202011587275A CN112650513B CN 112650513 B CN112650513 B CN 112650513B CN 202011587275 A CN202011587275 A CN 202011587275A CN 112650513 B CN112650513 B CN 112650513B
Authority
CN
China
Prior art keywords
program
storage area
area
upgraded
validity information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011587275.1A
Other languages
Chinese (zh)
Other versions
CN112650513A (en
Inventor
邹文力
王跃明
肖育劲
宋永波
王晓琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yhlo Biotech Co Ltd
Original Assignee
Shenzhen Yhlo Biotech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yhlo Biotech Co Ltd filed Critical Shenzhen Yhlo Biotech Co Ltd
Priority to CN202011587275.1A priority Critical patent/CN112650513B/en
Publication of CN112650513A publication Critical patent/CN112650513A/en
Application granted granted Critical
Publication of CN112650513B publication Critical patent/CN112650513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

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

Abstract

The application relates to a program upgrading method, a program upgrading device, computer equipment and a storage medium. The method comprises the following steps: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting the bootstrap program by using the program data of the starting area so as to guide the target application program to start by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area. By adopting the method, the reliability of program upgrading can be improved.

Description

Program upgrading method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a program upgrading method, apparatus, computer device, and storage medium.
Background
With the development of software upgrade techniques, program upgrade techniques have emerged, which can update a low-version program to upgrade to a high-version program. In general, the high version usually repairs part of defects of the low version, and the program performance can be better and more optimized through program upgrading. Program upgrading can better meet the demands of users, and can also better perfect and stabilize a software system.
However, the current program upgrading method often has failure in the process of upgrading the program, so that the program cannot be used, i.e. the problem of low upgrading reliability exists.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a program upgrade method, apparatus, computer device, and storage medium capable of improving upgrade reliability.
A program upgrade method, the method comprising: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting the bootstrap program by using the program data of the starting area so as to guide the target application program to start by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area.
In one embodiment, the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule includes: comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address; when first validity information inconsistent with the second validity information exists, a storage area corresponding to the inconsistent first validity information is used as a to-be-upgraded area.
In one embodiment, the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule further includes: when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, acquiring a storage area with the storage area priority meeting a first preset priority condition, wherein the first preset priority condition comprises that the priority is behind a preset priority, as a to-be-upgraded area corresponding to the bootstrap program.
In one embodiment, the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule further includes: when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a region to be upgraded corresponding to the bootstrap program; the first address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is greater than a preset distance or at least one of distance sorting after preset sorting, and the distance sorting is performed in a sequence from small to large.
In one embodiment, when the program upgrade fails, the filtering the boot area from the storage area set according to the program boot rule includes: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; and when the third validity information consistent with the fourth validity information exists, taking a storage area corresponding to the consistent third validity information as a starting area.
In one embodiment, when the program upgrade fails, the selecting the boot area from the storage area set according to the program boot rule further includes: when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting a second address condition from the storage area set as a starting area; the second address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is smaller than a preset distance or at least one of distance sorting is performed before the preset sorting, and the distance sorting is performed in a descending order.
In one embodiment, the program upgrading the boot program in the area to be upgraded includes: receiving a boot program to be upgraded, which is sent by the boot program providing end; writing the boot program to be upgraded into the area to be upgraded so as to upgrade; and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in a verification region.
A program upgrade apparatus, the apparatus comprising: the upgrade operation receiving module is used for receiving upgrade operation of a bootstrap program corresponding to the target application program; the storage area set determining module is used for determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas, and the storage areas are used for storing the bootstrap program; the to-be-upgraded area screening module is used for screening the to-be-upgraded area corresponding to the bootstrap program from the storage area set according to an upgrade area screening rule; the program upgrading module is used for carrying out program upgrading on the guide program in the area to be upgraded; and the bootstrap program starting module is used for screening a starting area from the storage area set according to a program starting rule when the program upgrading fails, and starting the bootstrap program by using the program data of the starting area so as to guide the starting of the target application program by using the started bootstrap program.
In one embodiment, the to-be-upgraded region screening module is further configured to: comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address; when first validity information inconsistent with the second validity information exists, the storage area corresponding to the inconsistent first validity information is used as the area to be upgraded.
In one embodiment, the to-be-upgraded region screening module is further configured to: when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a to-be-upgraded area corresponding to the bootstrap program; the first address condition includes at least one of a distance between a memory area address and a firmware address of the boot program in the memory area set being greater than a preset distance or a distance ordering after the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the bootstrap initiation module is further configured to: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area.
In one embodiment, the bootstrap initiation module is further configured to: when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting the second address condition from the storage area set as a starting area; the second address condition includes at least one of a distance between the memory area address and the firmware address of the boot program in the memory area set being smaller than a preset distance or a distance ordering before the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the program upgrade module is further configured to: receiving a boot program to be upgraded, which is sent by a boot program providing end; writing a boot program to be upgraded into the area to be upgraded so as to upgrade; and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in the verification region.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting the bootstrap program by using the program data of the starting area so as to guide the target application program to start by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting the bootstrap program by using the program data of the starting area so as to guide the target application program to start by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area.
According to the program upgrading method, the device, the computer equipment and the storage medium, the storage area in which the boot program is stored is partitioned into a storage area set consisting of a plurality of storage areas by receiving upgrading operation of the boot program corresponding to the target application program, the area to be upgraded is screened out from the storage area set according to the screening rule of the upgrading area, the boot program in the area to be upgraded is subjected to program upgrading, when the program upgrading fails, a starting area is screened out from the storage area set according to the program starting rule, the boot program is started by using the program data of the starting area, and the target application program is started by using the started boot program; wherein, the program starting rule is opposite to the upgrading rule of the upgrading area. Even if the upgrading fails, the starting area can be screened from the storage area set, the program data of the starting area is used for starting the guiding program, and then the guiding program is used for guiding the starting of the target application program, so that the normal starting process of the target application program is completed, the problem that the program cannot be started normally due to the failure of the program upgrading is avoided, and the reliability of the program upgrading is improved.
Drawings
FIG. 1 is a diagram of an application environment for a program upgrade method in one embodiment;
FIG. 2 is a flow chart of a program upgrade method according to one embodiment;
FIG. 3 is a schematic flow chart of a process for selecting a region to be upgraded corresponding to a bootstrap program from a storage region set according to an upgrade region selection rule in an embodiment;
FIG. 4 is a flow chart of a process for selecting a boot sector from a set of memory sectors according to a program boot rule when a program upgrade fails in one embodiment;
FIG. 5 is a flow chart of a program upgrade for a boot program in a region to be upgraded according to one embodiment;
FIG. 6 is a block diagram of a program upgrade apparatus in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The program upgrading method provided by the application can be applied to an application environment shown in fig. 1. Including a terminal 102 and a server 104. Wherein the terminal 102 communicates with the server 104. In the process of program upgrade, the terminal 102 may obtain the program to be upgraded from the server 104, and complete the upgrade by using the program upgrade method at the local end of the terminal 102. Specifically, the terminal 102 receives an upgrade operation of a boot program corresponding to a target application program, and determines a storage area set corresponding to the boot program; the storage area set comprises a plurality of storage areas, wherein the storage areas are used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrading region screening rule; downloading the boot program to be upgraded to the area to be upgraded from the server 104 through the network, and carrying out program upgrading on the boot program in the area to be upgraded; when the program upgrade fails, a starting area is obtained by screening from the storage area set according to a program starting rule, and a bootstrap program is started by using program data of the starting area so as to guide the starting of a target application program by using the started bootstrap program, thereby completing the starting of the target application program of the local end of the terminal 102. The terminal 102 may be, but not limited to, various controllers, and control boards, personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices assembled by various controllers and peripheral components or devices, and the server 104 may be implemented by a separate server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a program upgrading method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
step 202, receiving an upgrade operation of a boot program corresponding to a target application program.
The bootstrap program is a program running before the target application program is started, and the target application program is booted after the bootstrap program is started. For example, common boot procedures include bootloader procedures. The target application refers to an application that needs to be started by the boot program before it can be started. The application may be an application that can be run on the terminal by compiling. Such as a commonly used APP (Application) application.
In one embodiment, the user may send an upgrade operation for the boot program corresponding to the target application through an entity or a virtual upgrade key on the terminal, and the terminal receives the upgrade operation for the boot program corresponding to the target application accordingly.
Step 204, determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas, and the storage areas are used for storing the bootstrap program.
The storage area is an area having a storage function and a storage capacity. For example, a memory area having a size of 512KB or a memory area having a size of 256KB, or the like.
Specifically, when the terminal is started for the first time, the storage area is divided into a storage area set formed by a plurality of storage areas, and a bootstrap program is stored in each storage area in the storage area set.
In one embodiment, the storage area is divided into at least one storage area for storing the boot program when the terminal is started for the first time. For example, the storage area is divided into a main area and a spare area, a boot program is stored in each of the main area and the spare area, and the boot program stored in the main area and the boot program stored in the spare area may be the same or different. In practical application, when the factory setting is performed, the boot program stored in the main area is the same as the boot program stored in the standby area, but after multiple operations or upgrades, the boot program stored in the main area and the boot program stored in the standby area have different situations.
And step 206, screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule.
The upgrade area screening rule refers to a rule capable of screening out an area to be upgraded corresponding to a bootstrap program, and at least one area to be upgraded can be screened out according to the upgrade area screening rule.
Specifically, the upgrade area screening rule includes screening the area to be upgraded according to the verification information of the bootstrap program or the priority of the storage area storing the bootstrap program.
In one embodiment, the determination of the area to be upgraded is performed according to the verification information of the bootstrap program, the verification information of the bootstrap program is screened out from the storage area set to be incorrect, and the storage area corresponding to the bootstrap program is used as the area to be upgraded. For example, the storage area set includes a storage area a, a storage area B and a storage area C, wherein if the verification information of the boot program stored in the storage area a is inconsistent with the verification information locally stored in the terminal, the storage area a is taken as the area to be upgraded.
In one embodiment, when the verification information of the storage areas in the storage area set is correct, the area to be upgraded is screened out according to the priority of the storage area storing the boot program, and the storage area with low priority is screened out to be used as the area to be upgraded. It will be understood that the priorities are relative, for example, the storage area set includes a storage area a, a storage area B and a storage area C, where the priority corresponding to the storage area a is 100, the priority corresponding to the storage area B is 50, and the priority corresponding to the storage area C is 25, and if one storage area is selected as the area to be upgraded, the storage area C with the lowest priority is selected as the area to be upgraded, assuming that the priority value is larger and the priority is higher. If two storage areas are selected as the areas to be upgraded, a storage area B and a storage area C with relatively low storage area priority are selected as the areas to be upgraded.
In one embodiment, the verification information and the priority are stored in a different storage area than the storage area storing the boot program, and each storage area corresponds to a different storage address. For example, the storage address where the check information and the priority are stored is 0X000000FF, and the storage area where the boot program is stored is 0X000001CF.
Step 208, program upgrading is performed on the boot program in the area to be upgraded.
Specifically, after the area to be upgraded is determined, the boot program in the area to be upgraded is subjected to program upgrading.
In one embodiment, the terminal may perform a program upgrade of the boot program in the area to be upgraded by acquiring the boot program used as an upgrade from a server or an upper computer to which the terminal is connected, and storing the boot program in the area to be upgraded.
Step 210, when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting a bootstrap program by using program data of the starting area so as to guide the starting of a target application program by using the started bootstrap program;
wherein the boot area refers to a storage area capable of booting a boot program by program data stored therein. The program start rule refers to a rule set to enable the program to start.
Specifically, when the program upgrade fails, a starting area needs to be obtained according to a program starting rule, and a bootstrap program is started by using program data of the starting area so as to guide the starting of a target application program by using the started bootstrap program.
In one embodiment, the program start rule is opposite to the upgrade area upgrade rule, for example, the program start rule is to select a boot program stored in a higher priority storage area in the storage area set for operation start, and the upgrade area upgrade rule is opposite to select a lower priority storage area in the storage area set as a to-be-upgraded area, and upgrade is completed by using the boot program in the to-be-upgraded area.
In the program upgrading method, the device, the computer equipment and the storage medium, the upgrading operation of the boot program corresponding to the target application program is received, the storage area in which the boot program is stored is partitioned into a storage area set consisting of a plurality of storage areas, the area to be upgraded is screened out of the storage area set according to the screening rule of the upgrading area, the boot program in the area to be upgraded is subjected to program upgrading, when the program upgrading fails, a starting area is screened out of the storage area set according to the program starting rule, the boot program is started by using the program data of the starting area, and the target application program is guided to start by using the started boot program; wherein, the program starting rule is opposite to the upgrading rule of the upgrading area. Even if the upgrading fails, the starting area can be screened from the storage area set, the program data of the starting area is used for starting the guiding program, and then the guiding program is used for guiding the starting of the target application program, so that the normal starting process of the target application program is completed, the problem that the program cannot be started normally due to the failure of the program upgrading is avoided, and the reliability of the program upgrading is improved.
In one embodiment, as shown in fig. 3, the step of screening the region to be upgraded, corresponding to the boot program, from the storage region set according to the upgrade region screening rule includes:
step 302, comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address.
The validity information is information that can verify whether the boot program is correct or not. The check address refers to a storage address where check information is stored. The check area refers to a storage area corresponding to the check address.
In one embodiment, the first check code of the boot strap may be compared to the second check code stored in the check area. For example, the MD5 checksum of the boot program may be used, as compared to the MD5 checksum stored in the memory area that verifies the validity of the boot program.
Step 304, when there is first validity information inconsistent with the second validity information, the storage area corresponding to the inconsistent first validity information is used as the area to be upgraded.
In one embodiment, after comparing the first validity information of the boot program stored in each storage area in the storage area set with the second validity information stored in the check area corresponding to the check address, when it is determined that the first validity information is inconsistent with the second validity information, the corresponding storage area is determined through the first validity information, and the storage area is used as the area to be upgraded.
In this embodiment, the purpose of accurately determining the area to be upgraded can be achieved by comparing the first validity information of the boot program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address.
In one embodiment, the step of screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule further includes:
when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, a storage area with the storage area priority meeting a first preset priority condition is obtained and used as a to-be-upgraded area corresponding to the bootstrap program, and the first preset priority condition comprises that the priority is behind the preset priority.
Specifically, when the first validity information corresponding to the bootstrap program stored in each storage area in the storage area set is consistent with the second validity information stored in the verification area corresponding to the verification address in the terminal, the bootstrap program stored in each storage area in the storage area set is proved to be the correct and valid bootstrap program. At this time, the validity of the boot program is used to judge that the area to be upgraded has no reference value, and the determination of the area to be upgraded can be performed by judging the priority of the storage area.
In one embodiment, the priorities of the storage areas in the storage area set are stored in the check area corresponding to the check address, and the priorities stored in the check areas form a sorting sequence from high to low, a preset priority condition is set to a certain priority threshold, the priority greater than the priority threshold is considered to be high priority, the priority less than the priority threshold is considered to be low priority, and the storage area with the low priority is taken as the area to be upgraded. For example, the storage areas stored in the check area have priorities of 200, 150, 100, 50 and 25, and the first preset priority condition is that the priority threshold is set to 60, then three storage areas corresponding to the priorities of 200, 150 and 100 are respectively high-priority storage areas, two storage areas corresponding to the priorities of 50 and 25 are low-priority storage areas, and the low-priority storage areas are used as the areas to be upgraded. It is understood that the area to be upgraded may be at least one storage area.
In this embodiment, the storage area priority is differentiated by a preset priority mode, so that the purpose of quickly and accurately determining the area to be upgraded can be achieved.
In one embodiment, the step of screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrade region screening rule further includes:
When the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a to-be-upgraded area corresponding to the bootstrap program; the first address condition comprises at least one of a distance between a storage area address and a firmware address of the boot program in the storage area set being greater than a preset distance or a distance ordering after the preset ordering.
The firmware address refers to a reference address capable of determining a memory area address.
In one embodiment, when the first validity information and the second validity information in the storage area set are not consistent, at least one of the storage area addresses in the storage area set and the firmware addresses of the boot program after the preset distance ordering is greater than the preset distance ordering is acquired. For example, the fixed address of the memory area and the firmware address is 0x0000, the firmware size is 1KB, the memory area in the memory area set includes a memory area a with a capacity of 1KB, a memory area B with a capacity of 2KB, a memory area C with a capacity of 3KB, a memory address of the memory area a is 0x0400, a memory address of the memory area B is 0x0800, a memory address of the memory area C is 0x1000, a distance between the memory area B and the memory area C and the firmware address is greater than a distance between the memory area a and the firmware address, and if the memory address at 0x0600 is a preset distance from the firmware address, the memory area B and the memory area C are the memory areas greater than the preset distance, and the memory area B and the memory area C are selected as the to-be-upgraded area. It can be understood that the distance sorting is performed in order from small to large, and the area to be upgraded can be screened out to meet at least one of the above-mentioned judging conditions of the area to be upgraded.
In one embodiment, when the first validity information and the second validity information in the storage area set are inconsistent, a storage area meeting a first address condition is obtained from the storage area set, the first address condition can respectively calculate distances between each storage area in the storage area set and the firmware address, the distances between each storage area and the firmware address are ordered, and at least one storage area after the preset ordering is selected as an area to be upgraded. For example, the distance from small to large in the storage area set is respectively a storage area a, a storage area B, a storage area C and a storage area D, and if the preset order is 2, the storage area a and the storage area B after the preset order are used as the areas to be upgraded.
In this embodiment, the purpose of accurately determining the area to be upgraded can be achieved by acquiring the storage area satisfying the first address condition from the storage area set.
In one embodiment, as shown in fig. 4, when the program upgrade fails, filtering the boot area from the storage area set according to the program boot rule includes:
step 402, when the program upgrade fails, comparing the third validity information of the boot program stored in each storage area in the storage area set with the fourth validity information stored in the check area corresponding to the check address.
In one embodiment, when the instrument fails or the terminal fails after power failure in the process of program upgrade, when the program upgrade fails, the terminal screens a starting area by comparing third validity information of the boot program stored in each storage area in the storage area set with fourth validity information stored in a verification area corresponding to the verification address, so that the screened starting area is used for starting, and further the upgrade can be continuously completed.
In step 404, when there is third validity information consistent with the fourth validity information, the storage area corresponding to the consistent third validity information is used as the start area.
In one embodiment, when the third validity information of the bootstrap program stored in each storage area in the storage area set is consistent with the fourth validity information stored in the check area corresponding to the check address, the bootstrap program stored in each storage area in the storage area set is proved to be valid, each storage area in the storage area set can be used as a starting area, one storage area can be selected as the starting area for shortening the starting time and saving the starting resources, priority ordering is required to be performed on each storage area in the storage area set with the valid information being consistent, and the storage area with the priority ordered at the first position is selected as the starting area.
In this embodiment, when the program upgrade fails, the third validity information of the boot program stored in each storage area in the storage area set is compared with the fourth validity information stored in the check area corresponding to the check address, and when the third validity information is consistent with the fourth validity information, the storage area corresponding to the third validity information is used as the starting area. It is achieved that at least one boot area is also available in case of a failure of an upgrade and that the boot is completed using the boot program in this boot area.
In one embodiment, when the program upgrade fails, the screening the boot area from the storage area set according to the program boot rule further includes:
when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting the second address condition from the storage area set as a starting area;
the second address condition includes at least one of a distance between the memory area address and the firmware address of the boot program in the memory area set being smaller than a preset distance or a distance ordering before the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, when the third validity information and the fourth validity information in the storage area set are inconsistent, a distance between a storage area address in the storage area set and a firmware address of the boot program is less than a preset distance. For example, the fixed address of the memory area and the firmware address is 0x0000, the firmware size is 1KB, the memory area set includes a memory area a with a capacity of 1KB, a memory area B with a capacity of 2KB, a memory area C with a capacity of 3KB, a memory address of 0x0400 of the memory area a, a memory address of 0x0800 of the memory area B, a memory address of 0x1000 of the memory area C, a distance between the memory area a and the firmware address is smaller than a distance between the memory area B and the memory area C and the firmware address, and if the memory address at 0x0600 is a preset distance between the memory area a and the firmware address, the memory area a is a memory area smaller than the preset distance is selected as the starting area. It can be understood that the distance sorting is performed in order from small to large, and at least one storage area meeting the above-mentioned start area judgment conditions can be screened out as a start area.
In one embodiment, when the third validity information and the fourth validity information in the storage area set are inconsistent, the storage area meeting the second address condition is obtained from the storage area set, the first address condition can respectively calculate the distance between each storage area in the storage area set and the firmware address, the distances between each storage area and the firmware address are ordered, and at least one storage area before the preset ordering is selected as the starting area. For example, the distance from small to large in the storage area set is a storage area a, a storage area B, a storage area C, and a storage area D, respectively, and the preset order is 2, and then the storage area C and the storage area D before the preset order are used as the start-up area. It will be appreciated that the boot area is at least one storage area that satisfies the second address condition.
In this embodiment, by setting the second address condition, when the third validity information and the fourth validity information in the storage area set are inconsistent, the storage area satisfying the second address condition is obtained from the storage area set as the start area, so that the purpose of accurately determining the start area can be achieved.
In one embodiment, as shown in FIG. 5, performing a program upgrade of a boot program in a region to be upgraded includes:
Step 502, receiving a boot program to be upgraded sent by a boot program providing end.
The bootstrap program providing terminal refers to a server, a terminal, or the like capable of providing a bootstrap program.
Specifically, after the area to be upgraded is determined, the terminal local end receives the boot program to be upgraded sent by the boot program providing end from the boot program providing end. The terminal local end and the bootstrap program providing end can communicate through at least one communication mode of network cable communication, serial port communication or wireless communication.
Step 504, writing the boot program to be upgraded into the area to be upgraded to upgrade.
In one embodiment, after the area to be upgraded is determined, when the terminal itself receives the boot program to be upgraded, the boot program to be upgraded is stored in the area to be upgraded, so as to perform the upgrade.
Step 506, obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in the verification region.
Specifically, when the boot program to be upgraded is written into the area to be upgraded, priority information of the area to be upgraded is correspondingly determined, so that the area to be upgraded becomes a storage area with priority, but program verification information of the boot program to be upgraded and the area to be upgraded are stored in another storage area and can be represented by the verification area.
In this embodiment, the purpose of completing program upgrading of the boot program in the area to be upgraded can be achieved by receiving the boot program to be upgraded, placing the boot program to be upgraded in the area to be upgraded, and storing the verification information of the boot program to be upgraded and the priority information of the area to be upgraded in the verification area.
In one embodiment, the embodiment is described by taking the upgrade of Boot (Bootloader) programs in a singlechip or other embedded systems as an example, and when the singlechip or other embedded systems are started, boot storage areas are divided into two storage area primary areas and standby areas, the primary areas and the standby areas respectively store Boot programs, and the Boot programs can initialize hardware equipment. The software system in the singlechip or the embedded system is divided into Firmware, boot program and application program. When the singlechip is started, the singlechip is started from a firmware part, the singlechip or other embedded systems are usually started to execute from a firmware address 0x00000000 when in power-on or reset, and the firmware judges whether the area stored by the Boot program is a main area or a standby area through the distance between the firmware and the storage area. Determining which Boot program of the storage area to use for starting by judging the validity of the Boot program stored in the main area and the Boot program stored in the standby area and judging the priority of the main area and the standby area, and if the Boot programs stored in the main area and the standby area are valid, selecting the Boot program in the storage area with high priority in the main area and the standby area for starting; if the validity is not met, a default main area is selected as a starting area, boot programs stored in the main area are utilized for starting, and corresponding application programs are started through the starting of the Boot programs. When a user upgrades the Boot program, the application program judges the effectiveness of the Boot program stored in the main area and the Boot program stored in the standby area, the priority of the main area and the priority of the standby area, and erases the storage area with the non-conforming Boot effectiveness; when the validity is accordant, erasing a storage area with lower priority and a Boot program stored in the storage area; and if the Boot program validity in the two storage areas is not met, the standby area is erased. After the corresponding storage areas are erased, the Boot program to be upgraded is written into the erased area through a communication link, and the written effective information of the Boot program to be upgraded and the priority of the corresponding storage area are stored into another storage area, so that the Boot program upgrading process is completed. If the Boot upgrade fails, the system firmware is restarted to select the Boot program stored in the storage area with higher priority to start, so that the problem that the system cannot be started after the upgrade fails is avoided. The validity information is verification information of the Boot program.
According to the method and the device, the Boot program stored in the main area and the Boot program stored in the standby area are judged to be effective, and the main area and the standby area are kept in priority all the time in the upgrading or starting process, so that in the process of upgrading the Boot program by a user, if an instrument breaks down to cause the power failure of the board, the board is only required to be electrified again for upgrading, the purpose of upgrading can be achieved without additional other equipment and operation, and the upgrading reliability is ensured.
It should be understood that, although the steps in the flowcharts of fig. 1-5 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-5 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
In one embodiment, as shown in fig. 6, there is provided a program upgrade apparatus 600, comprising: an upgrade operation receiving module 602, a storage area set determining module 604, a region to be upgraded screening module 606, a program upgrade module 608, and a bootstrap starting module 610, wherein: an upgrade operation receiving module 602, configured to receive an upgrade operation of a boot program corresponding to a target application program; a storage area set determining module 604, configured to determine a storage area set corresponding to the boot program, where the storage area set includes a plurality of storage areas, and the storage areas are used for storing the boot program; the to-be-upgraded region screening module 606 is configured to screen, according to an upgrade region screening rule, a region to be upgraded corresponding to the bootstrap program from the storage region set; a program upgrade module 608, configured to upgrade a boot program in a region to be upgraded; and the boot program starting module 610 is configured to screen a starting area from the storage area set according to a program starting rule when the program upgrade fails, and start a boot program by using program data of the starting area to guide the target application program to start by using the started boot program.
In one embodiment, the region to be upgraded screening module 606 is further configured to: comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address; when first validity information inconsistent with the second validity information exists, the storage area corresponding to the inconsistent first validity information is used as the area to be upgraded.
In one embodiment, the region to be upgraded screening module 606 is further configured to: when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, a storage area with the storage area priority meeting a first preset priority condition is obtained and used as a to-be-upgraded area corresponding to the bootstrap program, and the first preset priority condition comprises that the priority is behind the preset priority.
In one embodiment, the region to be upgraded screening module 606 is further configured to: when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a to-be-upgraded area corresponding to the bootstrap program; the first address condition includes at least one of a distance between a memory area address and a firmware address of the boot program in the memory area set being greater than a preset distance or a distance ordering after the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the bootstrap initiation module 610 is further configured to: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area.
In one embodiment, the bootstrap initiation module 610 is further configured to: when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting the second address condition from the storage area set as a starting area; the second address condition includes at least one of a distance between the memory area address and the firmware address of the boot program in the memory area set being smaller than a preset distance or a distance ordering before the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, program upgrade module 608 is further to: receiving a boot program to be upgraded, which is sent by a boot program providing end; writing a boot program to be upgraded into the area to be upgraded so as to upgrade; and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in the verification region.
For specific limitations of the program upgrading apparatus, reference may be made to the above limitations of the program upgrading method, and the description thereof will not be repeated here. The respective modules in the program upgrading apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a program upgrade method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrading region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting a bootstrap program by using program data of the starting area so as to guide the starting of a target application program by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area.
In one embodiment, the processor when executing the computer program further performs the steps of: comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address; when first validity information inconsistent with the second validity information exists, the storage area corresponding to the inconsistent first validity information is used as the area to be upgraded.
In one embodiment, the processor when executing the computer program further performs the steps of: when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, a storage area with the storage area priority meeting a first preset priority condition is obtained and used as a to-be-upgraded area corresponding to the bootstrap program, and the first preset priority condition comprises that the priority is behind the preset priority.
In one embodiment, the processor when executing the computer program further performs the steps of: when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a to-be-upgraded area corresponding to the bootstrap program; the first address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is greater than a preset distance or at least one of distance sorting after preset sorting, and the distance sorting is performed in a sequence from small to large.
In one embodiment, the processor when executing the computer program further performs the steps of: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area.
In one embodiment, the processor when executing the computer program further performs the steps of: when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting the second address condition from the storage area set as a starting area; the second address condition includes at least one of a distance between the memory area address and the firmware address of the boot program in the memory area set being smaller than a preset distance or a distance ordering before the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving a boot program to be upgraded, which is sent by a boot program providing end; writing a boot program to be upgraded into the area to be upgraded so as to upgrade; and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in the verification region.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving upgrading operation of a bootstrap program corresponding to a target application program; determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program; screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to the upgrading region screening rule; program upgrading is carried out on the bootstrap program in the area to be upgraded; when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting a bootstrap program by using program data of the starting area so as to guide the starting of a target application program by using the started bootstrap program; the program start rule is opposite to the upgrade rule of the upgrade area.
In one embodiment, the computer program when executed by the processor further performs the steps of: comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address; when first validity information inconsistent with the second validity information exists, the storage area corresponding to the inconsistent first validity information is used as the area to be upgraded.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, a storage area with the storage area priority meeting a first preset priority condition is obtained and used as a to-be-upgraded area corresponding to the bootstrap program, and the first preset priority condition comprises that the priority is behind the preset priority.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a to-be-upgraded area corresponding to the bootstrap program; the first address condition includes at least one of a distance between a memory area address and a firmware address of the boot program in the memory area set being greater than a preset distance or a distance ordering after the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting the second address condition from the storage area set as a starting area; the second address condition includes at least one of a distance between the memory area address and the firmware address of the boot program in the memory area set being smaller than a preset distance or a distance ordering before the preset ordering, the distance ordering being ordered in order from small to large.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a boot program to be upgraded, which is sent by a boot program providing end; writing a boot program to be upgraded into the area to be upgraded so as to upgrade; and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in the verification region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (8)

1. A program upgrade method, the method comprising:
receiving upgrading operation of a bootstrap program corresponding to a target application program;
determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas used for storing the bootstrap program;
screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule;
Program upgrading is carried out on the bootstrap program in the area to be upgraded;
when the program upgrade fails, screening a starting area from the storage area set according to a program starting rule, and starting the bootstrap program by using the program data of the starting area so as to guide the target application program to start by using the started bootstrap program; the program starting rule is opposite to the upgrading rule of the upgrading area;
when the program upgrade fails, the step of screening the starting area from the storage area set according to the program starting rule includes:
when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address;
when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area;
when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting a second address condition from the storage area set as a starting area; the second address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is smaller than a preset distance or at least one of distance sorting is performed before the preset sorting, and the distance sorting is performed in a descending order.
2. The method of claim 1, wherein the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule includes:
comparing the first validity information of the bootstrap program stored in each storage area in the storage area set with the second validity information stored in the verification area corresponding to the verification address;
when first validity information inconsistent with the second validity information exists, a storage area corresponding to the inconsistent first validity information is used as a to-be-upgraded area.
3. The method of claim 2, wherein the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule further includes:
when the first validity information inconsistent with the second validity information does not exist, according to the storage area priority stored in the check area corresponding to the check address, acquiring a storage area with the storage area priority meeting a first preset priority condition, wherein the first preset priority condition comprises that the priority is behind a preset priority, as a to-be-upgraded area corresponding to the bootstrap program.
4. The method of claim 2, wherein the screening the region to be upgraded corresponding to the bootstrap program from the storage region set according to an upgrade region screening rule further includes:
when the first validity information and the second validity information in the storage area set are inconsistent, acquiring a storage area meeting a first address condition from the storage area set as a region to be upgraded corresponding to the bootstrap program; the first address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is greater than a preset distance or at least one of distance sorting after preset sorting, and the distance sorting is performed in a sequence from small to large.
5. The method of claim 1, wherein the program upgrading the boot program in the area to be upgraded comprises:
receiving a boot program to be upgraded, which is sent by the boot program providing end;
writing the boot program to be upgraded into the area to be upgraded so as to upgrade;
and obtaining priority information corresponding to the region to be upgraded according to the priority related information corresponding to the boot program to be upgraded, and storing program verification information corresponding to the boot program to be upgraded and the priority information of the region to be upgraded in a verification region.
6. A program upgrade apparatus, the apparatus comprising:
the upgrade operation receiving module is used for receiving upgrade operation of a bootstrap program corresponding to the target application program;
the storage area set determining module is used for determining a storage area set corresponding to the bootstrap program, wherein the storage area set comprises a plurality of storage areas, and the storage areas are used for storing the bootstrap program;
the to-be-upgraded area screening module is used for screening the to-be-upgraded area corresponding to the bootstrap program from the storage area set according to an upgrade area screening rule;
the program upgrading module is used for carrying out program upgrading on the guide program in the area to be upgraded;
the boot program starting module is used for screening a starting area from the storage area set according to a program starting rule when program upgrading fails, and starting the boot program by using program data of the starting area so as to guide the target application program to be started by using the started boot program;
when the program upgrade of the bootstrap starting module fails, the step of screening the starting area from the storage area set according to a program starting rule includes: when the program upgrade fails, comparing the third validity information of the bootstrap program stored in each storage area in the storage area set with the fourth validity information stored in the verification area corresponding to the verification address; when third validity information consistent with the fourth validity information exists, a storage area corresponding to the consistent third validity information is used as a starting area; when the third validity information and the fourth validity information in the storage area set are inconsistent, acquiring a storage area meeting a second address condition from the storage area set as a starting area; the second address condition includes that a distance between a storage area address and a firmware address of the bootstrap program in the storage area set is smaller than a preset distance or at least one of distance sorting is performed before the preset sorting, and the distance sorting is performed in a descending order.
7. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 5.
CN202011587275.1A 2020-12-28 2020-12-28 Program upgrading method, device, computer equipment and storage medium Active CN112650513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011587275.1A CN112650513B (en) 2020-12-28 2020-12-28 Program upgrading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011587275.1A CN112650513B (en) 2020-12-28 2020-12-28 Program upgrading method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112650513A CN112650513A (en) 2021-04-13
CN112650513B true CN112650513B (en) 2024-01-16

Family

ID=75363617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011587275.1A Active CN112650513B (en) 2020-12-28 2020-12-28 Program upgrading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112650513B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703818B (en) * 2021-08-18 2024-05-17 深圳数马电子技术有限公司 Device upgrade method and apparatus, computer device, and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7392518B1 (en) * 2002-02-21 2008-06-24 3Com Corporation Robust remote flash ROM upgrade system and method
CN102023908A (en) * 2010-12-03 2011-04-20 中兴通讯股份有限公司 Method and device for backing up boot program
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7392518B1 (en) * 2002-02-21 2008-06-24 3Com Corporation Robust remote flash ROM upgrade system and method
CN102023908A (en) * 2010-12-03 2011-04-20 中兴通讯股份有限公司 Method and device for backing up boot program
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于ARM的煤矿监控分站IAP远程升级技术;丁远 等;《 煤矿安全》;第107-110页 *

Also Published As

Publication number Publication date
CN112650513A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN106020861B (en) A kind of the FOTA upgrade method and system of smartwatch
CN111124440A (en) Chip software burning method, chip software burning data processing method and device
CN105144074A (en) Block storage using a hybrid memory device
US20170364274A1 (en) Software Backup and Restoration Procedures Using Application and File Monitoring
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN110597542A (en) Automatic OTA (over the air) software upgrading method and device and electronic equipment
CN113835644B (en) Complete machine migration method, device, equipment and storage medium
CN109582332B (en) System upgrading method and device for Internet camera
US8788800B2 (en) OS processing method, system and non-transitory computer readable storage medium thereof
CN110851154B (en) Computer-implemented method, system, and medium for updating read-only memory code
CN106406939A (en) EMMC chip-based mobile terminal rollback prevention method and system
KR20140125565A (en) Method for managing memory and an electronic device thereof
CN113377392B (en) System capable of updating firmware in background and method for updating firmware in background
CN115762625A (en) Method, system, electronic device and storage medium for verifying eMMC function
CN112650513B (en) Program upgrading method, device, computer equipment and storage medium
CN105677409A (en) System upgrading method and device
US20030233536A1 (en) Automatic selection of firmware for a computer that allows a plurality of process types
US20210011736A1 (en) Method and apparatus for managing application
US20080276121A1 (en) Method and infrastructure for recognition of the resources of a defective hardware unit
CN116954674A (en) eMMC firmware upgrading method, firmware upgrading equipment and storage device
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN110825421A (en) Firmware upgrading method and system and readable storage medium
KR100860402B1 (en) Device and method for upgradin system using two step bootloader
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
KR20170037017A (en) Memory Upgrade System And Method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant