Firmware upgrading method and system and storage medium
By verifying the authority, timeliness, frequency and version of the ECU firmware upgrade package, the problem of firmware upgrade package errors and confidentiality in remote burning technology is solved, the security and controllability of firmware upgrades are improved, and unpredictable risks and Secrets leaked.
Patent Information
- Application Number
- CN202410676608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-10
AI Technical Summary
In remote burning technology, data errors may occur in the ECU firmware upgrade package, causing the wrong software package to be flashed, increasing unpredictable risks, and there is a risk of confidentiality leakage and asset loss, and flashing personnel may use old versions of software packages for malicious purposes. operate.
By decrypting the generated encrypted data package and then performing permission verification, timeliness verification, frequency verification, file integrity verification and version verification, we ensure the validity and security of the firmware upgrade package and prevent incorrect or old version firmware package upgrades.
It improves the security and confidentiality of the firmware upgrade process, prevents the use of wrong firmware packages for upgrades, ensures firmware version control, and enhances the controllability and integrity of firmware upgrades.
Smart Images

Figure CN118626115A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of automotive electronic technology, and specifically relates to a firmware upgrade method, system and storage medium. Background Art
[0002] With the development of connected cars, remote burning technology has gradually become mainstream. This method allows automakers or third parties to remotely update ECU firmware through the vehicle's wireless connection (such as Wi-Fi, Bluetooth, 4G / 5G, etc.). This greatly improves convenience and allows users to update firmware without having to go to a repair shop. With the development of remote burning technology, security issues have become particularly important. Automotive ECU firmware involves key functions of the vehicle, such as engine control, braking system, etc., so the security of firmware updates is crucial. Security vulnerabilities may allow malicious attackers to invade vehicle systems, resulting in serious consequences.
[0003] ECU firmware is upgraded through diagnosis, and the upgrade package may be sent to external maintenance personnel and after-sales engineers for flashing. After the flashing personnel get the ECU upgrade package, they download the upgrade package to the TF card and insert it into the upgrade tool to flash the ECU. Due to network problems, the ECU upgrade package obtained by the flashing personnel may have data errors, which may cause the wrong software package to be flashed, and this wrong software package may allow the ECU to start normally but some functions may be damaged. After installation in the vehicle, it may cause unpredictable risks; in addition, competitors may obtain the firmware upgrade package, resulting in confidentiality leakage and asset loss; and the flashing personnel may use the previous software package to maliciously flash the new ECU back to the previous software package with known vulnerabilities. Summary of the invention
[0004] In order to solve the above technical problems, this application proposes a firmware upgrade method, system and storage medium, which performs permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package obtained after decrypting the generated encrypted data packet, and upgrades the target to be upgraded according to the verified firmware upgrade package. The security and confidentiality of the firmware upgrade process are improved, and the control of the firmware version is realized.
[0005] Specifically, the present application proposes a firmware upgrade method, comprising: S1: Obtain an upgrade data packet, and generate an encrypted data packet according to the upgrade data packet; S2: Start the upgrade process, obtain the private key information corresponding to the encrypted data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; S3: Verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, upgrade the target to be upgraded according to the firmware upgrade package; otherwise, end the upgrade process, display the upgrade error code and record the error information; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
[0006] This application improves the security of firmware upgrades by verifying the permissions of the firmware upgrade package, preventing flashing personnel from using erroneous firmware upgrade packages for upgrades, and improving the confidentiality of the firmware upgrade package through time verification and number verification; and realizes the control of firmware versions through version verification.
[0007] Furthermore, in step S1, the upgrade data package is obtained, specifically: Loading a firmware upgrade package, and performing permission configuration on the firmware upgrade package to obtain configuration information; Obtaining a negotiation key and a public information package, decrypting the public information package according to the negotiation key, and obtaining a unique ID number and public key information; The unique ID number, the firmware upgrade package and the configuration information are packaged to obtain the upgrade data package.
[0008] The configuration information includes: the number of times the firmware upgrade package is valid, the validity period of the firmware upgrade package, a version control command, and a first hash value.
[0009] The generating an encrypted data packet according to the upgrade data packet includes: encrypting the upgrade data packet according to the public key information to obtain the encrypted data packet.
[0010] The public information package can be generated in the TF card through the host computer serial port or configuration tool; after obtaining the public information package, the public information package is uploaded to the operation and maintenance server or sent to the firmware administrator by email. After the firmware administrator obtains the public information package, it is uploaded to the operation and maintenance server. The operation and maintenance server decrypts the public information package through the negotiated key and obtains the unique ID number and public key information of the tool.
[0011] The negotiated key may be written by the ECU burning tool when it leaves the factory, and is used to decrypt the public information package and is recorded on the firmware management server.
[0012] The unique ID number may be 32 bytes.
[0013] Furthermore, before starting the upgrade process in step S2, the method may also include: putting the encrypted data package into a TF card, inserting the tool board and connecting the target ECU, and selecting the corresponding encrypted data package file to start the upgrade process.
[0014] Furthermore, the private key information corresponding to the upgrade data package is obtained in step S2, specifically: Acquire the corresponding private key information according to the upgrade project information; The upgrade project information includes: the version number, system time and private key information of the firmware upgrade package; The upgrade project information is recorded in the burning tool before starting the upgrade process, and when the burning tool detects an encrypted data packet from a third party, the upgrade project information is automatically matched.
[0015] Furthermore, the authorization verification is specifically as follows: Verify whether the unique ID number matches the target ID number to be upgraded. If so, perform time verification. Otherwise, end the upgrade process, display the upgrade error code, and record the error information.
[0016] Furthermore, the time validity verification and the number of verification are specifically as follows: Verify whether the firmware upgrade package is within the preset time limit according to the configuration information. If so, verify whether the upgrade times are within the preset times. If so, perform file integrity verification. Otherwise, terminate the upgrade process, display the upgrade error code, and record the error information.
[0017] Furthermore, the file integrity verification is specifically performed as follows: Calculate a second hash value of the target to be upgraded according to the secure hash algorithm in the configuration information; Determine whether the second hash value is the same as the first hash value. If so, it means that the integrity verification of the firmware upgrade package passes, and the version verification is performed; otherwise, the integrity verification of the firmware upgrade package fails, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
[0018] Furthermore, the version verification is specifically as follows: Determine whether the version control command in the configuration information is a version rollback command that is not supported. If so, compare the version number of the firmware upgrade package with the target version number to be upgraded to determine whether the firmware upgrade package is the latest version. If so, the version verification passes and the upgrade begins. Otherwise, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
[0019] Further, after completing the upgrade of the target to be upgraded according to the firmware upgrade package, it also includes: Obtain the unique identification code of the target to be upgraded, as well as the number of successful upgrades, number of failed upgrades or reasons for failures, generate an upgrade log, and update the database. The upgrade log is used to record and save each upgrade result and upgrade exception log information; Based on the same inventive concept, the present application also proposes a firmware upgrade system, the system comprising: Data packet generation module: used to obtain an upgrade data packet and generate an encrypted data packet according to the upgrade data packet; Data packet decryption module: used to start the upgrade process, obtain the private key information corresponding to the upgrade data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; Validity verification module: used to verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, the target to be upgraded is upgraded according to the firmware upgrade package; otherwise, the upgrade process is terminated, and the upgrade error code is displayed and the error information is recorded; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
[0020] Furthermore, the data packet generation module includes: a negotiation key, a public information package, a firmware upgrade package, configuration information, and public key information. The configuration information is obtained by configuring permissions on the obtained firmware upgrade package; the public information package is decrypted according to the obtained negotiation key to obtain a unique ID number and public key information; the unique ID number, the firmware upgrade package, and the configuration information are packaged to obtain the upgrade data packet; the upgrade data packet is encrypted according to the public key information to obtain the encrypted data packet.
[0021] Based on the same inventive concept, the present application also proposes a computer-readable storage medium, wherein the executable instructions of the computer-readable storage medium implement the firmware upgrade method when being executed by a control processor.
[0022] In summary, after starting the upgrade process, the generated encrypted data packet is decrypted according to the corresponding private key information obtained, and the firmware upgrade package is verified by the unique ID number and configuration information obtained by decryption. After the verification passes, the upgrade target is upgraded according to the firmware upgrade package.
[0023] Compared with the prior art, this application has at least the following beneficial effects: The present application implements the management and control of the timeliness, number of times and firmware version of the firmware upgrade package by performing permission verification, timeliness verification, number verification, file integrity verification and version verification on the firmware upgrade package, thereby preventing the use of erroneous firmware upgrade packages for upgrading and preventing the use of old versions of firmware upgrade packages to downgrade the target to be upgraded to an old and vulnerable version, thereby ensuring the integrity of the firmware upgrade package and improving the security, confidentiality and controllability of the firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of the firmware upgrade method shown in an embodiment of the present application.
[0025] Figure 2 This is a firmware upgrade system architecture diagram shown in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] Embodiment 1:
[0028] Reference Figure 1 , is a flowchart of the firmware upgrade method shown in an embodiment of the present application.
[0029] This application proposes a firmware upgrade method, including: S1: Obtain an upgrade data packet, and generate an encrypted data packet according to the upgrade data packet; Loading a firmware upgrade package, and performing permission configuration on the firmware upgrade package to obtain configuration information; Obtaining a negotiation key and a public information package, decrypting the public information package according to the negotiation key, and obtaining a unique ID number and public key information; The unique ID number, the firmware upgrade package and the configuration information are packaged to obtain the upgrade data package.
[0030] The configuration information includes: the number of times the firmware upgrade package is valid, the validity period of the firmware upgrade package, a version control command, and a first hash value.
[0031] The generating an encrypted data packet according to the upgrade data packet includes: encrypting the upgrade data packet according to the public key information to obtain the encrypted data packet.
[0032] Preferably, the public information package can be generated in the TF card through the host computer serial port or configuration tool; after obtaining the public information package, the public information package is uploaded to the operation and maintenance server or sent to the firmware administrator by email. After obtaining the public information package, the firmware administrator uploads it to the operation and maintenance server. The operation and maintenance server decrypts the public information package through the negotiated key and obtains the unique ID number and public key information of the tool.
[0033] Preferably, the negotiated key may be written by the ECU burning tool when leaving the factory, and is used to decrypt the public information package and is recorded on the firmware management server.
[0034] The unique ID number may be 32 bytes.
[0035] Furthermore, before starting the upgrade process in step S2, the method may also include: putting the encrypted data package into a TF card, inserting the tool board and connecting the target ECU, and selecting the corresponding encrypted data package file to start the upgrade process.
[0036] S2: Start the upgrade process, obtain the private key information corresponding to the encrypted data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; Acquire the corresponding private key information according to the upgrade project information; The upgrade project information includes: the version number, system time and private key information of the firmware upgrade package; The upgrade project information is recorded in the burning tool before starting the upgrade process, and when the burning tool detects an encrypted data packet from a third party, the upgrade project information is automatically matched.
[0037] S3: Verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, upgrade the target to be upgraded according to the firmware upgrade package; otherwise, end the upgrade process, display the upgrade error code and record the error information; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
[0038] Furthermore, the authorization verification is specifically as follows: Verify whether the unique ID number matches the target ID number to be upgraded. If so, perform time verification. Otherwise, end the upgrade process, display the upgrade error code, and record the error information.
[0039] Preferably, by comparing the target ID number to be upgraded with the unique ID number, it is determined whether the unique ID number matches the target ID number to be upgraded. If, during the upgrade of the target to be upgraded according to the firmware upgrade package, the unique ID number does not match the target ID number to be upgraded, the firmware upgrade package authority verification fails, the upgrade process is terminated, and the upgrade error code is displayed and the error information is recorded.
[0040] Furthermore, the time validity verification and the number of verification are specifically as follows: Verify whether the firmware upgrade package is within the preset time limit according to the configuration information. If so, verify whether the upgrade times are within the preset times. If so, perform file integrity verification. Otherwise, terminate the upgrade process, display the upgrade error code, and record the error information.
[0041] Preferably, if the preset validity range of the firmware upgrade package is 1 hour, the firmware upgrade package is time-validated according to the preset validity range. If the current tool system time minus the time recorded in the database is less than the preset validity range, it means that the time-validation verification is passed, and verification begins to verify whether the number of upgrades is within the preset number range. If the preset number range is 1 time, and the number of times the firmware upgrade package has been used has not been recorded in the database before, the number verification of the firmware upgrade package passes, and file integrity verification begins.
[0042] Preferably, if during the validity verification process, the firmware upgrade package has exceeded the preset validity range, the tool ends the current flashing, determines that the encrypted data package is invalid, searches the database and deletes the corresponding private key information and the number of upgrades. If during the number verification process, by comparing the preset number range of the firmware upgrade package carried in the encrypted data package with the number of upgrades in the database, if the database shows that the number of successful flashing is greater than or equal to the preset number range, the tool ends the current upgrade, determines that the encrypted data package is invalid, searches the database and deletes the corresponding private key and the number of flashing.
[0043] Furthermore, the file integrity verification is specifically performed as follows: Calculate a second hash value of the target to be upgraded according to the secure hash algorithm in the configuration information; Determine whether the second hash value is the same as the first hash value. If so, it means that the integrity verification of the firmware upgrade package passes, and the version verification is performed; otherwise, the integrity verification of the firmware upgrade package fails, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
[0044] During the integrity verification process of the firmware upgrade process, a hash function is used to perform a hash operation on the firmware upgrade package to generate a hash value, which is compared with the expected hash value to verify the integrity of the firmware upgrade package. If the two hash values are the same, it can be determined that the firmware upgrade package has not been tampered with, and subsequent steps such as version verification can be continued. If the hash values are different, it may mean that the firmware upgrade package has been tampered with or damaged, and the upgrade process should be terminated immediately and an error message should be displayed.
[0045] Preferably, the hash value of the target to be upgraded is calculated by the hash algorithm SHA256 algorithm to obtain a second hash value; the second hash value is compared with the first hash value in the configuration information, and if they are the same, the verification passes. If they are different, it means that the firmware package file data is incomplete or has been tampered with.
[0046] Preferably, when the firmware upgrade package is generated, the second hash value of the target to be upgraded is calculated by the hash algorithm SHA256 algorithm and then added to the header or tail format field of the target to be upgraded. When verifying the file, the integrity of the file data can be verified by comparing the second hash value generated by the firmware package data segment with the first hash value carried by the header or tail.
[0047] Furthermore, the version verification is specifically as follows: Determine whether the version control command in the configuration information is a version rollback command that is not supported. If so, compare the version number of the firmware upgrade package with the target version number to be upgraded to determine whether the firmware upgrade package is the latest version. If so, the version verification passes and the upgrade begins. Otherwise, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
[0048] Preferably, if the version control command carried by the configuration information does not support the version rollback command, the version verification passes; by comparing the version information carried in the firmware upgrade package with the current version information of the ECU to be upgraded, if the firmware version carried in the firmware upgrade package is greater than the current firmware version of the ECU to be upgraded and the format is consistent, the version verification passes.
[0049] Further, after completing the upgrade of the target to be upgraded according to the firmware upgrade package, it also includes: The unique identification code of the target to be upgraded and the number of upgrade successes, the number of failures or the reasons for failures are obtained, and an upgrade log is generated and a database is updated.
[0050] Preferably, after the upgrade target is upgraded according to the firmware upgrade package, the target to be upgraded outputs the upgrade result and a unique identification code, and an upgrade log is generated according to the upgrade result and the unique identification code; the upgrade log records and saves each flashing result and flashing abnormality log information; after the upgrade log is generated, the information recorded in the database is updated; wherein the database records the project name, private key, flashing number, flashing time, flashing result, ECU unique serial number (or VIN code), the unique identification code can be SN, VIN, and the upgrade log can be generated in the TF card file.
[0051] Embodiment 2:
[0052] Reference Figure 2 This is a firmware upgrade system architecture diagram shown in an embodiment of the present application.
[0053] The present application also proposes a firmware upgrade system, the system comprising: Data packet generation module: used to obtain an upgrade data packet and generate an encrypted data packet according to the upgrade data packet; Data packet decryption module: used to start the upgrade process, obtain the private key information corresponding to the upgrade data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; Validity verification module: used to verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, the target to be upgraded is upgraded according to the firmware upgrade package; otherwise, the upgrade process is terminated, and the upgrade error code is displayed and the error information is recorded; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
[0054] The data packet generation module includes a negotiation key, a public information package, a firmware upgrade package, configuration information, and public key information. The configuration information is obtained by configuring permissions on the obtained firmware upgrade package; the public information package is decrypted according to the obtained negotiation key to obtain a unique ID number and public key information; the unique ID number, the firmware upgrade package, and the configuration information are packaged to obtain the upgrade data packet; the upgrade data packet is encrypted according to the public key information to obtain the encrypted data packet.
[0055] Preferably, the data packet decryption module may further include a key manager; the key manager is used to generate an asymmetric key using a random number, the asymmetric key includes private key information and public key information, wherein the public key information is packaged into a public information package, and the private key information is encrypted and stored in the MCU internal Flash, preferably using RSA3072. The public key information is used to generate an encrypted data packet at a remote site; the private key information is used to decrypt the encrypted data packet inside the tool.
[0056] Embodiment three:
[0057] The present application also proposes a computer-readable storage medium, the computer-readable storage medium comprising: The computer-readable storage medium stores computer-executable instructions; The computer executable instructions implement the firmware upgrade method when being executed by the control processor.
[0058] In the computer-readable storage medium, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0059] In summary, after starting the upgrade process, the generated encrypted data packet is decrypted according to the corresponding private key information obtained, and the firmware upgrade package is verified by the unique ID number and configuration information obtained by decryption. After the verification is passed, the target to be upgraded is upgraded according to the firmware upgrade package. By performing authority verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package, the time validity, number of times and firmware version of the firmware upgrade package are controlled, and the use of erroneous firmware upgrade packages for upgrading is prevented, and the use of old versions of firmware upgrade packages to downgrade the target to be upgraded to an old version with vulnerabilities is prevented, thereby ensuring the integrity of the firmware upgrade package and improving the security, confidentiality and controllability of firmware upgrades.
[0060] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0061] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for an electronic device to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0062] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A firmware upgrade method, characterized in that: include: S1: Obtain an upgrade data packet, and generate an encrypted data packet according to the upgrade data packet; S2: Start the upgrade process, obtain the private key information corresponding to the encrypted data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; S3: Verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, upgrade the target to be upgraded according to the firmware upgrade package; otherwise, end the upgrade process, display the upgrade error code and record the error information; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
2. A firmware upgrade method according to claim 1, characterized in that: The step of obtaining the upgrade data package includes: Loading a firmware upgrade package, and performing permission configuration on the firmware upgrade package to obtain configuration information; Obtaining a negotiation key and a public information package, decrypting the public information package according to the negotiation key, and obtaining a unique ID number and public key information; Packing the unique ID number, the firmware upgrade package and the configuration information to obtain the upgrade data package; The configuration information includes: the number of times the firmware upgrade package is valid, the validity period of the firmware upgrade package, and a version control command.
3. A firmware upgrade method according to claim 2, characterized in that: The step of generating an encrypted data packet according to the upgrade data packet comprises: The upgrade data packet is encrypted according to the public key information to obtain the encrypted data packet.
4. A firmware upgrade method according to claim 3, characterized in that: The step of obtaining the private key information corresponding to the upgrade data package is as follows: Acquire the corresponding private key information according to the upgrade project information; The upgrade project information includes: the version number, system time, first hash value and private key information of the firmware upgrade package; The upgrade project information is recorded in the burning tool before starting the upgrade process, and when the burning tool detects an encrypted data packet from a third party, the upgrade project information is automatically matched.
5. A firmware upgrade method according to claim 4, characterized in that: The authorization verification is specifically as follows: Verify whether the unique ID number matches the target ID number to be upgraded. If so, perform time verification. Otherwise, end the upgrade process, display the upgrade error code, and record the error information.
6. A firmware upgrade method according to claim 5, characterized in that: The time validity verification and the number of verification are specifically as follows: Verify whether the firmware upgrade package is within the preset time limit according to the configuration information. If so, verify whether the upgrade times are within the preset times. If so, perform file integrity verification. Otherwise, terminate the upgrade process, display the upgrade error code, and record the error information.
7. A firmware upgrade method according to claim 6, characterized in that: The file integrity verification is specifically as follows: Calculate a second hash value of the firmware upgrade package according to a secure hash algorithm; Determine whether the first hash value is the same as the second hash value. If so, it means that the integrity verification of the firmware upgrade package passes, and the version verification is performed; otherwise, the integrity verification of the firmware upgrade package fails, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
8. A firmware upgrade method according to claim 7, characterized in that: The version verification is specifically as follows: Determine whether the version control command in the configuration information is a version rollback command that is not supported. If so, compare the version number of the firmware upgrade package with the target version number to be upgraded to determine whether the firmware upgrade package is the latest version. If so, the version verification passes and the upgrade begins. Otherwise, the upgrade process ends, and the upgrade error code is displayed and the error information is recorded.
9. A system according to any one of claims 1 to 8, characterized in that: The system comprises: Data packet generation module: used to obtain an upgrade data packet and generate an encrypted data packet according to the upgrade data packet; Data packet decryption module: used to start the upgrade process, obtain the private key information corresponding to the upgrade data packet, decrypt the encrypted data packet according to the private key information, and obtain the unique ID number, firmware upgrade package and configuration information; Validity verification module: used to verify the validity of the firmware upgrade package according to the ID number and configuration information of the target to be upgraded. If the verification is successful, the target to be upgraded is upgraded according to the firmware upgrade package; otherwise, the upgrade process is terminated, and the upgrade error code is displayed and the error information is recorded; The validity verification includes sequentially performing permission verification, time validity verification, number verification, file integrity verification and version verification on the firmware upgrade package.
10. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by the control processor, the firmware upgrade method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Remote upgrading method and device for power equipment, electronic equipment and storage medium
CN119621109A
Soundbar firmware USB flash disk upgrading method
CN122711189A
Soundbar firmware U disk upgrading method
CN122711189B
