A device firmware management system, method, device and medium
Through the co-processing unit monitoring and managing the equipment firmware, the problem of firmware errors or malicious attacks in remote equipment upgrades is solved, and the normal operation and operation and maintenance costs of the system are reduced.
Patent Information
- Application Number
- CN202210514045.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-05-12
AI Technical Summary
In the prior art, it is easy to issue false firmware during the remote firmware upgrade process of the device or suffer from malicious firmware attacks, causing the device to fail to work normally and increasing maintenance costs.
The co-processing unit is used to monitor the operating status of the processing unit, detect abnormal status and restart the processing unit to ensure that the communication status is normal, and the firmware download is completed through the interface to realize the firmware backup operation and version management.
Effectively monitor the operation status of the application, ensure the normal operation of the system, and reduce operation and maintenance costs.
Smart Images

Figure CN114968662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic related technologies, and in particular to a management system, method, device and medium for device firmware. Background Art
[0002] In the field of IoT technology, imperfect device systems often require firmware upgrades to fix vulnerabilities and optimize system functionality. Remote upgrade technology has gained widespread adoption because it eliminates the need for on-site manual operation and only requires firmware to be distributed from a server.
[0003] Currently, remote firmware upgrades for devices primarily ensure the accuracy of the firmware received by the device by encrypting the firmware data packets. However, if the user mistakenly sends the wrong firmware to the device during a remote firmware upgrade, or if there are problems with the firmware itself, the device will not function properly after the upgrade. Furthermore, if the firmware data encryption technology is cracked, the device is susceptible to receiving malicious firmware data packets. This leads to a lack of effective firmware management, increasing maintenance costs. Summary of the Invention
[0004] The present invention aims to at least address the technical problems existing in the prior art. To this end, the present invention provides a device firmware management system, method, electronic device, and storage medium. By regularly monitoring the operating status of a processing unit through a co-processing unit, the system's operating status is effectively monitored, ensuring normal system operation and reducing system operation and maintenance costs.
[0005] A first aspect of the present invention provides a device firmware management system, comprising the following steps:
[0006] A processing unit, which is at least one of a processor and a single-chip microcomputer, and includes a boot program and an application program;
[0007] a communication unit, communicatively connected to the processing unit and the server, and configured to receive firmware issued by the server, the firmware including a boot program or an application program;
[0008] a storage unit, communicatively connected to the processing unit and the communication unit, and configured to store the firmware;
[0009] The co-processing unit is connected to the processing unit, the communication unit and the storage unit through interfaces respectively. The co-processing unit is used to detect the application execution status of the processing unit. If the application execution status of the processing unit is abnormal, the co-processing unit is controlled to restart the processing unit. The co-processing unit is also used to detect the communication status between the processing unit and the communication unit. If the communication status is abnormal, the communication unit is controlled to obtain the latest firmware from the server. The co-processing unit is also used to control the processing unit to burn the latest boot program when the latest firmware obtained is the latest boot program, so as to control the processing unit to restart and enter the latest boot program.
[0010] According to the embodiments of the present invention, there are at least the following technical effects:
[0011] This system is equipped with a co-processing unit, which can detect the execution status of the application of the processing unit and restart the processing unit if the application is in an abnormal state to ensure the normal execution of the processing unit; and the co-processing unit can also complete the firmware download function by connecting to the communication unit through the interface when the processing unit cannot control the communication unit, thereby realizing the system's backup operation of the firmware, effectively monitoring the running status of the application, ensuring the normal operation of the system, and reducing the system's operation and maintenance costs.
[0012] According to some embodiments of the present invention, the co-processing unit is a single chip microcomputer, and the single chip microcomputer communicates with the boot program and the application program of the processing unit through a serial port.
[0013] According to some embodiments of the present invention, the communication unit includes wired communication or wireless communication.
[0014] According to some embodiments of the present invention, the storage unit is an off-chip storage, using FLASH or SD card storage.
[0015] According to some embodiments of the present invention, the co-processing unit is also used to mark the firmware corresponding to the application in the storage unit as abnormal firmware when it detects that the execution status of the application of the processing unit is abnormal, so that the boot program of the processing unit skips the search for the abnormal firmware when searching for the optimal firmware in the storage unit.
[0016] According to some embodiments of the present invention, the processing unit is also used to search for the optimal firmware in the storage unit through a boot program. If the optimal firmware is different from the firmware currently applied by the processing unit, the processing unit is controlled to burn the program in the optimal firmware and execute the program in the optimal firmware.
[0017] According to some embodiments of the present invention, the processing unit is further used to check whether the firmware in the storage unit is the same as the firmware to be issued when the server has firmware to be issued. If the storage unit contains firmware that is the same as the firmware to be issued, the server is advised not to download the firmware to be issued; if the storage unit does not contain firmware that is the same as the firmware to be issued, the server is advised to download the firmware to be issued.
[0018] A second aspect of the present invention provides a device firmware management method, which includes the device firmware management system according to the first aspect of the present invention. The device firmware management method includes:
[0019] receiving the firmware sent by the server through the communication unit;
[0020] If the firmware includes the latest boot program, the co-processing unit controls the processing unit to burn the latest boot program, so as to control the processing unit to restart and enter the latest boot program;
[0021] If the firmware is the latest application, the processing unit is automatically reset to burn the latest application into the processing unit.
[0022] This method is provided with a co-processing unit, which can detect the execution status of the application of the processing unit and restart the processing unit if the application is in an abnormal state, thereby ensuring the normal execution of the processing unit; and the co-processing unit can also complete the firmware download function by connecting to the communication unit through an interface when the processing unit cannot control the communication unit, thereby realizing the system's backup operation of the firmware, effectively monitoring the running status of the application, ensuring the normal operation of the system, and reducing the system's operation and maintenance costs.
[0023] According to some embodiments of the present invention, the receiving, through the communication unit, the firmware to be issued by the server includes:
[0024] The processing unit detects, through the communication unit, whether the server has firmware to be issued;
[0025] If the server has the firmware to be issued, then check whether the firmware in the storage unit is the same as the firmware to be issued:
[0026] If the firmware stored in the storage unit is the same as the firmware to be issued, feeding back to the server not to download the firmware to be issued;
[0027] If the storage unit does not contain firmware that is the same as the firmware to be issued, the server is fed back to download the firmware to be issued.
[0028] According to some embodiments of the present invention, the method further includes: if the application execution state of the processing unit is an abnormal state, the co-processing unit controls the processing unit to restart.
[0029] According to a third aspect of the present invention, there is provided an electronic device for managing device firmware, comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the above-mentioned device firmware management method.
[0030] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned device firmware management method.
[0031] It should be noted that the beneficial effects between the second to fourth aspects of the present invention and the prior art are the same as the beneficial effects between the above-mentioned device firmware management system and the prior art, and will not be described in detail here.
[0032] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments with reference to the following drawings, in which:
[0034] Figure 1 This is a flow chart of a device firmware management system according to an embodiment of the present invention;
[0035] Figure 2 The present invention is a flowchart of a method for managing device firmware according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.
[0037] In the description of the present invention, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0038] In the description of the present invention, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0039] In the description of the present invention, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0040] Currently, remote firmware upgrades for devices primarily ensure the accuracy of the firmware received by the device by encrypting the firmware data packets. However, if the user mistakenly sends the wrong firmware to the device during a remote firmware upgrade, or if there are problems with the firmware itself, the device will not function properly after the upgrade. Furthermore, if the firmware data encryption technology is cracked, the device is susceptible to receiving malicious firmware data packets. This leads to a lack of effective firmware management, increasing maintenance costs.
[0041] In order to solve the above technical defects, refer to Figure 1 One embodiment of the present invention provides a device firmware management system, including a processing unit 1100, a communication unit 1200, a storage unit 1300, and a co-processing unit 1400, wherein:
[0042] The processing unit 1100 is at least one of a processor and a single-chip microcomputer, and includes a boot program and an application program.
[0043] The communication unit 1200 is communicatively connected with the processing unit and the server, and is used to receive firmware issued by the server, where the firmware includes a boot program or an application program.
[0044] The storage unit 1300 is communicatively connected to the processing unit and the communication unit, and is used to store firmware.
[0045] The co-processing unit 1400 is connected to the processing unit, the communication unit and the storage unit through interfaces respectively. The co-processing unit is used to detect the application execution status of the processing unit. If the application execution status of the processing unit is abnormal, the processing unit is controlled to restart. The co-processing unit is also used to detect the communication status between the processing unit and the communication unit. If the communication status is abnormal, the communication unit is controlled to obtain the latest firmware from the server. The co-processing unit is also used to control the processing unit to burn the latest boot program when the latest firmware obtained is the latest boot program, so as to control the processing unit to restart and enter the latest boot program.
[0046] Among them, when the communication status is abnormal, the switch automatically switches to the co-processing unit to perform data communication tasks.
[0047] In some embodiments, the co-processing unit is a single chip microcomputer, which communicates with the boot program and application program of the processing unit through a serial port.
[0048] In some embodiments, the communication unit includes wired communication or wireless communication.
[0049] In some embodiments, the storage unit is an off-chip storage, using FLASH or SD card storage.
[0050] In some embodiments, the co-processing unit is also used to mark the firmware corresponding to the application in the storage unit as abnormal firmware when it detects that the execution status of the application of the processing unit is abnormal, so that the boot program of the processing unit skips the search for abnormal firmware when searching for the optimal firmware in the storage unit. When the communication status is abnormal, the optimal firmware is the firmware with the latest version information among the firmware that is not marked as abnormal.
[0051] In some embodiments, the processing unit is also used to search for the optimal firmware in the storage unit through a boot program. If the optimal firmware is different from the firmware currently applied by the processing unit, the processing unit is controlled to burn the program in the optimal firmware and execute the program in the optimal firmware, and determine whether the firmware is the same based on the firmware version information.
[0052] In some embodiments, the processing unit is also used to check whether the firmware in the storage unit is the same as the firmware to be sent when the server has firmware to be sent. If the storage unit has firmware that is the same as the firmware to be sent, the feedback server will not download the firmware to be sent; if the storage unit does not have firmware that is the same as the firmware to be sent, the feedback server will download the firmware to be sent.
[0053] To facilitate understanding by those skilled in the art, a set of preferred embodiments are provided below, providing a device firmware management system, including a processing unit 1100, a communication unit 1200, a storage unit 1300, and a co-processing unit 1400:
[0054] The processing unit 1100 is at least one of a processor and a single-chip microcomputer. The processing unit includes a boot program and an application program, which is used to search for the optimal firmware in the storage unit through the boot program. If the optimal firmware is different from the firmware currently applied by the processing unit, the processing unit is controlled to burn the program in the optimal firmware and execute the program in the optimal firmware, and judge whether the firmware is the same based on the firmware version information; it is also used to detect whether the server has firmware to be sent through the communication unit. If the server has firmware to be sent, it checks whether the firmware in the storage unit is the same as the firmware to be sent. If the storage unit has firmware that is the same as the firmware to be sent, it feedbacks the server not to download the firmware to be sent; if the storage unit does not have firmware that is the same as the firmware to be sent, it feedbacks the server to download the firmware to be sent.
[0055] The communication unit 1200 includes wired communication or wireless communication, is connected to the processing unit and the server, and is used to receive firmware issued by the server, where the firmware includes a boot program or an application program.
[0056] The storage unit 1300 is an off-chip storage, using FLASH or SD card storage, and is communicatively connected with the processing unit and the communication unit for storing firmware.
[0057] The co-processing unit 1400 is a single-chip microcomputer, which communicates with the boot program and application of the processing unit through a serial port, and is connected to the processing unit, communication unit and storage unit through interfaces respectively. The co-processing unit is used to detect the application execution status of the processing unit. If the application execution status of the processing unit is abnormal, the processing unit is controlled to restart. The co-processing unit is also used to detect the communication status between the processing unit and the communication unit. If the communication status is abnormal, the communication unit is controlled to obtain the latest firmware from the server. The co-processing unit is also used to control the processing unit to burn the latest boot program when the latest firmware obtained is the latest boot program, so as to control the processing unit to restart and enter the latest boot program. When the communication status is abnormal, the co-processing unit is automatically switched to the co-processing unit through a switch to perform data communication tasks. When it is detected that the application execution status of the processing unit is abnormal, the firmware corresponding to the application in the storage unit is marked as abnormal firmware, so that the boot program of the processing unit skips the search for abnormal firmware when searching for the optimal firmware in the storage unit. When the communication status is abnormal, the co-processing unit is automatically switched to the co-processing unit through a switch to perform data communication tasks. The optimal firmware is the firmware with the latest version information among the firmware not marked as abnormal.
[0058] 1. Get the optimal firmware:
[0059] The processing unit detects whether the server has firmware to be sent through the communication unit. If the server has firmware to be sent, it checks whether the firmware in the storage unit is the same as the firmware to be sent. If the storage unit has firmware that is the same as the firmware to be sent, the server is fed back not to download the firmware to be sent; if the storage unit does not have firmware that is the same as the firmware to be sent, the server is fed back to download the firmware to be sent.
[0060] The latest firmware includes the bootloader and application:
[0061] If the latest firmware is the latest boot program, the co-processing unit controls the processing unit to burn the latest boot program, so as to control the processing unit to restart and enter the latest boot program;
[0062] If the latest firmware is the latest application, the processing unit will automatically reset and the boot program will burn the latest application.
[0063] The co-processing unit periodically detects the application execution status of the processing unit. When it is detected that the application execution status of the processing unit is abnormal, the firmware corresponding to the application in the storage unit is marked as abnormal firmware, so that the boot program of the processing unit skips the search for abnormal firmware when searching for the optimal firmware in the storage unit. The optimal firmware is the firmware with the latest version information among the firmware that is not marked as abnormal.
[0064] 2. Determine whether the firmware versions are consistent:
[0065] The boot program searches for the optimal firmware in the storage unit. If the optimal firmware is different from the firmware currently used by the processing unit, the processing unit is controlled to burn the program in the optimal firmware and execute the program in the optimal firmware. Whether the firmware is the same is determined based on the firmware version information.
[0066] This system is equipped with a co-processing unit, which can detect the execution status of the application of the processing unit and restart the processing unit if the application is in an abnormal state to ensure the normal execution of the processing unit; and the co-processing unit can also complete the firmware download function by connecting to the communication unit through the interface when the processing unit cannot control the communication unit, thereby realizing the system's backup operation of the firmware, effectively monitoring the running status of the application, ensuring the normal operation of the system, and reducing the system's operation and maintenance costs.
[0067] In addition, refer to Figure 2 The present invention also provides a device firmware management method, comprising:
[0068] S101, receiving firmware sent by a server through a communication unit;
[0069] S102: If the firmware includes the latest boot program, the co-processing unit controls the processing unit to burn the latest boot program, so as to control the processing unit to restart and enter the latest boot program.
[0070] S103: If the firmware is the latest application, the processing unit automatically resets and burns the latest application into the processing unit.
[0071] In some embodiments, receiving firmware to be issued by a server through a communication unit includes:
[0072] The processing unit detects whether the server has firmware to be issued through the communication unit;
[0073] If the server has firmware to be delivered, check whether the firmware in the storage unit is the same as the firmware to be delivered:
[0074] If the storage unit has the same firmware as the firmware to be sent, the feedback server does not download the firmware to be sent;
[0075] If the storage unit does not contain firmware that is the same as the firmware to be delivered, the feedback server downloads the firmware to be delivered.
[0076] In some embodiments, if the application execution state of the processing unit is abnormal, the co-processing unit controls the processing unit to restart.
[0077] This method is provided with a co-processing unit, which can detect the execution status of the application of the processing unit and restart the processing unit if the application is in an abnormal state, thereby ensuring the normal execution of the processing unit; and the co-processing unit can also complete the firmware download function by connecting to the communication unit through an interface when the processing unit cannot control the communication unit, thereby realizing the system's backup operation of the firmware, effectively monitoring the running status of the application, ensuring the normal operation of the system, and reducing the system's operation and maintenance costs.
[0078] It should be noted that this method embodiment and the above-mentioned system embodiment are based on the same inventive concept, so the relevant content of the above-mentioned method embodiment is also applicable to this system embodiment and will not be repeated here.
[0079] The present application also provides an electronic device for managing device firmware, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the device firmware management method described above is implemented.
[0080] The processor and the memory may be connected via a bus or other means.
[0081] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor 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.
[0082] The non-transient software program and instructions required to implement the device firmware management method of the above embodiment are stored in the memory. When executed by the processor, the device firmware management method of the above embodiment is executed, for example, the above-described Figure 2 Method steps S101 to S103 in .
[0083] The present application also provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute: the device firmware management method as described above.
[0084] The computer-readable storage medium stores computer-executable instructions, which are executed by a processor or controller, for example, by a processor in the above-mentioned electronic device embodiment, so that the processor can execute the device firmware management method in the above-mentioned embodiment, for example, execute the above-mentioned Figure 2 Steps S101 to S103 of the method.
[0085] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program elements, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program elements, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0086] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the scope of the present invention.
Claims
1. A device firmware management system, characterized in that: include: A processing unit, which is at least one of a processor and a single-chip microcomputer, and includes a boot program and an application program; a communication unit, communicatively connected to the processing unit and the server, and configured to receive firmware issued by the server, the firmware including a boot program or an application program; a storage unit, communicatively connected to the processing unit and the communication unit, and configured to store the firmware; The co-processing unit is connected to the processing unit, the communication unit and the storage unit through interfaces respectively. The co-processing unit is used to detect the application execution status of the processing unit. If the application execution status of the processing unit is abnormal, the co-processing unit is controlled to restart the processing unit. The co-processing unit is also used to detect the communication status between the processing unit and the communication unit. If the communication status is abnormal, the communication unit is controlled to obtain the latest firmware from the server. The co-processing unit is also used to control the processing unit to burn the latest boot program when the latest firmware obtained is the latest boot program, so as to control the processing unit to restart and enter the latest boot program.
2. A device firmware management system according to claim 1, characterized in that: The co-processing unit is a single chip microcomputer, and the single chip microcomputer communicates with the boot program and the application program of the processing unit through a serial port.
3. A device firmware management system according to claim 1, characterized in that: The communication unit includes wired communication or wireless communication.
4. A device firmware management system according to claim 1, characterized in that: The storage unit is an off-chip storage, using FLASH or SD card storage.
5. A device firmware management system according to claim 2, characterized in that: The co-processing unit is also used to mark the firmware corresponding to the application in the storage unit as abnormal firmware when it detects that the execution status of the application of the processing unit is abnormal, so that the boot program of the processing unit skips the search for the abnormal firmware when searching for the optimal firmware in the storage unit.
6. A device firmware management system according to claim 5, characterized in that: The processing unit is further configured to search the optimal firmware in the storage unit through a boot program. If the optimal firmware is different from the firmware currently used by the processing unit, the processing unit is controlled to burn the program in the optimal firmware and execute the program in the optimal firmware.
7. A device firmware management system according to claim 6, characterized in that: The processing unit is further configured to, when the server has firmware to be issued, check whether the firmware in the storage unit is the same as the firmware to be issued, and if the firmware in the storage unit is the same as the firmware to be issued, feedback to the server not to download the firmware to be issued; If the storage unit does not contain firmware that is the same as the firmware to be issued, the server is fed back to download the firmware to be issued.
8. A method for managing device firmware, characterized in that: A device firmware management system according to any one of claims 1 to 7 is applied, wherein the device firmware management method comprises: receiving the firmware sent by the server through the communication unit; If the firmware includes the latest boot program, the co-processing unit controls the processing unit to burn the latest boot program, so as to control the processing unit to restart and enter the latest boot program; If the firmware is the latest application, the processing unit is automatically reset to burn the latest application into the processing unit.
9. A device firmware management method according to claim 8, characterized in that: The receiving, through the communication unit, the firmware issued by the server, includes: The processing unit detects, through the communication unit, whether the server has firmware to be issued; If the server has the firmware to be issued, then check whether the firmware in the storage unit is the same as the firmware to be issued: If the firmware stored in the storage unit is the same as the firmware to be issued, feeding back to the server not to download the firmware to be issued; If the storage unit does not contain firmware that is the same as the firmware to be issued, the server is fed back to download the firmware to be issued.
10. A device firmware management method according to claim 9, characterized in that: Also includes: If the application program execution state of the processing unit is an abnormal state, the co-processing unit controls the processing unit to restart.
Citation Information
Patent Citations
BIOS (basic input output system) restoration system and method
CN104346181A
Method and system for recovering Internet of Things terminal firmware
CN112214233A