Application software upgrade method, device, system and storage medium
By guiding the software on the flight control computer to verify the validity of the application software and judge the status of the hardware, it solves the problems in the existing technology of long application software upgrade time and failure to check the validity of the software, achieving faster startup time and higher reliability.
Patent Information
- Application Number
- CN202110427858.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-20
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-04-20
AI Technical Summary
The existing flight control computer application software upgrade method takes a long time to start and does not check the validity of the existing application software, which may cause software data damage and cause harm.
After running, the boot software first determines whether the initial version of the application software has passed the validity check, and verifies the integrity of the application software through the check code. If it passes, it determines whether the switch status of the ground and programming hardware is allowed. If it is allowed, it will be accepted and upgraded. application software, otherwise start the application software.
It shortens the normal startup time of the system, improves the reliability of system operation, prevents unnecessary boot running time and random programming by non-professional users, ensures strict access conditions for software upgrades, and avoids abnormal system startup from entering upgrade mode.
Smart Images

Figure CN113010900B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software upgrade and maintenance, and in particular to an application software upgrade method, device, system and storage medium. Background Art
[0002] The flight control computer is the core of the UAV flight control system, on which the guidance software and application software are set. After the flight control computer is powered on, the guidance software will run first. The guidance software can choose to enter the maintenance and upgrade mode or directly start the application software. The application software realizes the control function of the flight process. During the UAV flight test and system optimization process, the application software needs to be frequently changed and upgraded.
[0003] At present, most of the methods for upgrading application software in flight control computers are that after power is turned on, the boot software waits for the user's loading instruction within a specific time window, and after receiving the loading instruction, it starts to receive the application software target code and burns it into FLASH, and after loading is completed, it waits for the user to power off. If the boot software does not receive the user's loading instruction within a specific time, it starts the application software.
[0004] The disadvantage of the above method is that after each power-on, it takes a while to wait regardless of whether the application software is upgraded, resulting in a long startup time; and the boot software only has an upgrade function and does not check the validity of existing application software. If the software data is damaged, it may cause certain harm after startup.
[0005] It should be noted that this section is intended to provide a background or context to the embodiments of the present disclosure as recited in the claims. No admission is made that the description herein is prior art by virtue of its inclusion in this section. Summary of the invention
[0006] The embodiments of the present invention provide an application software upgrading method, device, system and storage medium to solve the problems in the prior art that the application software upgrading method has a long startup time and does not check the validity of the existing application software.
[0007] In a first aspect, an embodiment of the present invention provides an application software upgrade method, comprising:
[0008] After the boot software is running, determine whether the initial version of the application software passes the validity check;
[0009] If the initial version of the application software passes the validity check, the guidance software determines whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission status;
[0010] If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the guidance software receives the upgraded version of the application software sent by the user terminal to upgrade the initial version of the application software.
[0011] As a preferred embodiment of the first aspect of the present invention, after the boot software is run, before determining whether the initial version of the application software passes the validity check, it also includes:
[0012] The hardware storage device of the flight control computer is divided into a boot area, an application software area and a check area, wherein the boot area is used to store the boot software, the application software area is used to store the initial version of the application software, and the check area is used to store an initial check code and an initial valid data length corresponding to the initial version of the application software.
[0013] As a preferred embodiment of the first aspect of the present invention, the step of determining whether the initial version of the application software passes the validity check includes:
[0014] The boot software reads the stored initial verification code and the initial valid data length from the verification area;
[0015] The boot software calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length, and determines whether the real-time initial verification code is consistent with the stored initial verification code;
[0016] If the real-time initial verification code is consistent with the stored initial verification code, it is determined that the initial version of the application software has passed the validity check; otherwise, it is determined that the initial version of the application software has not passed the validity check.
[0017] As a preferred embodiment of the first aspect of the present invention, the upgrading of the initial version of the application software comprises:
[0018] The boot software burns the upgraded application software into the application software area;
[0019] The boot software calculates the upgrade verification code of the upgraded version of the application software according to the upgrade effective data length of the upgraded version of the application software;
[0020] The boot software uses the upgrade verification code and the upgrade valid data length as a new storage initial verification code and initial valid data length respectively, and stores them in the verification area.
[0021] As a preferred embodiment of the first aspect of the present invention, after determining whether the initial version of the application software passes the validity check, the method further includes:
[0022] If the initial version of the application software fails the validity check, the boot software is executed to receive the upgraded version of the application software sent by the user terminal to upgrade the initial version of the application software.
[0023] As a preferred embodiment of the first aspect of the present invention, after the guidance software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, it also includes:
[0024] If the switch states of the ground permission hardware and the programming permission hardware are not both in the permission state, the boot software starts the initial version application software.
[0025] As a preferred embodiment of the first aspect of the present invention, after the guidance software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, it also includes:
[0026] If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the boot software reads the initial version of the application software from the application software area and transmits it to the user end.
[0027] In a second aspect, an embodiment of the present invention provides an application software upgrading device, comprising:
[0028] A first judgment unit is used to judge whether the initial version of the application software passes the validity check after the boot software runs;
[0029] A second judgment unit is used for, if the initial version of the application software passes the validity check, for the boot software to judge whether the switch value states of the ground permission hardware and the programming permission hardware are both in the permission state;
[0030] The software upgrade unit is used for, if the switch status of the ground permission hardware and the programming permission hardware are both in the permission status, the guidance software receives the upgraded application software sent by the user terminal to upgrade the initial application software.
[0031] In a third aspect, an embodiment of the present invention provides a computing device, comprising a processor and a memory, wherein the memory stores execution instructions, and the processor reads the execution instructions in the memory to execute the steps described in the above-mentioned application software upgrade method.
[0032] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the steps described in the above-mentioned application software upgrading method.
[0033] The application software upgrade method, device, system and storage medium provided by the embodiment of the present invention guide the software to determine whether the initial version of the application software has passed the validity check after it is run, to ensure that the application software can only run after the validity check is qualified. Once an error is found, the startup of the application software can be terminated and the upgrade mode can be entered. Otherwise, the switch status of two external hardware is collected, and the upgrade mode can only be entered when both are in the allowed state. The conditions for entering the upgrade mode are strictly limited, and the normal startup time of the system is shortened.
[0034] The present invention adopts a pre-application software validity check strategy to improve the reliability of system operation, especially for software data damage in FLASH and a blank CPU board newly produced, which can directly enter the upgrade mode; at the same time, by collecting the switch quantity status of two external hardware, the access conditions for software upgrade are made more stringent, avoiding unnecessary boot running time, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from randomly burning the application software. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0036] Figure 1 A flowchart of an application software upgrade method provided by an embodiment of the present invention;
[0037] Figure 2 A flowchart of an implementation method of an application software upgrade method provided by an embodiment of the present invention;
[0038] Figure 3 A schematic diagram of the structure of an application software upgrading device provided by an embodiment of the present invention;
[0039] Figure 4 A structural diagram of an application software upgrading system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0041] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0042] Figure 1 The present invention exemplarily shows a flow chart of an application software upgrade method provided by an embodiment of the present invention. The method is used to upgrade the application software in the flight control computer of an unmanned aerial vehicle, and can effectively solve the problems of long startup time of existing application software upgrades and no check on the validity of existing application software.
[0043] Reference Figure 1 As shown, the method mainly includes the following steps:
[0044] Step 101: After the boot software is running, determine whether the initial version of the application software passes the validity check;
[0045] Step 102: If the initial version of the application software passes the validity check, the guidance software determines whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission status;
[0046] Step 103: If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the guidance software receives the upgraded version of the application software sent by the user end to upgrade the initial version of the application software.
[0047] It should be noted that the drone described in this embodiment can be a suitable unmanned aerial vehicle, including fixed-wing unmanned aerial vehicles and rotary-wing unmanned aerial vehicles, such as helicopters, quadcopters and aircraft with other numbers of rotors and / or rotor configurations, and can also be other movable objects, such as manned aircraft, model aircraft, unmanned airships and unmanned hot air balloons.
[0048] In actual applications, in the flight control computer of the drone, the running software configuration items are divided into boot software and application software, and the boot software guides the application software to complete the software startup and upgrade. Among them, the boot software and application software are both installed in the hardware storage device of the flight control computer, and the software of the flight control computer is configured to start from the hardware storage device.
[0049] Before the boot software starts working, the storage space of the hardware storage device is partitioned to facilitate subsequent processes.
[0050] Therefore, before step 101, the following steps are also included:
[0051] Step 100: divide the hardware storage device of the flight control computer into a boot area, an application software area and a check area.
[0052] In step 100, the boot area is used to store the boot software and is responsible for checking, upgrading and maintaining the application software. The application software area is used to store the initial version of the application software. The verification area is used to store the initial verification code and the initial valid data length corresponding to the initial version of the application software. The verification area is also used to write the verification code and the valid data length of the upgraded application software when the application software is upgraded.
[0053] It should be noted that the above hardware storage device is a FLASH memory, and the software of the flight control computer is configured to start from the FLASH memory.
[0054] In step 101, the initial version of the application software is the initial version of the application software pre-installed on the flight control computer, which can be understood as the currently used application software that has not been updated or upgraded.
[0055] After the flight control computer of the drone is powered on, it runs the boot software, which can directly run the initial version of the application software or enter the upgrade mode.
[0056] After the boot software is running, a pre-application software validity check strategy is adopted to first check the validity of the initial version of the application software to ensure that it can only run after passing the validity check. Once an error is found, the startup of the initial version of the application software can be terminated and enter the upgrade mode, which can improve the reliability of system operation.
[0057] In an optional embodiment provided by the present application, when determining whether the initial version of the application software passes the validity check, the following steps may be specifically implemented:
[0058] Step 1011, the boot software reads and stores the initial check code and initial valid data length from the check area.
[0059] In this step, when judging whether the initial version of the application software passes the validity check, the boot software adopts the CRC check method, and first reads the stored initial check code crc_read and the initial valid data length corresponding to the initial version of the application software from the check area.
[0060] Step 1012: The boot software calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length, and determines whether the real-time initial verification code is consistent with the stored initial verification code.
[0061] In this step, the boot software calculates the real-time initial check code crc_calc of the initial version of the application software in the application software area according to the initial valid data length read above.
[0062] Then, the boot software compares the calculated real-time initial check code crc_calc with the read storage initial check code crc_read to see if they are consistent.
[0063] Step 1013: If the real-time initial verification code is consistent with the stored initial verification code, it is determined that the initial version of the application software has passed the validity check; otherwise, it is determined that the initial version of the application software has not passed the validity check.
[0064] In this step, if the boot software determines that the real-time initial verification code crc_calc and the stored initial verification code crc_read are consistent after comparison, it is determined that the initial version of the application software has passed the validity check and confirmed that the initial version of the application software has passed the verification.
[0065] If the boot software determines, after comparison, that the real-time initial verification code crc_calc and the stored initial verification code crc_read are inconsistent, it is determined that the initial version of the application software has not passed the validity check, and it is confirmed that the initial version of the application software has failed the verification.
[0066] In step 102, if the initial version of the application software passes the validity check, the boot software further strictly limits the entry conditions for the initial version of the application software to enter the upgrade mode by collecting the switch status of two external hardware, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from arbitrarily burning the software.
[0067] Specifically, the boot software determines whether the switch status of the ground enable (GSE) hardware and the programming enable (ISPL) hardware are both in the enable status.
[0068] In step 103, if the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the boot software determines that the initial version application software meets the conditions for entering the upgrade mode, so the boot software receives the upgraded version application software sent by the user end to upgrade the initial version application software.
[0069] In an optional embodiment provided by the present application, when upgrading the initial version of the application software, the following steps may be specifically implemented:
[0070] Step 1031, the boot software burns the upgraded application software into the application software area.
[0071] In this step, when the initial version of the application software is upgraded, the boot software will receive the upgraded version of the application software data loaded by the user end, and burn it into the application software area.
[0072] After the burning is completed, the boot software further obtains the upgrade effective data length of the upgraded version of the application software data.
[0073] Step 1032: The boot software calculates the upgrade verification code of the upgraded version of the application software according to the upgrade effective data length of the upgraded version of the application software.
[0074] In this step, the boot software further calculates the upgrade verification code of the upgraded version of the application software according to the upgraded valid data length of the upgraded version of the application software obtained above.
[0075] Step 1033: The boot software uses the upgrade verification code and the upgrade valid data length as the new storage initial verification code and the initial valid data length, respectively, and stores them in the verification area.
[0076] In this step, the boot software updates the storage initial verification code and initial valid data length stored in the verification area with the upgrade verification code and upgrade valid data length of the upgraded application software obtained above, and stores them in the verification area as new storage initial verification code and new initial valid data length, which will be used for validity verification when the application software is upgraded next time.
[0077] After the above process, when the initial version of the software is upgraded, the upgrade process of the entire application software is completed.
[0078] Furthermore, in an optional embodiment provided by the present application, after determining whether the initial version of the application software passes the validity check, that is, after step 101, the following steps are also included:
[0079] If the initial version of the application software fails the validity check, the step of guiding the software to receive the upgraded version of the application software sent by the user terminal is executed to upgrade the initial version of the application software.
[0080] In this step, if it is determined that the real-time initial check code crc_calc and the stored initial check code crc_read are inconsistent, that is, the initial version of the application software has not passed the validity check, which is sufficient to indicate that the data of the initial version of the application software is damaged. Therefore, no further judgment steps are required. You can directly choose to upgrade the initial version of the application software, that is, execute step 103. Especially for software data damage in FLASH and newly shipped blank CPU boards, you can directly enter the upgrade mode, which can effectively shorten the waiting time before the upgrade.
[0081] Further, in an optional embodiment provided by the present application, after the guidance software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, that is, after step 102, the following steps are also included:
[0082] If the switch status of the ground permission hardware and the programming permission hardware are not both in the permission status, the boot software starts the initial version of the application software.
[0083] In this step, if the boot software determines that at least one of the switch states of the ground-permitted hardware and the programming-permitted hardware is not in the permitted state, it is determined that the initial version of the application software does not meet the conditions for entering the upgrade mode. At this time, the initial version of the application software is not upgraded, so the boot software only needs to start the initial version of the application software, shortening the waiting time before startup.
[0084] Further, in an optional embodiment provided by the present application, after the guidance software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, that is, after step 102, the following steps are also included:
[0085] If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the boot software reads the initial version of the application software from the application software area and transmits it to the user end.
[0086] In this step, if the switch status of the ground permission hardware and the programming permission hardware are both in the permission status, the boot software determines that the initial version of the application software also meets the conditions for entering the download mode. Therefore, the boot software reads the data of the initial version of the application software stored in the application software area and transmits it to the user end. After the transmission is completed, the entire process is completed.
[0087] By providing the download and backup function of application software, it is convenient to back up and verify the onboard software version during field maintenance.
[0088] At the same time, when the present invention is started in a non-maintenance scenario, a waiting window period for user instructions is avoided, thereby shortening the normal startup time of the system.
[0089] It should be noted that in actual applications, if the guidance software determines that the switch states of the ground-permitted hardware and the programming-permitted hardware are both in the permitted state, two option information will be provided: "Software Upgrade" and "Software Download". If the user terminal selects "Software Upgrade" at this time, the guidance software receives the upgraded version of the application software sent by the user terminal to upgrade the initial version of the application software, thereby realizing the upgrade process of the initial version of the application software; if the user terminal selects "Software Download" at this time, the guidance software reads the data of the initial version of the application software stored in the application software area and transmits it to the user terminal, thereby realizing the download process of the initial version of the application software.
[0090] It should be noted that, for the sake of simplicity, the embodiments of the above method are described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention.
[0091] To summarize, the application software upgrade method provided in the embodiment of the present invention guides the software to first determine whether the initial version of the application software has passed the validity check after it is run, to ensure that the application software can only run after the validity check is qualified. Once an error is found, the startup of the application software can be terminated and the upgrade mode can be entered. Otherwise, the switch status of two external hardware channels is collected, and the upgrade mode can only be entered when both are in the allowed state. This strictly limits the conditions for entering the upgrade mode and shortens the normal startup time of the system.
[0092] The present invention adopts a pre-application software validity check strategy to improve the reliability of system operation, especially for software data damage in FLASH and a blank CPU board newly produced, which can directly enter the upgrade mode; at the same time, by collecting the switch quantity status of two external hardware, the access conditions for software upgrade are made more stringent, avoiding unnecessary boot running time, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from randomly burning the application software.
[0093] Figure 2 An implementation flow chart of an application software upgrade method provided by an embodiment of the present invention is exemplarily shown. The method is used to upgrade the application software in the flight control computer of an unmanned aerial vehicle, and can effectively solve the problems of long startup time of existing application software upgrades and no check on the validity of existing application software.
[0094] Reference Figure 2 As shown, the method specifically comprises the following steps:
[0095] Step 201, the flight control computer is initialized to divide the hardware storage device of the flight control computer into a boot area, an application software area and a check area; wherein the boot area is used to store the boot software, the application software area is used to store the initial version of the application software, and the check area is used to store the initial check code and the initial valid data length corresponding to the initial version of the application software.
[0096] Step 202: Run the boot software.
[0097] Step 203: The boot software reads the initial verification code and the initial valid data length stored in the verification area, and calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length.
[0098] Step 204, the boot software checks whether the initial version of the application software passes the validity check by determining whether the real-time initial check code is consistent with the stored initial check code; if it passes the validity check, continue to step 205; if it fails the validity check, execute step 206.
[0099] Step 205, the guidance software checks whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission state; if both are in the permission state, continue to step 206, if not both are in the permission state, execute step 207.
[0100] Step 206: Boot the software into upgrade mode.
[0101] Step 207: The boot software starts the initial version of the application software.
[0102] Step 208 , the boot software determines whether to upgrade the initial version of the software; if so, continue to step 209 , otherwise, execute step 211 .
[0103] Step 209: The boot software burns the upgraded version of the application software into the application software area, and calculates the upgrade verification code of the upgraded version of the application software according to the upgrade effective data length of the upgraded version of the application software.
[0104] Step 210 , the boot software uses the upgrade verification code and the upgrade valid data length as the new storage initial verification code and the initial valid data length respectively, and stores them in the verification area, and continues to execute step 213 .
[0105] Step 211 , the boot software determines whether to download the initial version of the software; if so, continue to execute step 212 , otherwise, return to execute step 208 .
[0106] Step 212 , the boot software reads the initial version of the application software from the application software area and transmits it to the user end, and then continues to execute step 213 .
[0107] Step 213, the process is completed.
[0108] The specific implementation process of each step in the above embodiment can refer to the description of each method step in the above embodiment, which will not be repeated here.
[0109] To summarize, the application software upgrade method provided in the embodiment of the present invention guides the software to first determine whether the initial version of the application software has passed the validity check after it is run, to ensure that the application software can only run after the validity check is qualified. Once an error is found, the startup of the application software can be terminated and the upgrade mode can be entered. Otherwise, the switch status of two external hardware channels is collected, and the upgrade mode can only be entered when both are in the allowed state. This strictly limits the conditions for entering the upgrade mode and shortens the normal startup time of the system.
[0110] The present invention adopts a pre-application software validity check strategy to improve the reliability of system operation, especially for software data damage in FLASH and a blank CPU board newly produced, which can directly enter the upgrade mode; at the same time, by collecting the switch quantity status of two external hardware, the access conditions for software upgrade are made more stringent, avoiding unnecessary boot running time, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from randomly burning the application software.
[0111] Based on the same inventive concept, an embodiment of the present invention also provides an application software upgrading device. Since the principle of the device in solving the technical problem is similar to that of an application software upgrading method, the specific implementation of the device can refer to the specific implementation of the method, and the repeated parts will not be repeated.
[0112] Reference Figure 3 As shown, an embodiment of the present invention provides an application software upgrading device for upgrading the application software in the flight control computer of a drone, and the device mainly includes:
[0113] The first judgment unit 301 is used to judge whether the initial version of the application software passes the validity check after the software is started;
[0114] The second judgment unit 302 is used to guide the software to judge whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission status if the initial version of the application software passes the validity check;
[0115] The software upgrade unit 303 is used to guide the software to receive the upgraded version of the application software sent by the user end to upgrade the initial version of the application software if the switch status of the ground permission hardware and the programming permission hardware are both in the permission status.
[0116] It should be noted here that the above-mentioned first judgment unit 301, second judgment unit 302 and software upgrade unit 303 correspond to steps 101 to 103 in the above-mentioned method embodiment, and the three units have the same instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned method embodiment.
[0117] Preferably, it also includes:
[0118] The area division unit is used to divide the hardware storage device of the flight control computer into a boot area, an application software area and a check area. The boot area is used to store the boot software, the application software area is used to store the initial version of the application software, and the check area is used to store the initial check code and the initial valid data length corresponding to the initial version of the application software.
[0119] Preferably, the first judging unit 301 is specifically used for:
[0120] The boot software reads and stores the initial check code and initial valid data length from the check area;
[0121] The boot software calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length, and determines whether the real-time initial verification code is consistent with the stored initial verification code;
[0122] If the real-time initial verification code is consistent with the stored initial verification code, it is determined that the initial version of the application software has passed the validity check; otherwise, it is determined that the initial version of the application software has not passed the validity check.
[0123] Preferably, the second judging unit 302 is specifically used for:
[0124] If the initial version of the application software fails the validity check, the step of guiding the software to receive the upgraded version of the application software sent by the user terminal is executed to upgrade the initial version of the application software.
[0125] Preferably, the first judging unit 303 is specifically used for:
[0126] The boot software burns the upgraded application software into the application software area;
[0127] The boot software calculates the upgrade verification code of the upgraded version of the application software according to the upgrade effective data length of the upgraded version of the application software;
[0128] The boot software uses the upgrade verification code and the upgrade valid data length as the new storage initial verification code and the initial valid data length respectively, and stores them in the verification area.
[0129] Preferably, it also includes:
[0130] The software startup unit is used to guide the software to start the initial version of the application software if the switch status of the ground permission hardware and the programming permission hardware are not both in the permission status.
[0131] Preferably, it also includes:
[0132] The software download unit is used to guide the software to read the initial version of the application software from the application software area and transmit it to the user end if the switch status of the ground permission hardware and the programming permission hardware are both in the permission status.
[0133] It should be noted that the application software upgrading device provided in the embodiment of the present invention and the application software upgrading method described in the aforementioned embodiment belong to the same technical concept, and its specific implementation process can refer to the description of the method steps in the aforementioned embodiment, which will not be repeated here.
[0134] It should be understood that the units included in the above application software upgrade device are only logical divisions based on the functions implemented by the device. In actual applications, the above units can be superimposed or split. In addition, the functions implemented by the application software upgrade device provided in this embodiment correspond to the application software upgrade method provided in the above embodiment. The more detailed processing flow implemented by the device has been described in detail in the above method embodiment and will not be described in detail here.
[0135] To summarize, the application software upgrade device provided by the embodiment of the present invention guides the software to determine whether the initial version of the application software has passed the validity check after it is run, to ensure that the application software can be run only after the validity check is qualified. Once an error is found, the startup of the application software can be terminated and the upgrade mode can be entered. Otherwise, the switch status of two external hardware channels is collected, and the upgrade mode can only be entered when both are in the allowed state. This strictly limits the conditions for entering the upgrade mode and shortens the normal startup time of the system.
[0136] The present invention adopts a pre-application software validity check strategy to improve the reliability of system operation, especially for software data damage in FLASH and a blank CPU board newly produced, which can directly enter the upgrade mode; at the same time, by collecting the switch quantity status of two external hardware, the access conditions for software upgrade are made more stringent, avoiding unnecessary boot running time, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from randomly burning the application software.
[0137] Based on the same inventive concept, an embodiment of the present invention provides an application software upgrade system. Since the principle of solving technical problems by the system is similar to that of an application software upgrade method, the specific implementation of the system can refer to the specific implementation of the method, and the repeated parts will not be repeated.
[0138] Reference Figure 4 As shown, an embodiment of the present invention provides an application software upgrade system, which mainly includes a processor 401 and a memory 402, wherein the memory 402 stores an execution instruction. The processor 401 reads the execution instruction in the memory 402 to execute the steps described in any embodiment of the above-mentioned application software upgrade method. Alternatively, the processor 401 reads the execution instruction in the memory 402 to implement the functions of each unit in any embodiment of the above-mentioned application software upgrade device.
[0139] Figure 4 A schematic diagram of a structure of an application software upgrade system provided by an embodiment of the present invention, such as Figure 4 As shown, the computing device includes a processor 401 , a memory 402 and a transceiver 403 ; wherein the processor 401 , the memory 402 and the transceiver 403 communicate with each other via a bus 404 .
[0140] The bus 404 mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one arrow line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0141] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0142] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0143] To summarize, the application software upgrade system provided by the embodiment of the present invention guides the software to determine whether the initial version of the application software has passed the validity check after it is run, to ensure that the application software can be run only after the validity check is qualified. Once an error is found, the startup of the application software can be terminated and the upgrade mode can be entered. Otherwise, the switch status of two external hardware channels is collected, and the upgrade mode can only be entered when both are in the allowed state. This strictly limits the conditions for entering the upgrade mode and shortens the normal startup time of the system.
[0144] The present invention adopts a pre-application software validity check strategy to improve the reliability of system operation, especially for software data damage in FLASH and a blank CPU board newly produced, which can directly enter the upgrade mode; at the same time, by collecting the switch quantity status of two external hardware, the access conditions for software upgrade are made more stringent, avoiding unnecessary boot running time, preventing the system from abnormally entering the upgrade mode and hanging, and effectively preventing non-professional users from randomly burning the application software.
[0145] The embodiment of the present invention further provides a computer-readable storage medium, comprising computer-executable instructions, wherein the computer-executable instructions are used to execute the steps described in any of the embodiments of the above-mentioned application software upgrade method. Alternatively, the computer-executable instructions are used to execute the functions of each unit in the embodiment of the above-mentioned application software upgrade method device.
[0146] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination thereof. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
[0147] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0148] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0149] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0150] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for upgrading application software, characterized in that: include: The hardware storage device of the flight control computer is divided into a boot area, an application software area and a check area, wherein the boot area is used to store the boot software, the application software area is used to store the initial version of the application software, and the check area is used to store the storage initial check code and the initial valid data length corresponding to the initial version of the application software; after the boot software is run, the boot software reads the storage initial check code and the initial valid data length from the check area; The boot software calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length, and determines whether the real-time initial verification code is consistent with the stored initial verification code; If the real-time initial verification code is consistent with the stored initial verification code, it is determined that the initial version of the application software has passed the validity check; otherwise, it is determined that the initial version of the application software has not passed the validity check; If the initial version of the application software passes the validity check, the guidance software determines whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission status; If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the guidance software receives the upgraded version of the application software sent by the user end to upgrade the initial version of the application software.
2. The method according to claim 1, characterized in that The upgrading of the initial version of the application software comprises: The boot software burns the upgraded application software into the application software area; The boot software calculates the upgrade verification code of the upgraded version of the application software according to the upgrade effective data length of the upgraded version of the application software; The boot software uses the upgrade verification code and the upgrade valid data length as a new storage initial verification code and initial valid data length respectively, and stores them in the verification area.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: If the initial version of the application software fails the validity check, the boot software is executed to receive the upgraded version of the application software sent by the user terminal to upgrade the initial version of the application software.
4. The method according to claim 1 or 2, characterized in that: After the guiding software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the following further includes: If the switch states of the ground permission hardware and the programming permission hardware are not both in the permission state, the boot software starts the initial version application software.
5. The method according to claim 1 or 2, characterized in that: After the guiding software determines whether the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the following further includes: If the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the boot software reads the initial version of the application software from the application software area and transmits it to the user end.
6. An application software upgrading device, characterized in that: include: The first judgment unit is used to divide the hardware storage device of the flight control computer into a boot area, an application software area and a check area, wherein the boot area is used to store the boot software, the application software area is used to store the initial version of the application software, and the check area is used to store the storage initial check code and the initial valid data length corresponding to the initial version of the application software; after the boot software is run, the boot software reads the storage initial check code and the initial valid data length from the check area; The boot software calculates the real-time initial verification code of the initial version of the application software according to the initial valid data length, and determines whether the real-time initial verification code is consistent with the stored initial verification code; If the real-time initial verification code is consistent with the stored initial verification code, it is determined that the initial version of the application software has passed the validity check; otherwise, it is determined that the initial version of the application software has not passed the validity check; The second judgment unit is used for judging whether the switch status of the ground permission hardware and the programming permission hardware are both in the permission status if the initial version of the application software passes the validity check; The software upgrade unit is used for, if the switch states of the ground permission hardware and the programming permission hardware are both in the permission state, the guidance software receives the upgraded application software sent by the user end to upgrade the initial application software.
7. An application software upgrade system, characterized in that: The method comprises a processor and a memory, wherein the memory stores execution instructions, and the processor reads the execution instructions in the memory to execute the steps in the application software upgrade method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the steps in the application software upgrading method according to any one of claims 1 to 5.
