Method, device and equipment for refreshing server firmware
By automatically obtaining and using firmware refresh instructions, the problem of low server firmware refresh efficiency caused by manual operations in the existing technology is solved, automated firmware refresh is realized, and efficiency and success rate are improved.
Patent Information
- Application Number
- CN202411416830.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-21
AI Technical Summary
The existing server firmware refresh method requires manual operation, resulting in inefficiency and waste of manpower and time.
By obtaining the firmware refresh instruction, it automatically determines the storage location of the firmware refresh file and obtains the file, automatically refreshes the firmware according to the firmware refresh time, and supports multiple refreshes to improve the success rate.
The automatic firmware refresh with unprepared operation, saving time and improving the efficiency and success rate of firmware refresh.
Smart Images

Figure CN119336356A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and equipment for refreshing server firmware. Background Art
[0002] Usually, the server's Basic Input Output System (BIOS) can be used to ensure the stable operation of the server host system and continuously monitor the server's status through the server's Baseboard Management Controller (BMC). During the iterative development of the server, it is necessary to use firmware refresh to make the updated BMC firmware and BIOS firmware take effect in the server.
[0003] The common methods of firmware refresh in current servers are: in-band refresh and out-of-band refresh. In-band refresh is to use the BIOS refresh tool under the server system to refresh and upgrade the firmware. Out-of-band refresh is to upgrade through BMC Web (WorldWide Web, global wide area network) or use Postman tool to upgrade. However, these methods of refreshing server firmware upgrades are all manual operations, which wastes manpower and time, resulting in low refresh efficiency of server firmware. Summary of the invention
[0004] The present invention provides a server firmware refresh method, which is used for automatically refreshing the firmware in the server without manual operation, thus saving manpower and time and improving the efficiency of refreshing the server firmware.
[0005] In a first aspect, the present application provides a method for refreshing server firmware, the method comprising:
[0006] Obtaining a firmware refresh instruction of the target server; wherein the firmware refresh instruction includes a firmware refresh time, a firmware refresh file path, a firmware refresh file name, and the firmware to be refreshed;
[0007] Determine the storage location of the firmware refresh file by using the firmware refresh file path;
[0008] Based on the firmware refresh file name, obtaining the firmware refresh file in the storage location;
[0009] If the current time reaches the firmware refresh time, the firmware to be refreshed in the target server is refreshed using the firmware refresh file.
[0010] The above method determines the storage location of the firmware refresh file based on the firmware refresh file in the firmware refresh instruction and obtains the firmware refresh file in the storage location based on the firmware refresh file name. Thus, the firmware refresh file can be automatically obtained, and there is no need to manually upload the firmware refresh file, which improves the efficiency of the firmware refresh. And in the embodiment of the present application, when the current time reaches the firmware refresh time, the firmware to be refreshed of the target server is automatically refreshed, and no manual triggering is required, which saves time and improves the efficiency of the firmware refresh.
[0011] In a possible implementation manner, the firmware refresh instruction further includes a refresh time interval and a firmware refresh number;
[0012] After the firmware to be refreshed in the target server is refreshed using the firmware refresh file, the method further includes:
[0013] Determining whether the current refresh count of the firmware to be refreshed is less than the firmware refresh count;
[0014] If yes, then returning to the step of using the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server at every target duration; wherein the target duration is obtained based on the refresh time interval;
[0015] If not, the firmware update of the target server is completed.
[0016] In the above method, based on the firmware refresh number and refresh time interval in the firmware refresh instruction, it is determined whether the current refresh number is less than the firmware refresh number; if so, the firmware to be refreshed in the target server is repeatedly refreshed every target time. Therefore, in the embodiment of the present application, the firmware to be refreshed is refreshed multiple times, avoiding the problem of unsuccessful refresh of the firmware to be refreshed once, and improving the success rate of the firmware refresh.
[0017] In a possible implementation manner, after completing the firmware update of the target server, the method further includes:
[0018] Obtaining the current version information of the firmware to be updated in the target server;
[0019] Compare the current version information with the target version information in the firmware update file to determine whether the current version information is the same as the target version information;
[0020] If yes, it is determined that the firmware to be refreshed in the target server is refreshed successfully;
[0021] If not, it is determined that the firmware to be refreshed in the target server has failed to be refreshed.
[0022] In the above method, when the firmware update is completed, the current version information of the firmware to be updated is compared with the target version information in the firmware update file to determine whether the firmware is updated successfully, thereby ensuring the accuracy of the firmware update.
[0023] In a possible implementation manner, the firmware refresh instruction further includes a configuration saving parameter, and the configuration saving parameter is used to indicate whether the configuration information needs to be saved;
[0024] Before using the firmware update file to update the firmware to be updated in the target server, the method further includes:
[0025] If the configuration saving parameter indicates that the configuration information needs to be saved, then saving the historical configuration information of the firmware of the target server;
[0026] If the configuration saving parameter indicates that the configuration information does not need to be saved, the step of using the firmware updating file to update the firmware to be updated in the target server is performed.
[0027] The above method determines whether it is necessary to save the historical configuration information of the firmware to be refreshed of the target server based on the configuration saving parameter, so as to avoid the loss of the configuration information of the firmware to be refreshed after refreshing the firmware.
[0028] In a possible implementation, before obtaining the firmware update instruction of the target server, the method further includes:
[0029] In response to the Internet protocol IP of the baseboard management controller BMC input by the user, determining the target server;
[0030] In response to a user name and password input by a user, establishing a connection with the target server;
[0031] In response to the refresh parameters set by the user, determining the refresh parameters of the target server, wherein the refresh parameters include a firmware refresh time, a firmware refresh number, and a refresh time interval; and,
[0032] In response to the firmware refresh file path and the firmware refresh file name set by the user, determining the firmware refresh file path and the firmware refresh file name of the target server; and,
[0033] In response to the configuration saving parameter set by the user, determining the configuration saving parameter of the target server, wherein the configuration saving parameter is used to indicate whether the configuration information needs to be saved;
[0034] In response to a firmware name set by a user, determining the firmware to be refreshed;
[0035] A firmware refresh instruction of the target server is obtained according to the refresh parameter, the configuration saving parameter, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed.
[0036] In the above method, users can set the refresh parameters, firmware refresh file path, firmware refresh file name, firmware to be refreshed, and configuration saving parameters of the target server according to their needs to determine the firmware refresh instruction. Therefore, this application can realize customized firmware refresh and improve the user experience.
[0037] In a second aspect, the present application provides a firmware refresh device, the device comprising:
[0038] An instruction acquisition module is used to acquire a firmware refresh instruction of a target server; wherein the firmware refresh instruction includes a firmware refresh time, a firmware refresh file path, a firmware refresh file name, and the firmware to be refreshed;
[0039] A storage location determination module, used to determine the storage location of the firmware refresh file using the firmware refresh file path;
[0040] A file acquisition module, used for acquiring the firmware refresh file in the storage location based on the firmware refresh file name;
[0041] The firmware refresh module is used to use the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server if the current time reaches the firmware refresh time.
[0042] In a possible implementation manner, the firmware refresh instruction further includes a refresh time interval and a firmware refresh number; and the device further includes:
[0043] A judgment module, configured to judge whether the current number of refreshes of the firmware to be refreshed is less than the number of firmware refreshes after the firmware to be refreshed in the target server is refreshed by using the firmware refresh file;
[0044] a repeated refresh module, for returning to the step of using the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server at target time intervals if yes; wherein the target time interval is obtained based on the refresh time interval;
[0045] The completion module is used to complete the firmware update of the target server if no.
[0046] In a possible implementation, the device further includes:
[0047] A judgment module, configured to obtain current version information of the firmware to be refreshed in the target server after completing the firmware refresh of the target server;
[0048] Compare the current version information with the target version information in the firmware update file to determine whether the current version information is the same as the target version information;
[0049] If yes, it is determined that the firmware to be refreshed in the target server is refreshed successfully;
[0050] If not, it is determined that the firmware to be refreshed in the target server has failed to be refreshed.
[0051] In a possible implementation manner, the firmware refresh instruction further includes a configuration saving parameter, and the configuration saving parameter is used to indicate whether the configuration information needs to be saved; the device further includes:
[0052] A configuration information saving module, used for saving the historical configuration information of the firmware of the target server before the firmware to be refreshed in the target server is refreshed by using the firmware refresh file, if the configuration saving parameter indicates that the configuration information needs to be saved;
[0053] A refresh module is determined, which is used to execute the step of refreshing the firmware to be refreshed in the target server by using the firmware refresh file if the configuration saving parameter indicates that the configuration information does not need to be saved.
[0054] In a possible implementation, the device further includes:
[0055] A setting module, used for determining the target server in response to the Internet protocol IP of the baseboard management controller BMC input by the user before obtaining the firmware refresh instruction of the target server;
[0056] In response to a user name and password input by a user, establishing a connection with the target server;
[0057] In response to the refresh parameters set by the user, determining the refresh parameters of the target server, wherein the refresh parameters include a firmware refresh time, a firmware refresh number, and a refresh time interval; and,
[0058] In response to the firmware refresh file path and the firmware refresh file name set by the user, determining the firmware refresh file path and the firmware refresh file name of the target server; and,
[0059] In response to the configuration saving parameter set by the user, determining the configuration saving parameter of the target server, wherein the configuration saving parameter is used to indicate whether the configuration information needs to be saved;
[0060] In response to a firmware name set by a user, determining the firmware to be refreshed;
[0061] A firmware refresh instruction of the target server is obtained according to the refresh parameter, the configuration saving parameter, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed.
[0062] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the method for refreshing the server firmware when executing the computer program.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-mentioned server firmware refresh method of the present application.
[0064] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which is stored in a computer-readable storage medium; when the processor of a memory access device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the memory access device executes the steps in the above-mentioned server firmware refresh method of the present application.
[0065] For each aspect from the second to the fifth aspect and the technical effects that may be achieved by each aspect, please refer to the technical effects that can be achieved by various possible solutions in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0067] Figure 1 One of the flow charts of a server firmware refresh method provided in an embodiment of the present application;
[0068] Figure 2 A schematic diagram of a process for determining whether the server firmware is successfully refreshed provided in an embodiment of the present application;
[0069] Figure 3 A second flow chart of a server firmware refresh method provided in an embodiment of the present application;
[0070] Figure 4A schematic diagram of a server firmware refresh device provided in an embodiment of the present application;
[0071] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present application more clear, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment.
[0073] In the description of this application, "multiple" is understood to be "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0074] The common methods of refreshing server firmware in the prior art are: one is in-band refreshing, and the other is out-of-band refreshing. Among them, in-band refreshing is to use the BIOS refreshing tool under the server system to refresh and upgrade the firmware. Out-of-band refreshing is to upgrade through BMC Web or use the Postman tool. However, these methods of refreshing server firmware upgrade are all manual operations, which wastes manpower and time, resulting in low efficiency of refreshing server firmware.
[0075] In this regard, an embodiment of the present application provides a method for refreshing server firmware, by determining the storage location of a firmware refresh file based on the firmware refresh file in the firmware refresh instruction and obtaining the firmware refresh file in the storage location based on the firmware refresh file name. Thus, the firmware refresh file can be automatically obtained, and there is no need to manually upload the firmware refresh file, thereby improving the efficiency of firmware refreshing. Moreover, in the embodiment of the present application, when the current time reaches the firmware refresh time, the firmware to be refreshed of the target server is automatically refreshed, and no manual triggering is required, thereby saving time and improving the efficiency of firmware refreshing.
[0076] The present application is further described in detail below in conjunction with the accompanying drawings. Figure 1 As shown, it is a flow chart of a server firmware refresh method provided by an embodiment of the present application, and the specific implementation process of the method is as follows:
[0077] Step 101: Obtain a firmware refresh instruction of a target server, wherein the firmware refresh instruction includes a firmware refresh time, a firmware refresh file path, a firmware refresh file name, and the firmware to be refreshed;
[0078] The firmware to be refreshed in the embodiment of the present application may be BIOS firmware and / or BMC firmware. The embodiment of the present application does not limit the firmware to be refreshed. The firmware to be refreshed in the embodiment of the present application may be set according to the specific actual situation.
[0079] In order to implement a customizable firmware refresh method and improve user experience, in a possible implementation, a method for determining a firmware refresh instruction of a target server is as follows:
[0080] In response to the BMC IP (Internet Protocol) input by the user, a target server is determined; in response to the user name and password input by the user, a connection is established with the target server; in response to the refresh parameters set by the user, the refresh parameters of the target server are determined, wherein the refresh parameters include firmware refresh time, firmware refresh times and refresh time interval; and, in response to the firmware refresh file path and firmware refresh file name set by the user, the firmware refresh file path and firmware refresh file name of the target server are determined; and, in response to the configuration save parameters set by the user, the configuration save parameters of the target server are determined, wherein the configuration save parameters are used to indicate whether configuration information needs to be saved; in response to the firmware name set by the user, the firmware to be refreshed is determined; and according to the refresh parameters, the configuration save parameters, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed, a firmware refresh instruction of the target server is obtained.
[0081] In the embodiment of the present application, the correspondence between the BMC IP and the server is pre-set, and then based on the BMC IP input by the user, the server corresponding to the BMC IP can be determined, and the server can be determined as the target server.
[0082] In the embodiment of the present application, the refresh parameters, configuration saving parameters, firmware refresh file path, firmware refresh file name and the firmware to be refreshed generate a URL (uniform resource locator), that is, the firmware refresh instruction in the embodiment of the present application.
[0083] Step 102: using the firmware update file path, determine the storage location of the firmware update file;
[0084] Step 103: based on the firmware refresh file name, obtaining the firmware refresh file in the storage location;
[0085] In the embodiment of the present application, multiple firmware refresh files can be pre-stored, so the firmware refresh file can be obtained from the multiple stored firmware refresh files based on the firmware refresh file name.
[0086] For example, the firmware refresh files stored in the firmware refresh file path include: firmware refresh file 1, firmware refresh file 2, firmware refresh file 3, and firmware refresh file 4. If the firmware refresh file name in the firmware refresh instruction is firmware refresh file 3, then the firmware refresh file 3 is obtained from the firmware refresh files stored in the firmware refresh file path.
[0087] Step 104: If the current time reaches the firmware refresh time, the firmware to be refreshed in the target server is refreshed using the firmware refresh file.
[0088] In order to ensure the accuracy of firmware refresh. In a possible implementation, before executing step 103, if the configuration saving parameter indicates that the configuration information needs to be saved, the historical configuration information of the firmware of the target server is saved; or if the configuration saving parameter indicates that the configuration information does not need to be saved, the step of refreshing the firmware to be refreshed in the target server using the firmware refresh file is executed.
[0089] The configuration saving parameter in the embodiment of the present application can be 1 or 0. If the configuration saving parameter is 1, it is determined that the configuration saving parameter indicates that the configuration information needs to be saved. If the configuration saving parameter is 0, it is determined that the configuration saving parameter indicates that the configuration information does not need to be saved. However, the embodiment of the present application does not limit the configuration saving parameter, and the configuration saving parameter in the embodiment of the present application can be set according to the specific actual situation.
[0090] In the embodiment of the present application, the current time is obtained every specified time. The specified time can be 0.1 seconds, 1 second, etc. The embodiment of the present application does not limit the specified time here, and the specified time in the embodiment of the present application can be set according to the specific actual situation.
[0091] For example, if the firmware refresh time is 10:00 and the current time is 09:58, it is determined that the current time has not reached the firmware refresh time, and the current time is continuously obtained until the current time reaches the firmware refresh time, and the firmware to be refreshed in the target server is refreshed using the firmware refresh file.
[0092] The use of a firmware refresh file to refresh the firmware to be refreshed in the target server in the embodiment of the present application belongs to the prior art, and the embodiment of the present application will not be described in detail here.
[0093] The firmware refresh instruction in the embodiment of the present application also includes a refresh time interval and a firmware refresh number. In order to ensure the accuracy of the refresh of the firmware to be refreshed, in one embodiment, after executing step 104, it is determined whether the current refresh number of the firmware to be refreshed is less than the firmware refresh number; if so, then every target time period, return to the step of using the firmware refresh file to perform a firmware refresh on the firmware to be refreshed in the target server; wherein the target time period is obtained based on the refresh time interval; if not, then the firmware refresh of the target server is completed.
[0094] In the embodiment of the present application, each time the firmware to be refreshed in the target server is refreshed using the firmware refresh file, the current refresh number is added to the specified value to obtain the updated current refresh number, and the updated current refresh number is determined as the current refresh number.
[0095] The initial value of the current refresh number in the embodiment of the present application is 0, and the specified value is 1. However, the embodiment of the present application does not limit the current refresh number. The current refresh number in the embodiment of the present application can be set according to the specific actual situation.
[0096] In one embodiment, the target duration is determined by:
[0097] Method 1: setting the target duration to be equal to the firmware refresh time interval.
[0098] Method 2: Add the firmware refresh time interval to a specified value to obtain the target duration.
[0099] It should be noted that the specific method for determining the target duration described above is only used as an example and does not limit the specific method for determining the target duration. The specific method for determining the target duration in the embodiment of the present application can be set according to the specific actual situation.
[0100] In order to ensure that the updated firmware can be used normally, it is necessary to determine whether the firmware to be updated in the server has been updated successfully. Figure 2 As shown, it is a schematic diagram of a process for determining whether the firmware to be refreshed in the server is refreshed successfully, which may specifically include the following steps:
[0101] Step 201: Obtain the current version information of the firmware to be updated in the target server;
[0102] Step 202: Compare the current version information with the target version information in the firmware update file to determine whether the current version information is the same as the target version information in the firmware update file; if so, execute step 203; if not, execute step 204;
[0103] Step 203: Determine whether the firmware to be refreshed in the target server is refreshed successfully;
[0104] Step 204: Determine that the firmware to be refreshed in the target server fails to be refreshed.
[0105] In the embodiment of the present application, if it is determined that the firmware update fails, the user is prompted that the firmware update fails, and the user is required to re-update the firmware in the server.
[0106] For example, if the firmware version information in the firmware update file is aaaa, and the current version information is bbbb, it is determined that the firmware update has failed. If the current version information is aaaa, it is determined that the firmware update has succeeded.
[0107] Next, combine Figure 3 The firmware refresh method in the embodiment of the present application is described, which may specifically include the following steps:
[0108] Step 301: Determine the target server in response to the BMC IP input by the user;
[0109] Step 302: Establishing a connection with the target server in response to the user name and password input by the user;
[0110] Step 303: In response to the refresh parameters set by the user, determine the refresh parameters of the target server, wherein the refresh parameters include firmware refresh time, firmware refresh times and refresh time interval;
[0111] Step 304: In response to the firmware refresh file path and the firmware refresh file name set by the user, determine the firmware refresh file path and the firmware refresh file name of the target server;
[0112] Step 305: In response to the configuration saving parameter set by the user, determining the configuration saving parameter of the target server, wherein the configuration saving parameter is used to indicate whether the configuration information needs to be saved;
[0113] Step 306: In response to the firmware name set by the user, determine the firmware to be updated;
[0114] It should be noted that the execution sequence of steps 303 to 306 in the embodiment of the present application is not limited in the embodiment of the present application and can be set according to specific actual conditions.
[0115] Step 307: Obtaining a firmware refresh instruction of the target server according to the refresh parameter, the configuration saving parameter, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed;
[0116] Step 308: When the firmware refresh instruction of the target server is obtained, the storage location of the firmware refresh file is determined using the firmware refresh file path;
[0117] Step 309: based on the firmware refresh file name, obtaining the firmware refresh file in the storage location;
[0118] Step 310: Determine whether the current time reaches the firmware refresh time, if yes, execute step 311, if no, return to execute step 310;
[0119] Step 311: Refresh the firmware to be refreshed in the target server using the firmware refresh file;
[0120] Step 312: after the refresh is completed, determine whether the current refresh number is less than the firmware refresh number, if so, return to step 311 every target time, if not, execute step 313;
[0121] Step 313: Complete the firmware update of the target server;
[0122] Step 314: compare the current version information of the firmware to be updated in the target server with the target version information in the firmware update file to determine whether the current version information is the same as the target version information in the firmware update file. If so, execute step 315; if not, execute step 316;
[0123] Step 315: Determine that the firmware to be refreshed in the target server is refreshed successfully;
[0124] Step 316: Determine that the firmware to be refreshed in the target server fails to be refreshed.
[0125] Based on the same inventive concept, the present application also provides a server firmware refresh device, see Figure 4 , the device 400 comprises:
[0126] The instruction acquisition module 410 is used to acquire the firmware refresh instruction of the target server; wherein the firmware refresh instruction includes the firmware refresh time, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed;
[0127] A storage location determination module 420, configured to determine a storage location of a firmware refresh file using the firmware refresh file path;
[0128] A file acquisition module 430, configured to acquire the firmware refresh file in the storage location based on the firmware refresh file name;
[0129] The firmware updating module 440 is configured to use the firmware updating file to perform firmware updating on the firmware to be updated in the target server if the current time reaches the firmware updating time.
[0130] In a possible implementation manner, the firmware refresh instruction further includes a refresh time interval and a firmware refresh number; and the device further includes:
[0131] A judgment module 450 is used to judge whether the current refresh number is less than the firmware refresh number after the firmware to be refreshed in the target server is refreshed by using the firmware refresh file;
[0132] Repeat refresh module 460, for returning to the step of using the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server at target time intervals if yes; wherein the target time interval is obtained based on the refresh time interval;
[0133] The completion module 470 is used to complete the firmware update of the target server if no.
[0134] In a possible implementation, the device further includes:
[0135] The judgment module 480 is used to obtain the current version information of the firmware to be refreshed in the target server after completing the firmware refresh of the target server;
[0136] Compare the current version information with the target version information in the firmware update file to determine whether the current version information is the same as the target version information;
[0137] If yes, it is determined that the firmware to be refreshed in the target server is refreshed successfully;
[0138] If not, it is determined that the firmware to be refreshed in the target server has failed to be refreshed.
[0139] In a possible implementation manner, the firmware refresh instruction further includes a configuration saving parameter, and the configuration saving parameter is used to indicate whether the configuration information needs to be saved; the device further includes:
[0140] The configuration information saving module 490 is used for saving the historical configuration information of the firmware of the target server before the firmware to be refreshed in the target server is refreshed by using the firmware refresh file, if the configuration saving parameter indicates that the configuration information needs to be saved;
[0141] The determination refresh module 491 is used to execute the step of refreshing the firmware to be refreshed in the target server by using the firmware refresh file if the configuration saving parameter indicates that the configuration information does not need to be saved.
[0142] In a possible implementation, the device further includes:
[0143] A setting module 492 is used to determine the target server in response to the Internet protocol IP of the baseboard management controller BMC input by the user before obtaining the firmware refresh instruction of the target server;
[0144] In response to a user name and password input by a user, establishing a connection with the target server;
[0145] In response to the refresh parameters set by the user, determining the refresh parameters of the target server, wherein the refresh parameters include a firmware refresh time, a firmware refresh number, and a refresh time interval; and,
[0146] In response to the firmware refresh file path and the firmware refresh file name set by the user, determining the firmware refresh file path and the firmware refresh file name of the target server; and,
[0147] In response to the configuration saving parameter set by the user, determining the configuration saving parameter of the target server, wherein the configuration saving parameter is used to indicate whether the configuration information needs to be saved;
[0148] In response to a firmware name set by a user, determining the firmware to be refreshed;
[0149] A firmware refresh instruction of the target server is obtained according to the refresh parameter, the configuration saving parameter, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed.
[0150] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the function of the aforementioned server firmware refresh device, referring to Figure 5 , the electronic device comprises:
[0151] At least one processor 501, and a memory 502 connected to the at least one processor 501. The specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present application. Figure 5 In the example, the processor 501 and the memory 502 are connected via a bus 500. The bus 500 is Figure 5 The connections between other components are shown in bold lines, and are not intended to be limiting. The bus 500 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 501 can also be called a controller, and there is no limitation on the name.
[0152] In the embodiment of the present application, the memory 502 stores instructions that can be executed by at least one processor 501. The at least one processor 501 can execute the firmware refresh method discussed above by executing the instructions stored in the memory 502. The processor 501 can implement Figure 4 The functions of each module in the device shown.
[0153] Among them, the processor 501 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 502 and calling data stored in the memory 502, the various functions of the device and processing data, the device can be monitored as a whole.
[0154] In one possible design, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0155] The processor 501 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the server firmware refresh method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0156] The memory 502 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 502 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0157] By programming the processor 501, the code corresponding to the firmware refresh method described in the above embodiment can be fixed into the chip, so that the chip can execute the firmware refresh method when it is running. Figure 1 The steps of the server firmware refresh method in the embodiment shown are as follows: How to design and program the processor 501 is a technique known to those skilled in the art and will not be described in detail here.
[0158] An embodiment of the present application also provides a computer-readable storage medium that stores computer-executable instructions required to execute the above-mentioned processor, which includes a program required to execute the above-mentioned processor.
[0159] In some possible implementations, various aspects of the server firmware refresh method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the above-mentioned program product is run on an electronic device, the above-mentioned program code is used to enable the above-mentioned electronic device to execute the steps of the server firmware refresh method according to various exemplary embodiments of the present application described above in this specification.
[0160] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0164] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0165] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for refreshing server firmware, characterized in that: The method comprises: Obtaining a firmware refresh instruction of the target server; wherein the firmware refresh instruction includes a firmware refresh time, a firmware refresh file path, a firmware refresh file name, and the firmware to be refreshed; Determine the storage location of the firmware refresh file by using the firmware refresh file path; Based on the firmware refresh file name, obtaining the firmware refresh file in the storage location; If the current time reaches the firmware refresh time, the firmware to be refreshed in the target server is refreshed using the firmware refresh file.
2. The method according to claim 1, characterized in that The firmware refresh instruction also includes a refresh time interval and a firmware refresh number; After the firmware to be refreshed in the target server is refreshed using the firmware refresh file, the method further includes: Determining whether the current refresh count of the firmware to be refreshed is less than the firmware refresh count; If yes, then returning to the step of using the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server at every target duration; wherein the target duration is obtained based on the refresh time interval; If not, the firmware update of the target server is completed.
3. The method according to claim 2, characterized in that After completing the firmware update of the target server, the method further includes: Obtaining current version information of the firmware to be updated in the target server; Compare the current version information with the target version information in the firmware update file to determine whether the current version information is the same as the target version information; If yes, it is determined that the firmware to be refreshed in the target server is refreshed successfully; If not, it is determined that the firmware to be refreshed in the target server has failed to be refreshed.
4. The method according to claim 1, characterized in that: The firmware refresh instruction also includes a configuration saving parameter, and the configuration saving parameter is used to indicate whether the configuration information needs to be saved; Before using the firmware update file to update the firmware to be updated in the target server, the method further includes: If the configuration saving parameter indicates that the configuration information needs to be saved, then saving the historical configuration information of the firmware of the target server; If the configuration saving parameter indicates that the configuration information does not need to be saved, the step of using the firmware updating file to update the firmware to be updated in the target server is performed.
5. The method according to claim 1, characterized in that: Before obtaining the firmware refresh instruction of the target server, the method further includes: In response to the Internet protocol IP of the baseboard management controller BMC input by the user, determining the target server; In response to a user name and password input by a user, establishing a connection with the target server; In response to the refresh parameters set by the user, determining the refresh parameters of the target server, wherein the refresh parameters include a firmware refresh time, a firmware refresh number, and a refresh time interval; and, In response to the firmware refresh file path and the firmware refresh file name set by the user, determining the firmware refresh file path and the firmware refresh file name of the target server; and, In response to the configuration saving parameter set by the user, determining the configuration saving parameter of the target server, wherein the configuration saving parameter is used to indicate whether the configuration information needs to be saved; In response to a firmware identifier set by a user, determining the firmware to be refreshed; A firmware refresh instruction of the target server is obtained according to the refresh parameter, the configuration saving parameter, the firmware refresh file path, the firmware refresh file name and the firmware to be refreshed.
6. A server firmware refresh device, characterized in that: The device comprises: An instruction acquisition module is used to acquire a firmware refresh instruction of a target server; wherein the firmware refresh instruction includes a firmware refresh time, a firmware refresh file path, a firmware refresh file name, and the firmware to be refreshed; A storage location determination module, used to determine the storage location of the firmware refresh file using the firmware refresh file path; A file acquisition module, used for acquiring the firmware refresh file in the storage location based on the firmware refresh file name; The firmware refresh module is used to use the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server if the current time reaches the firmware refresh time.
7. The device according to claim 6, characterized in that The firmware refresh instruction also includes a refresh time interval and a firmware refresh number; the device also includes: A judgment module, configured to judge whether the current number of refreshes of the firmware to be refreshed is less than the number of firmware refreshes after the firmware to be refreshed in the target server is refreshed by using the firmware refresh file; a repeated refresh module, for returning to the step of using the firmware refresh file to perform firmware refresh on the firmware to be refreshed in the target server at target time intervals if yes; wherein the target time interval is obtained based on the refresh time interval; The completion module is used to complete the firmware update of the target server if no.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 5 when executing a computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 5.
Citation Information
Cited By
Firmware management method and system, electronic equipment and storage medium
CN120238440A