A radar firmware remote upgrade method and upgrade system

By receiving and verifying the digital signature of the upgrade package in the radar firmware upgrade system, and switching the boot flag to the old firmware during the upgrade process, the downtime problem caused by unstable communication during the upgrade of the radar firmware is solved and the radar firmware upgrade is realized. robustness and reliability.

CN113609476BActive Publication Date: 2024-08-23NANJING HURYS INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110858258.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-28
Publication Date
2024-08-23
Estimated Expiration
2041-07-28

AI Technical Summary

Technical Problem

In vehicle-road collaboration technology, radar firmware requires frequent iterative optimization, resulting in the same project requiring multiple versions of firmware. The traditional OTA automatic batch firmware upgrade method is not applicable, and due to the special application scenarios of millimeter-wave radar, the communication quality during remote upgrade is inconsistent. Factors such as stability are prone to failure, which may lead to equipment downtime.

Method used

Provide a radar firmware remote upgrade method and upgrade system that ensures the integrity of the new firmware by receiving and verifying the digital signature in the firmware upgrade package, and switches the boot flag to the old firmware during the upgrade process to avoid downtime, using multiple tasks directory to improve robustness.

Benefits of technology

It improves the risk resistance of the radar firmware upgrade process, ensures that the radar does not interrupt operation during the upgrade process, avoids the risk of downtime caused by incomplete firmware, and improves the reliability of the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113609476B
    Figure CN113609476B
Patent Text Reader

Abstract

The present invention discloses a method for remotely upgrading radar firmware, which includes: receiving a firmware upgrade package sent by a host computer, and putting the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes new radar firmware and an original digital signature; obtaining the latest digital signature of the new radar firmware, and when the latest digital signature is consistent with the original digital signature, copying the new radar firmware from the temporary folder to an inactive working directory, and switching a guide flag to the inactive working directory; restarting the radar and verifying the integrity of the new radar firmware in the inactive working directory, and when the new radar firmware is incomplete, switching the guide flag to the active working directory where the old version of the radar firmware is located. The technical solution provided by the present invention ensures that the radar will not be down due to upgrading under any circumstances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data communication technology, and in particular to a radar firmware remote upgrading method and upgrading system. Background Art

[0002] In recent years, vehicle-road cooperative technology has flourished, and the demand for radar-based road test perception systems has become increasingly strong. Usually, millimeter-wave radar is used for roadside perception projects. During the implementation process, the radar firmware needs to be frequently iterated and optimized according to the actual detection environment and customized requirements. And because the detection environment varies greatly, the radar firmware usually needs to be customized and developed, so that the normal operation of the same project requires multiple versions of radar firmware. This makes the OTA (Over-The-Air Technology) automatic batch firmware upgrade method commonly used in embedded devices inapplicable. And some special products in the radar family, such as millimeter-wave radar, have special application scenarios, scattered sites, high installation, and intranet environments. Most of the time, remote upgrades are required through the network, but the upgrade fails due to various uncertain factors such as unstable communication quality and low rate. Radar is not allowed to be in an unstartable state at any time. We need to ensure that any errors that occur during the upgrade process can fall back to safe firmware operation. The traditional communication equipment firmware upgrade method, once the firmware has problems during the upgrade process, is likely to cause the device to crash. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a radar firmware remote upgrade method and upgrade system, thereby improving the risk resistance of the radar firmware upgrade process.

[0004] According to a first aspect, a radar firmware remote upgrade method comprises:

[0005] Receive a firmware upgrade package sent by the host computer, and put the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes new radar firmware and an original digital signature;

[0006] Obtaining the latest digital signature of the new radar firmware, and if the latest digital signature is consistent with the original digital signature, copying the new radar firmware from the temporary folder to the inactive working directory, and switching the boot flag to the inactive working directory;

[0007] Restart the radar and verify the integrity of the new radar firmware in the inactive working directory. If the new radar firmware is incomplete, switch the guide flag to the active working directory where the old version of the radar firmware is located.

[0008] Optionally, the receiving the firmware upgrade package sent by the host computer and placing the firmware upgrade package into a temporary folder includes:

[0009] Receive an upgrade message sent by the host computer, wherein the upgrade message includes the name of the firmware upgrade package and a designated storage path;

[0010] The firmware upgrade package in the designated storage path is searched according to the name of the firmware upgrade package, and the firmware upgrade package is placed in the temporary folder.

[0011] Optionally, after obtaining the latest digital signature of the new radar firmware, the method further includes:

[0012] In the case where the latest digital signature is inconsistent with the original digital signature, sending an attempt message to the host computer to notify the host computer to send the firmware upgrade package for the second time;

[0013] When the firmware upgrade package is received for the second time and the latest digital signature is inconsistent with the original digital signature, an upgrade failure message is sent to notify the host computer to perform system vulnerability detection and network detection.

[0014] Optionally, copying the new radar firmware from the temporary folder to an inactive working directory and switching a boot flag to the inactive working directory comprises:

[0015] When the copy process starts, the copy status value is set to a first preset value to determine that the copy process is interrupted;

[0016] When the copy process ends, the copy status value is set to a second preset value to determine that the copy process is not interrupted, and the boot flag is switched to the inactive working directory.

[0017] Optionally, when the radar is restarted, if the copy state value is a first preset value, the method includes:

[0018] Clear the inactive working directory and restart copying the new radar firmware from the temporary folder to the inactive working directory;

[0019] At the end of the copying process, the copying state value is set to a second preset value, and the guide flag is switched to the inactive working directory to restart the radar.

[0020] Optionally, when the radar is restarted and the copy status value is a second preset value, after restarting the radar and verifying the integrity of the new radar firmware in the inactive working directory, the method further includes:

[0021] If the new radar firmware is complete, upgrading the inactive working directory to the current active working directory, downgrading the active working directory to the current inactive working directory, and continuing to boot the new radar firmware through the boot flag to run the radar;

[0022] If the new radar firmware is incomplete, the boot flag is switched to the active working directory, and the old version of the radar firmware in the active working directory is booted to run the radar.

[0023] Optionally, the radar firmware is encrypted using an asymmetric encryption algorithm, and before copying the radar firmware to the working directory, the method further includes:

[0024] The new radar firmware is decrypted using the private key.

[0025] According to a second aspect, a radar firmware remote upgrade system comprises:

[0026] A firmware receiving module, used for receiving a firmware upgrade package sent by the host computer and putting the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes new radar firmware and an original digital signature;

[0027] A digital signature verification module, used to obtain the latest digital signature of the new radar firmware, and when the latest digital signature is consistent with the original digital signature, copy the new radar firmware from the temporary folder to the inactive working directory, and switch the boot flag to the inactive working directory;

[0028] The protection module is started, the radar is restarted and the integrity of the new radar firmware in the inactive working directory is verified. If the new radar firmware is incomplete, the guide flag is switched to the active working directory where the old version of the radar firmware is located.

[0029] According to a third aspect, an electronic device includes:

[0030] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method described in the first aspect or any optional implementation manner of the first aspect by executing the computer instructions.

[0031] According to the fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in the first aspect or any optional implementation manner of the first aspect.

[0032] The technical solution of the present invention has the following advantages:

[0033] An embodiment of the present invention provides a radar firmware remote upgrade method and upgrade system. The method specifically includes: after receiving the radar firmware file required for the upgrade, verifying the digital signature of the new radar firmware, thereby determining whether the new radar firmware has been tampered with during the transmission process, or the new radar firmware file is missing due to network instability. When the digital signature verification fails, the incomplete new radar firmware file is deleted, and the reason for the upgrade failure is reported to the host computer, ensuring that the radar operation is not interrupted, and avoiding the risk of radar downtime caused by using damaged radar firmware files for upgrading. Further, in the case where the new radar firmware is complete, in order to avoid the interruption of the upgrade process due to power failure and other accidents during the copying process of the new radar firmware, thereby causing the radar to downtime, the embodiment of the present invention adds multiple working directories to copy the new radar firmware to the new working directory, and then the radar is restarted by guiding the new working directory to realize the operation of the radar; when the radar restarts but finds that the copy of the new radar firmware is wrong, it can also switch back to the original working directory in time so that the radar continues to work with the old version of the firmware, thereby improving the robustness of the radar firmware upgrade process. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 A schematic diagram of the steps of a radar firmware remote upgrade method according to an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of the structure of a radar firmware remote upgrade system according to an embodiment of the present invention;

[0037] Figure 3 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0039] The technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0040] See also Figure 1 , a radar firmware remote upgrade method provided by an embodiment of the present invention specifically comprises the following steps:

[0041] Step S101: Receive the firmware upgrade package sent by the host computer and put the firmware upgrade package into a temporary folder. The firmware upgrade package includes the new radar firmware and the original digital signature. Step S102: Obtain the latest digital signature of the new radar firmware, and if the latest digital signature is consistent with the original digital signature, copy the new radar firmware from the temporary folder to the inactive working directory, and switch the boot flag to the inactive working directory. Step S103: Restart the radar and verify the integrity of the new radar firmware in the inactive working directory. If the new radar firmware is incomplete, switch the boot flag to the active working directory where the old version of the radar firmware is located.

[0042] Among them, step S101: receiving a firmware upgrade package sent by a host computer, and putting the firmware upgrade package into a temporary folder, the firmware upgrade package including the new radar firmware and the original digital signature.

[0043] Specifically, in the radar upgrade process, in order to improve the robustness of the radar upgrade process, prevent the new radar firmware file from being missing or containing viruses and other risk situations, resulting in radar upgrade errors and radar downtime. In an embodiment of the present invention, the firmware upgrade package required for the upgrade is not directly placed in the working directory for decompression, and the firmware upgrade package is placed in a temporary folder to verify the integrity of the firmware file. Specifically, in one embodiment, before receiving the firmware upgrade package sent by the host computer, the radar first receives the user name and password information sent by the host computer. When the user name and password provided by the host computer are consistent with the token pre-stored in the radar, the radar establishes a connection with the host computer through the FTP service, thereby starting to receive the firmware upgrade package sent by the host computer. Among them, the firmware upgrade package includes the new radar firmware for updating and the original digital signature for verifying the integrity of the new radar firmware. Among them, the digital signature technology includes MD5, SHA, etc. In an embodiment of the present invention, the SHA-512 algorithm is used to complete the original digital signature of the new radar firmware. Compared with algorithms such as MD5, the algorithm has stronger anti-attack performance and improves the security of the new radar firmware during file transmission.

[0044] Specifically, in a preferred solution, the above step S101 further includes the following steps:

[0045] Step S201: receiving an upgrade message sent by a host computer, wherein the upgrade message includes the name of the firmware upgrade package and a designated storage path;

[0046] Step S202: searching for the firmware upgrade package in the specified storage path according to the name of the firmware upgrade package, and putting the firmware upgrade package into a temporary folder.

[0047] Specifically, the host computer, which has been authenticated by the username and password, can send the firmware upgrade package to a specified storage path of the radar in advance. After the firmware upgrade package is launched, an upgrade message is sent to the radar to inform the radar of the name and storage path of the upgrade package, that is, the FTP connection between the radar and the host computer is disconnected. After that, the radar searches for the firmware upgrade package in the specified path through the upgrade message to complete the upgrade when the occupancy rate is low. If a file error is found during the upgrade process, a connection is established with the host computer again, which avoids the long-term connection between the host computer and the radar during the upgrade process. On the one hand, the upgrade speed can be accelerated when the new radar firmware is complete, and on the other hand, processor and memory resources are saved.

[0048] Among them, step S102: obtain the latest digital signature of the new radar firmware, and when the latest digital signature is consistent with the original digital signature, copy the new radar firmware from the temporary folder to the inactive working directory, and switch the boot flag to the inactive working directory.

[0049] Specifically, when the digital signature verification of the new radar firmware passes, it means that the new radar firmware has not been tampered with or lost during the file transfer process. Therefore, the new radar firmware is complete and can be used for upgrading. At this time, the upgrade can be completed by copying the new radar firmware from the temporary folder and putting it in the working directory. However, due to the particularity of the radar device, in order to prevent accidents during the copying process that lead to upgrade failures, the radar device sets multiple working directories, among which the working directory with the working radar firmware is the active working directory, and the other working directories are inactive working directories. At this time, the radar is running, and the old version of the radar firmware exists in the active working directory. Therefore, copying the new radar firmware to the inactive working directory first will not have any impact on the running radar, further improving the reliability of the radar firmware upgrade process. After the copying work is completed, the boot flag used to boot the system when the radar is started is switched to the inactive working directory, so that the radar can be started with the new radar firmware to run the radar next time.

[0050] Specifically, in one embodiment, when the latest digital signature is inconsistent with the original digital signature, an attempt message is sent to the host computer to notify the host computer to send the firmware upgrade package for the second time. Specifically, when the digital signature verification of the new radar firmware fails, it means that the new radar firmware has been tampered with or a file is missing, resulting in an incomplete firmware file and cannot be used for upgrading. Therefore, when the digital signature verification failure is detected for the first time, it is likely caused by network instability and other reasons, so the host computer is notified to try to send the firmware upgrade package again to perform the above-mentioned digital signature verification step. If the second digital signature verification passes, the upgrade step can continue.

[0051] Specifically, in one embodiment, when the firmware upgrade package is received for the second time and the latest digital signature is inconsistent with the original digital signature, an upgrade failure message is sent to notify the host computer to perform system vulnerability detection and network detection. Specifically, if the received new radar firmware still cannot pass the digital signature verification after the FTP service is restarted, in addition to the network instability factor, the possibility of hackers tampering with the file due to system vulnerabilities is relatively high. At this time, the radar sends an upgrade failure message to the host computer to notify the host computer to perform system vulnerability detection and network detection, and export the data interaction records during the network communication process, and provide them to the staff for fault analysis and maintenance.

[0052] Specifically, in a preferred solution, in order to ensure the reliability of the copy process and improve the copy efficiency when an accident occurs during the copy process causing the copy to be interrupted, step S102 further includes the following steps:

[0053] Step S203: When the copy process starts, the copy status value is set to a first preset value to determine whether the copy process is interrupted;

[0054] Step S204: When the copy process is finished, the copy status value is set to a second preset value to determine that the copy process is not interrupted, and the boot flag is switched to the inactive working directory.

[0055] Specifically, by setting different copy status values, the copy status values ​​are forced to be set to preset values ​​at the beginning and end of the copy process, for example, the copy status value is set to the first preset value 1 at the beginning of the copy, and the copy status value is set to the second preset value 0 at the end of the copy. Therefore, when the radar is restarted, it can be first determined by the value whether an interruption occurs during the copy process of the new radar firmware to the working directory.

[0056] Specifically, in one embodiment, the copy status value is set through the above steps S203 to S204. When an unexpected situation occurs during the copy process, such as a sudden power failure of the radar, resulting in the interruption of the copy process, when the radar is restarted, if the copy status value is the first preset value, the following steps are performed:

[0057] Step S205: Clear the inactive working directory, and start copying the new radar firmware from the temporary folder to the inactive working directory. Specifically, when the radar is restarted, it is detected that the copy state value is the first preset value, indicating that the radar has been interrupted in the upgrade file copying process before shutting down. Therefore, the corresponding inactive working directory is directly cleared at this time to ensure that there are no residual junk files in the inactive directory, and the new radar firmware is copied from the temporary folder again, so that the copying work continues as soon as the radar is restarted, and there is no need to re-notify the host computer to start from the first step of sending the radar firmware, avoiding repeated steps in the upgrade process and improving the upgrade speed.

[0058] Step S206: When the copy process is finished, the copy state value is set to the second preset value, and the guide mark is switched to the inactive working directory to restart the radar. Specifically, after the copy work is finished, to avoid the repeated operation of copying the files in the temporary folder when the radar is restarted next time, the copy state value is set to the second preset value, and the radar does not perform any copy work when detecting this value.

[0059] Among them, step S103: restart the radar and verify the integrity of the new radar firmware in the inactive working directory. If the new radar firmware is incomplete, switch the guide flag to the active working directory where the old version of the radar firmware is located.

[0060] Specifically, after the new radar firmware is copied to the inactive working directory, due to the particularity of the radar device, the radar is not allowed to fail to start due to its software reasons under any circumstances, thus causing the radar to crash. Therefore, when the radar is restarted, the integrity of the new radar firmware must be verified to avoid causing the radar to crash when it starts. If the new radar firmware is found to be incomplete, in order to ensure the normal startup and operation of the radar, the radar automatically switches the guide flag from the inactive working directory to the active working directory where the old version of the radar firmware is located, so that the old version of the radar firmware can be used to complete the startup.

[0061] Specifically, in one embodiment, when the radar is restarted, if the copy state value is the second preset value, that is, the copy of the new radar firmware is normally completed, after verifying the integrity of the new radar firmware in the inactive working directory in the above step S103, the following steps are also included:

[0062] Step S104: If the new radar firmware is complete, the inactive working directory is upgraded to the current active working directory, the active working directory is downgraded to the current inactive working directory, and the new radar firmware is continuously booted through the boot flag to enable the radar to run.

[0063] Step S105: If the new radar firmware is incomplete, switch the boot flag to the active working directory, and boot the old version of the radar firmware in the active working directory to run the radar.

[0064] Specifically, when the radar firmware is complete, the current new radar firmware can be used for radar operation, that is, the inactive working directory is upgraded to the current active working directory, and then the system is continued to be guided to start in the current active working directory through the boot flag, and the radar is booted using the new radar firmware. The original active working directory where the old version of the radar firmware is located is downgraded to the current inactive working directory. If the radar firmware is incomplete, the radar startup process automatically switches the boot flag to the original active working directory to guide the system to start in the active working directory, and uses the old version of the radar firmware to boot the radar, ensuring that the radar can fall back to a usable state under any circumstances, thereby improving the robustness of the radar upgrade method.

[0065] Specifically, in one embodiment, the present invention provides a radar firmware remote upgrade method, wherein the radar firmware is encrypted using an asymmetric encryption algorithm, and before step S203, the following steps are also included:

[0066] Step S106: Use the private key to decrypt the new radar firmware. Specifically, the asymmetric encryption method is more secure than the symmetric encryption algorithm, and the private key used for decryption does not need to be disclosed to the public. In the embodiment of the present invention, the RSA asymmetric encryption algorithm is used to encrypt the new radar firmware using the public key to generate the encrypted firmware, which is very difficult to crack, ensuring that the firmware will not be leaked.

[0067] By executing the above steps, a radar firmware remote upgrade method and upgrade system provided by an embodiment of the present invention. The method specifically includes: after receiving the radar firmware file required for the upgrade, verifying the digital signature of the new radar firmware, thereby determining whether the new radar firmware has been tampered with during the transmission process, or the new radar firmware file is missing due to network instability. When the digital signature verification fails, the incomplete new radar firmware file is deleted, and the reason for the upgrade failure is reported to the host computer, ensuring that the radar operation is not interrupted, and avoiding the risk of radar downtime caused by using damaged radar firmware files for upgrading. Further, in the case where the new radar firmware is complete, in order to avoid the interruption of the upgrade process due to power failure and other accidents during the copying process of the new radar firmware, thereby causing the radar to downtime, the embodiment of the present invention adds multiple working directories to copy the new radar firmware to the new working directory, and then the radar is restarted by guiding the new working directory to realize the operation of the radar; when the radar restarts but finds that the copy of the new radar firmware is wrong, it can also switch back to the original working directory in time so that the radar continues to work with the old version of the firmware, thereby improving the robustness of the radar firmware upgrade process.

[0068] like Figure 2 As shown, this embodiment also provides a radar firmware remote upgrade system, the system comprising:

[0069] The firmware receiving module 101 is used to receive the firmware upgrade package sent by the host computer and put the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes the new radar firmware and the original digital signature. For details, please refer to the relevant description of step S101 in the above method embodiment, which will not be repeated here.

[0070] The digital signature verification module 102 is used to obtain the latest digital signature of the new radar firmware, and when the latest digital signature is consistent with the original digital signature, copy the new radar firmware from the temporary folder to the inactive working directory, and switch the boot flag to the inactive working directory. For details, please refer to the relevant description of step S102 in the above method embodiment, which will not be repeated here.

[0071] The protection module 103 is started, the radar is restarted and the integrity of the new radar firmware in the inactive working directory is verified. If the new radar firmware is incomplete, the guide flag is switched to the active working directory where the old version of the radar firmware is located. For details, see the relevant description of step S103 in the above method embodiment, which will not be repeated here.

[0072] A radar firmware remote upgrade system provided in an embodiment of the present invention is used to execute a radar firmware remote upgrade method provided in the above embodiment. Its implementation method and principle are the same. For details, please refer to the relevant description of the above method embodiment, which will not be repeated here.

[0073] Figure 3 An electronic device according to an embodiment of the present invention is shown, the device comprises: a processor 901 and a memory 902, which can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0074] The processor 901 may be a central processing unit (CPU). The processor 901 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0075] The memory 902 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above method embodiments. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 902, that is, implementing the methods in the above method embodiments.

[0076] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the processor 901, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the processor 901 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0077] One or more modules are stored in the memory 902 , and when executed by the processor 901 , the method in the above method embodiment is executed.

[0078] The specific details of the above electronic device can be understood by referring to the corresponding descriptions and effects in the above method embodiments, and will not be repeated here.

[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the implemented program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0080] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A radar firmware remote upgrade method, It is characterized in that The method comprises: Receive a firmware upgrade package sent by the host computer, and put the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes new radar firmware and an original digital signature; Obtaining the latest digital signature of the new radar firmware, and if the latest digital signature is consistent with the original digital signature, copying the new radar firmware from the temporary folder to the inactive working directory, and switching the boot flag to the inactive working directory; Restarting the radar and verifying the integrity of the new radar firmware in the inactive working directory, and if the new radar firmware is incomplete, switching the guide flag to the active working directory where the old radar firmware is located; The receiving of the firmware upgrade package sent by the host computer and placing the firmware upgrade package into a temporary folder includes: Receiving the firmware upgrade package sent by the host computer through the designated storage path; Receive an upgrade message sent by the host computer, wherein the upgrade message includes the name of the firmware upgrade package and the designated storage path; Disconnect the FTP connection with the host computer; At a preset idle time, the firmware upgrade package in the designated storage path is searched according to the name of the firmware upgrade package, and the firmware upgrade package is placed in the temporary folder.

2. The method according to claim 1, It is characterized in that After obtaining the latest digital signature of the new radar firmware, the method further includes: In the case where the latest digital signature is inconsistent with the original digital signature, sending an attempt message to the host computer to notify the host computer to send the firmware upgrade package for the second time; When the firmware upgrade package is received for the second time and the latest digital signature is inconsistent with the original digital signature, an upgrade failure message is sent to notify the host computer to perform system vulnerability detection and network detection.

3. The method according to claim 1, It is characterized in that The step of copying the new radar firmware from the temporary folder to the inactive working directory and switching the boot flag to the inactive working directory comprises: When the copy process starts, the copy status value is set to a first preset value to determine that the copy process is interrupted; When the copy process ends, the copy status value is set to a second preset value to determine that the copy process is not interrupted, and the boot flag is switched to the inactive working directory.

4. The method according to claim 3, It is characterized in that When the radar is restarted, if the copy state value is the first preset value, it includes: Clear the inactive working directory and restart copying the new radar firmware from the temporary folder to the inactive working directory; At the end of the copying process, the copying state value is set to a second preset value, and the guide flag is switched to the inactive working directory to restart the radar.

5. The method according to claim 3, It is characterized in that When the radar is restarted, in the case where the copy status value is the second preset value, after restarting the radar and verifying the integrity of the new radar firmware in the inactive working directory, the method further includes: If the new radar firmware is complete, upgrading the inactive working directory to the current active working directory, downgrading the active working directory to the current inactive working directory, and continuing to boot the new radar firmware through the boot flag to run the radar; If the new radar firmware is incomplete, the boot flag is switched to the active working directory, and the old version of the radar firmware in the active working directory is booted to run the radar.

6. The method according to claim 1, It is characterized in that The radar firmware is encrypted using an asymmetric encryption algorithm. Before copying the radar firmware to the working directory, the method further includes: The new radar firmware is decrypted using the private key.

7. A radar firmware remote upgrade system, It is characterized in that The system comprises: The firmware receiving module is used to receive the firmware upgrade package sent by the host computer, and put the firmware upgrade package into a temporary folder, wherein the firmware upgrade package includes the new radar firmware and the original digital signature; the receiving of the firmware upgrade package sent by the host computer and putting the firmware upgrade package into the temporary folder includes: receiving the firmware upgrade package sent by the host computer through a designated storage path; receiving the upgrade message sent by the host computer, wherein the upgrade message includes the name of the firmware upgrade package and the designated storage path; disconnecting the FTP connection with the host computer; searching for the firmware upgrade package in the designated storage path according to the name of the firmware upgrade package at a preset idle time, and putting the firmware upgrade package into the temporary folder; A digital signature verification module, used to obtain the latest digital signature of the new radar firmware, and when the latest digital signature is consistent with the original digital signature, copy the new radar firmware from the temporary folder to the inactive working directory, and switch the boot flag to the inactive working directory; The protection module is started, the radar is restarted and the integrity of the new radar firmware in the inactive working directory is verified. If the new radar firmware is incomplete, the guide flag is switched to the active working directory where the old version of the radar firmware is located.

8. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 6.