Firmware management method, system, electronic device and storage medium
By centrally managing and synchronizing firmware information on the server side, the problems of cumbersome and low accuracy of server firmware refresh operations are solved, and efficient and accurate firmware management is achieved.
Patent Information
- Application Number
- CN202510714791.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-05-30
AI Technical Summary
In the prior art, the refresh operation of server firmware is cumbersome, time-consuming and low accuracy, especially when facing multiple different customization needs, manual maintenance efficiency and accuracy are difficult to ensure.
By centrally managing customized firmware information on the server, analyzing firmware numbers and downloading firmware files to be configured, generating maintenance information, and syncing it to the client for refresh operations, reducing manual intervention and improving efficiency and accuracy.
It realizes efficient and accurate refresh of firmware, reduces manual operation steps, reduces error rates, and improves the maintenance efficiency and accuracy of customized firmware.
Smart Images

Figure CN120238440B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servers, and in particular to a firmware management method, system, electronic device, and storage medium. Background Art
[0002] Server firmware is the basic software program that runs on server hardware. It sits between the operating system and the hardware, responsible for basic control and management of the server hardware. Examples include BIOS / UEFI (Basic Input / Output System or Unified Extensible Firmware Interface), RAID controller firmware, and network adapter firmware. Different server functions require different firmware configurations, meaning that the firmware needs to be refreshed to meet customized requirements.
[0003] In some related technologies, in order to meet the refresh requirements of firmware with different functions, it is usually necessary to manually refresh the firmware according to the firmware information in the custom instruction document. When the customization requirements of different orders are different and the number of customization requirements is large, the number of firmware to be refreshed is large. Manually refreshing and maintaining each firmware is cumbersome, time-consuming and error-prone, which affects the efficiency and maintenance accuracy of the firmware. Summary of the Invention
[0004] The present application provides a firmware management method, system, electronic device and medium, which centrally manage the information of customized firmware on a control terminal and update the maintained firmware files to the customized firmware of different user terminals to solve the problems in the related art of manual firmware maintenance, which is cumbersome, time-consuming and has low maintenance accuracy.
[0005] The present application provides a firmware management method, which is applied to a server, wherein the server is communicatively connected to a first client, and the method includes:
[0006] Obtaining a customized firmware instruction and verifying that the firmware key attribute information in the customized firmware instruction is valid data;
[0007] In response to verifying the valid data, parsing the firmware number in the custom firmware instruction, and confirming that the firmware associated with the firmware number is new firmware in combination with the firmware number;
[0008] In response to confirming that the firmware associated with the firmware number is new firmware, downloading a firmware file to be configured according to firmware information of the new firmware, maintaining the firmware file to be configured, and generating firmware maintenance information;
[0009] The firmware maintenance information is synchronized to the first client, so that the first client performs a firmware refresh operation according to the firmware maintenance information.
[0010] Furthermore, the server is communicatively connected to a second client, and the method includes: configuring the second client to communicate with the server through an application programming interface to send customized firmware instructions to the server through the second client; in response to verifying that the firmware key attribute information in the customized firmware instruction is valid data, constructing a firmware mapping data table in combination with the firmware key attribute information.
[0011] Furthermore, the firmware number is compared with the historical firmware number record in the server. If the firmware number does not exist in the historical firmware number record, the firmware associated with the firmware number is confirmed to be a new firmware; in response to confirming that the firmware associated with the firmware number is a new firmware, a hash value is calculated in combination with the firmware file to be configured, and the firmware file to be configured is verified to be a complete file based on the hash value; the firmware file to be configured is stored in a specified location, and the firmware maintenance information is generated.
[0012] Further, in response to confirming that the firmware associated with the firmware number is new firmware, generating a maintenance task table;
[0013] Obtain the pending tasks in the maintenance task table, and obtain the firmware release information in combination with the firmware number in the pending tasks; download the firmware file to be configured according to the firmware release information, and calculate the hash value in combination with the firmware file to be configured; query the firmware mapping data table in combination with the pending tasks to obtain the control object type after the new firmware is converted; construct a maintenance record in combination with the firmware number, the hash value and the control object type, and write the maintenance record into the firmware maintenance information.
[0014] Furthermore, the firmware maintenance information is synchronized to the first client, specifically including: encapsulating the firmware file to be configured and the firmware maintenance information to form a message object, and sending the message object to the first client through a message queue; so that the first client receives the message object and verifies whether the message object includes key file paths and preset fields; in response to successful verification, storing the message object in the firmware data table in the first client.
[0015] Furthermore, the maintenance record in the firmware maintenance information is queried through a query statement according to a preset period; in response to the maintenance record status being synchronized, the firmware file to be configured and the firmware maintenance information are fully synchronized to the first client.
[0016] Furthermore, the first client is enabled to perform a fixed refresh operation according to the firmware maintenance information, specifically including: querying the firmware data table according to a preset instruction to obtain the firmware number field, and determining whether the firmware number field is the firmware number to be configured; if the firmware number field is the firmware number to be configured, obtaining the firmware file to be configured and the firmware maintenance information associated with the firmware number to be configured according to the firmware number to be configured; and performing a refresh operation on the firmware to be configured in combination with the firmware file to be configured and the firmware maintenance information.
[0017] The present application also provides a firmware management system for implementing the above-mentioned firmware management method, the system comprising:
[0018] An acquisition module, configured to acquire a customized firmware instruction and verify that the firmware key attribute information in the customized firmware instruction is valid data;
[0019] a determination module, configured to, in response to verifying the valid data, parse the firmware number in the custom firmware instruction, and confirm, based on the firmware number, that the firmware associated with the firmware number is the new firmware;
[0020] a maintenance module configured to, when confirming that the firmware associated with the firmware number is new firmware, download the firmware file to be configured according to the firmware information of the new firmware, maintain the firmware file to be configured, and generate firmware maintenance information;
[0021] The execution module is configured to synchronize the firmware maintenance information to the first client, so that the first client performs a firmware refresh operation according to the firmware maintenance information.
[0022] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned firmware management methods when executing the computer program.
[0023] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned firmware management methods are implemented.
[0024] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned firmware management methods when executed by a processor.
[0025] By setting up a server for uniformly maintaining customized firmware in this application, the customized firmware instructions and key attribute information of the firmware are sent to the server, so that the firmware number can be parsed on the server, and after confirming that the firmware associated with the firmware number is a new firmware, the file to be configured of the new firmware is downloaded, and the new firmware is maintained to generate firmware maintenance information. The file to be configured and the firmware maintenance information are sent to each manufacturer using the firmware, i.e., the first client, through the interface, so that the refresh operation of the firmware can be performed through the first client, which solves the low efficiency problem of the existing technology that manual refresh and maintenance of each firmware is required, thereby improving the customized refresh efficiency of each firmware and the refresh accuracy of the firmware. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0027] Figure 1 A schematic diagram of an application environment provided in an embodiment of the present application;
[0028] Figure 2 A schematic diagram of a firmware management method provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the specific operation of the server provided in the embodiment of the present application;
[0030] Figure 4 A schematic diagram of specific operations in the first client provided in an embodiment of the present application;
[0031] Figure 5 A schematic diagram of a firmware management system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0033] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0034] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0035] The embodiment of the present application provides a firmware management method, which is applied to the server, such as Figure 1 As shown, the server is communicatively connected to a first client and a second client, wherein the second client and the server are connected via a RESTful API interface using the HTTP / HTTPS protocol. In this embodiment, the server is configured as the central server of the DIAG system, and the first client is configured as a manufacturer's instruction system. The manufacturer's instruction system includes several servers that require different customized functional firmware. The manufacturer's instruction system needs to refresh the firmware in the server to meet the corresponding functional tasks; the server is used to centrally manage customized firmware information, automatically identify new customized firmware within the instructions, and create firmware maintenance information through retrieval and parsing operations, and transmit the customized firmware instructions, firmware maintenance information, and firmware file updates to the second client; the first client is configured as a product lifecycle management system, which is used to transmit customized firmware information to the server.
[0036] In a specific embodiment, Figure 2 As shown, the firmware management method includes:
[0037] Step 101: Obtain a customized firmware instruction and verify that the firmware key attribute information in the customized firmware instruction is valid data.
[0038] In this embodiment, the second client and the server are configured to communicate via an application programming interface (API). The second client sends custom firmware instructions to the server. Specifically, after the second client and the server complete the instruction countersigning process, the second client calls a predefined API interface and sends the custom firmware instructions to the server via this API. This allows the key attribute information in the custom firmware instructions to be sent to the DIAG system's central server. The central server receives the data, performs data verification and analysis to ensure its integrity and accuracy, and stores the data in the central server database.
[0039] Furthermore, the central server obtains the firmware key attribute information in the custom firmware instruction, verifies that the firmware key attribute information in the custom firmware instruction is valid data, and constructs a firmware mapping data table based on the firmware key attribute information. The firmware key attribute information includes the instruction number, firmware type, version number, and firmware ID. The firmware types include BMC firmware, BIOS firmware, and CMC firmware. For example, the instruction number is "V2025_04_01_60", the BIOS firmware type version number is "06.07.01", and the firmware ID is "FW0100052714".
[0040] It should be noted that the server receives custom firmware instructions and verifies that the firmware key attribute information contained in the custom firmware instructions is valid data. A menu interface is designed to display the firmware key attribute information transmitted by the second client. A firmware mapping data table is also created and stored in a standardized structure to facilitate subsequent querying and processing. Table 1 shows the firmware mapping data table constructed in this embodiment.
[0041] Table 1 Firmware Mapping Data Table
[0042]
[0043] Step 102: In response to valid data being verified, the firmware number in the custom firmware instruction is parsed, and the firmware number is combined with the firmware number to confirm that the firmware associated with the firmware number is the new firmware.
[0044] like Figure 3 As shown, in this embodiment, the server periodically scans received custom firmware instructions, parses the firmware number in the custom firmware instruction, and compares the firmware number with the historical firmware number record in the server. If the firmware number does not exist in the historical firmware number record, the firmware associated with the firmware number is confirmed to be new firmware. If the firmware number does exist in the historical firmware number record, the firmware associated with the firmware number is confirmed to be existing firmware. The server stores maintenance information associated with the existing firmware, and in this case, there is no need to configure or maintain the existing firmware.
[0045] Step 103 : In response to confirming that the firmware associated with the firmware number is new firmware, download the firmware file to be configured according to the firmware information of the new firmware, maintain the firmware file to be configured, and generate firmware maintenance information.
[0046] In response to confirming that the firmware associated with the firmware number is a new firmware, a hash value is calculated in combination with the firmware file to be configured, and the firmware file to be configured is verified to be a complete file based on the hash value; the firmware file to be configured is stored in a designated location, and firmware maintenance information is generated.
[0047] Among them, when it is confirmed that the firmware associated with the firmware number is new firmware, a maintenance task is automatically generated in the server, and the task type is set to firmware, and the maintenance task is stored in the maintenance task table for subsequent task scheduling and processing, as shown in Table 2, which is the maintenance task table in this implementation.
[0048] Table 2 Maintenance Task List
[0049]
[0050] Furthermore, the pending tasks in the maintenance task table are obtained, and the firmware release information is obtained in combination with the firmware number in the pending tasks; the firmware file to be configured is downloaded according to the firmware release information, and the hash value is calculated in combination with the firmware file to be configured; the firmware mapping data table is queried in combination with the pending tasks to obtain the control object type after the new firmware is converted; a maintenance record is constructed in combination with the firmware number, hash value and control object type, and the maintenance record is written into the firmware maintenance information.
[0051] Exemplarily, the server obtains firmware release information from the firmware release system based on the firmware number in the pending task and downloads the firmware file. The hash value in this embodiment is configured as a sha256 value, calculates its sha256 value, performs an integrity check on the firmware file, files it in the specified directory / Firmware / {FW type} / {$FWID}, parses the firmware data in the specified directory to generate a firmware maintenance record, writes the firmware maintenance record to the firmware maintenance record table, and uses the firmware maintenance record table to record detailed firmware maintenance information, so that the server can subsequently synchronize the firmware maintenance information to each first client. As shown in Table 3, this is the firmware maintenance record table in this embodiment.
[0052] Table 3 Firmware maintenance record
[0053]
[0054] Among them, the firmware release information is obtained in combination with the firmware number in the pending task, specifically including obtaining the pending task from the maintenance task table, and obtaining the firmware release information in the firmware system according to the firmware ID field in the pending task to obtain the download connection, set the timeout time and number of retries, and send a data acquisition request to the download link to download the firmware file to be configured. If the download fails, determine whether to continue retrying based on the number of retries. If the number of retries is exceeded, record an error log.
[0055] Furthermore, after obtaining the firmware file to be configured, the storage directory is determined in conjunction with the firmware class of the firmware file to be configured, and it is determined whether the storage directory exists. If the storage directory does not exist, the file system in the server creates the storage directory and stores the configuration file to be configured in the storage directory. If the storage directory exists, the configuration file to be configured is directly stored in the storage directory, and the storage directory name is set to match the type of the firmware file to be configured. For example, when the firmware is BIOS firmware, the storage directory is set to " / Firmware / BIOS / [FWID]", the downloaded firmware configuration file is moved to this directory, and metadata information such as the original file name and file size of the file can be recorded in a temporary variable to facilitate reading and use of the file.
[0056] In this embodiment, the firmware mapping data table is queried in conjunction with the pending task to obtain the control object type after the new firmware conversion. A maintenance record is constructed based on the firmware number, hash value, and control object type, and the maintenance record is written to the firmware maintenance information. Specifically, the maintenance record includes: querying the firmware mapping data table based on the firmware ID to obtain the control object type after the conversion corresponding to the instruction number and firmware type; and calculating the SHA256 hash value of the downloaded file as the value of the "sha256check" field. This maintenance record is constructed by constructing the SQL insert statement "INSERT INTO fw_info (fw_id, control_object, version, fw_filename, part4, sha256check, status, update_time) VALUES ('[Firmware number]', '[Control object type]', '[Version number]', '[File name]', '', '[Hash value]', 'Not synchronized', '[Current time]')" and writing the maintenance record to the firmware maintenance record table.
[0057] Step 104: Synchronize the firmware maintenance information to the first client, so that the first client can refresh the firmware according to the firmware maintenance information.
[0058] like Figure 4 As shown, in this embodiment, the firmware file to be configured and the firmware maintenance information are encapsulated to form a message object, and the message object is sent to the first client through the message queue; so that the first client receives the message object and verifies whether the message object includes the key file path and preset fields; in response to the verification being passed, the message object is stored in the firmware data table in the first client. Through the above process, the customized firmware data and maintenance data can be synchronized to each first client.
[0059] After receiving the message object, each first client verifies the message integrity, specifically checking whether the message object contains the key file path and record fields. If so, the data in the message object is determined to be complete, and the relevant message object is then stored in the firmware data table of the first client. After storing the relevant message object, the first client returns the synchronization result to the server. If the synchronization process fails, detailed error information is recorded in the log table, including the error code and error description, and the firmware maintenance record for the failed synchronization is retransmitted.
[0060] In a specific embodiment, the server queries the maintenance record in the firmware maintenance information through a query statement according to a preset period; in response to the maintenance record status being synchronized, the configuration firmware file to be configured and the firmware maintenance information are fully synchronized to the first client.
[0061] In this embodiment, the server executes the query statement "SELECT instruction_id, firmware_type, version, fw_id FROM fw_infoWHERE status =" according to a preset time period, which is exemplarily set to every 30 minutes, and obtains the maintenance record status. When it is synchronized, the synchronized record is obtained from the firmware mapping data table, and the synchronized record information is combined and packaged according to the interface requirements of each first client.
[0062] It should be noted that the interface of the first client in this embodiment requires JSON format. This is accomplished by encapsulating a message object in JSON format and then sending it to each first client via a network request. After receiving the data, the first client first validates the data and, if successful, inserts it into the local firmware data table. The central server records the synchronization status, counting successful and failed synchronizations. In the event of a failure, the failure reason is recorded in detail and synchronized to the log table.
[0063] In a specific embodiment, after obtaining the synchronized data, each manufacturer's instruction system performs a refresh operation on the relevant firmware, specifically including: querying the firmware data table according to the preset instruction to obtain the firmware number field, and determining whether the firmware number field is the firmware number to be configured; if the firmware number field is the firmware number to be configured, obtaining the firmware file to be configured and firmware maintenance information associated with the firmware number to be configured according to the firmware number to be configured; and performing a refresh operation on the firmware to be configured in combination with the firmware file to be configured and the firmware maintenance information.
[0064] In this embodiment, the first client is used to receive instruction-customized firmware information and firmware maintenance information synchronized from the central maintenance system, verify the data integrity, insert it into the local firmware data table after verification, and return a successful reception message to the central server. If the integrity check of the firmware configuration file fails, an acceptance failure message is returned to the central server.
[0065] Furthermore, when each first client performs a refresh operation on the firmware to be configured, it first executes the first query statement "SELECT fw_id FROM Command_FW WHERE instruction_id = '[current instruction number]'" to obtain the field value of the firmware to be configured from the firmware data table, and through pre-set rules, determines whether the field of the firmware to be configured is a firmware number. If it is not a firmware number, the firmware maintenance information is obtained according to the historical refresh method; if it is a firmware number, the second query statement "SELECT fw_filename FROM fw_info WHERE fw_id = '[fw_id field value (ie firmware number)]'" is executed to obtain the file name of the firmware to be configured, and combined with the file path " / Firmware / {FWtype} / {$FWID}" to obtain the firmware file to be configured, thereby performing the refresh operation on the firmware to be configured.
[0066] In this embodiment, a communication connection is established between the server and the first client and the second client, so that the second client can send the customized firmware instructions and key attribute information of the firmware to the server, so that the firmware number can be parsed on the server, and after confirming that the firmware associated with the firmware number is a new firmware, the file to be configured of the new firmware is downloaded, and the new firmware is maintained to generate firmware maintenance information, and the file to be configured and the firmware maintenance information are sent to each manufacturer using the firmware, i.e., the first client, through the interface, so that the refresh operation of the firmware can be performed through the first client, which greatly reduces manual intervention and improves work efficiency. By reducing manual operation steps, the possibility of errors caused by manual maintenance of firmware is reduced, and the accuracy and efficiency of firmware maintenance are improved.
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0068] The embodiment of the present application also provides a firmware management system, which is applied to a server, and the server is connected to a first client in communication, such as Figure 5 As shown, the system includes:
[0069] An acquisition module is used to obtain a customized firmware instruction and verify that the firmware key attribute information in the customized firmware instruction is valid data;
[0070] a judgment module, configured to, in response to valid data being verified, parse the firmware number in the custom firmware instruction and confirm, in combination with the firmware number, that the firmware associated with the firmware number is the new firmware;
[0071] The maintenance module is used to download the firmware file to be configured according to the firmware information of the new firmware when confirming that the firmware associated with the firmware number is the new firmware, and to maintain the firmware file to be configured and generate firmware maintenance information;
[0072] The execution module is used to synchronize the firmware maintenance information to the first client, so that the first client performs a firmware refresh operation according to the firmware maintenance information.
[0073] In a specific embodiment, the server is also communicatively connected to the second client, and the second client is configured to communicate with the server through an application programming interface to send customized firmware instructions to the server through the second client; the acquisition module in the server is also used to respond to verifying that the firmware key attribute information in the customized firmware instruction is valid data, and construct a firmware mapping data table in combination with the firmware key attribute information.
[0074] In a specific embodiment, the judgment module is also used to compare the firmware number with the historical firmware number record in the server. If the firmware number does not exist in the historical firmware number record, the firmware associated with the firmware number is confirmed to be a new firmware; the maintenance module is used to respond to the confirmation that the firmware associated with the firmware number is a new firmware, calculate a hash value in combination with the firmware file to be configured, and verify that the firmware file to be configured is a complete file based on the hash value; store the firmware file to be configured in a specified location, and generate firmware maintenance information.
[0075] In a specific embodiment, the maintenance module is also used to generate a maintenance task table in response to confirming that the firmware associated with the firmware number is a new firmware; obtain the pending tasks in the maintenance task table, and obtain the firmware release information in combination with the firmware number in the pending tasks; download the firmware file to be configured according to the firmware release information, and calculate the hash value in combination with the firmware file to be configured; query the firmware mapping data table in combination with the pending tasks to obtain the control object type after the new firmware is converted; construct a maintenance record in combination with the firmware number, hash value and control object type, and write the maintenance record into the firmware maintenance information.
[0076] In a specific embodiment, the execution module is also used to encapsulate the firmware file to be configured and the firmware maintenance information to form a message object, and send the message object to the first client through the message queue; so that the first client receives the message object and verifies whether the message object includes the key file path and preset fields; in response to the verification being passed, the message object is stored in the firmware data table in the first client.
[0077] In a specific embodiment, the execution module is further used to query the maintenance records in the firmware maintenance information through query statements according to a preset period; in response to the maintenance record status being synchronized, the configuration firmware file to be configured and the firmware maintenance information are fully synchronized to the first client.
[0078] In a specific embodiment, an operation module is set on the first client, and the operation module is also used to query the firmware data table according to preset instructions to obtain the firmware number field, and determine whether the firmware number field is the firmware number to be configured; if the firmware number field is the firmware number to be configured, the firmware file to be configured and firmware maintenance information associated with the firmware number to be configured are obtained according to the firmware number to be configured; and a refresh operation is performed on the firmware to be configured in combination with the firmware file to be configured and the firmware maintenance information.
[0079] For descriptions of features in the embodiments corresponding to the firmware management system, please refer to the relevant descriptions of the embodiments corresponding to the firmware management method, which will not be repeated here.
[0080] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above firmware management method embodiments.
[0081] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above firmware management method embodiments when running.
[0082] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0083] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above firmware management method embodiments are implemented.
[0084] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned firmware management method embodiments are implemented.
[0085] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0086] The above is a detailed introduction to a firmware management method, system, electronic device, and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A firmware management method, characterized in that: Applied to a server, the server being communicatively connected to a first client, the method comprising: Obtaining a customized firmware instruction and verifying that the firmware key attribute information in the customized firmware instruction is valid data; In response to verifying the valid data, parsing the firmware number in the custom firmware instruction, and confirming that the firmware associated with the firmware number is new firmware in combination with the firmware number; In response to confirming that the firmware associated with the firmware number is new firmware, downloading a firmware file to be configured according to firmware information of the new firmware, maintaining the firmware file to be configured, and generating firmware maintenance information; The firmware maintenance information is synchronized to the first client, so that the first client performs a firmware refresh operation according to the firmware maintenance information.
2. The firmware management method according to claim 1, wherein: The server is communicatively connected to the second client, and the method includes: Configuring the second client to communicate with the server through an application programming interface so as to send a customized firmware instruction to the server through the second client; In response to verifying that the firmware key attribute information in the customized firmware instruction is valid data, a firmware mapping data table is constructed in combination with the firmware key attribute information.
3. The firmware management method according to claim 2, wherein: The method further comprises: Comparing the firmware number with the historical firmware number record in the server, and if the firmware number does not exist in the historical firmware number record, confirming that the firmware associated with the firmware number is a new firmware; In response to confirming that the firmware associated with the firmware number is new firmware, calculating a hash value in combination with the firmware file to be configured, and verifying that the firmware file to be configured is a complete file based on the hash value; The firmware file to be configured is stored in a designated location, and the firmware maintenance information is generated.
4. The firmware management method according to claim 3, wherein: The method further comprises: In response to confirming that the firmware associated with the firmware number is new firmware, generating a maintenance task table; Obtaining the pending tasks in the maintenance task table, and obtaining firmware release information in combination with the firmware number in the pending tasks; Download the firmware file to be configured according to the firmware release information, and calculate the hash value based on the firmware file to be configured; querying the firmware mapping data table in conjunction with the task to be processed to obtain the control object type after the new firmware conversion; A maintenance record is constructed by combining the firmware number, the hash value, and the control object type, and the maintenance record is written into the firmware maintenance information.
5. The firmware management method according to claim 4, characterized in that: Synchronizing the firmware maintenance information to the first client specifically includes: Encapsulating the firmware file to be configured and the firmware maintenance information to form a message object, and sending the message object to the first client through a message queue; so that the first client receives the message object and verifies whether the message object includes the key file path and the preset field; In response to the verification being successful, the message object is stored in a firmware data table in the first client.
6. The firmware management method according to claim 5, characterized in that: The method further comprises: querying the maintenance record in the firmware maintenance information using a query statement according to a preset period; In response to the status of the maintenance record being synchronized, the firmware file to be configured and the firmware maintenance information are fully synchronized to the first client.
7. The firmware management method according to claim 5, characterized in that: Enabling the first client to refresh the firmware according to the firmware maintenance information specifically includes: querying the firmware data table according to a preset instruction to obtain a firmware number field, and determining whether the firmware number field is a firmware number to be configured; If the firmware number field is the firmware number to be configured, acquiring the firmware file to be configured and the firmware maintenance information associated with the firmware number to be configured according to the firmware number to be configured; A refresh operation is performed on the firmware to be configured in combination with the firmware file to be configured and the firmware maintenance information.
8. A firmware management system, used to implement the firmware management method according to any one of claims 1 to 7, characterized in that: The system comprises: An acquisition module, configured to acquire a customized firmware instruction and verify that the firmware key attribute information in the customized firmware instruction is valid data; a determination module, configured to, in response to verifying the valid data, parse the firmware number in the custom firmware instruction, and confirm, based on the firmware number, that the firmware associated with the firmware number is the new firmware; a maintenance module configured to, when confirming that the firmware associated with the firmware number is new firmware, download the firmware file to be configured according to the firmware information of the new firmware, maintain the firmware file to be configured, and generate firmware maintenance information; The execution module is configured to synchronize the firmware maintenance information to the first client, so that the first client performs a firmware refresh operation according to the firmware maintenance information.
9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the firmware management method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the firmware management method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Server firmware automatic refreshing method and system
CN109634632A
Remote firmware updating method for embedded equipment
CN110413295A