Firmware update method and apparatus
Patent Information
- Application Number
- CN202310132554.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-02-17
AI Technical Summary
[0004]本发明提供一种固件更新方法及装置,用以解决现有技术针对固件版本的更新过程,需要运维人员或者用户自行去下载,浪费时间和精力,而且有可能选错版本造成服务器损坏的情况出现的技术问题
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the firmware update methods described above.
Smart Images

Figure CN116257272B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a firmware update method and apparatus. Background Technology
[0002] The current firmware update process requires maintenance personnel or users to go to the official website to find the firmware for the corresponding model, identify the different types of firmware according to the version update instructions, select the firmware version related to their own machine to download the corresponding firmware, and then check the compatibility relationship and download the corresponding compatible firmware and tool package.
[0003] The current firmware update process requires maintenance personnel or users to download the firmware themselves, which wastes time and effort, is inefficient, and may even lead to server damage due to selecting the wrong version. Summary of the Invention
[0004] This invention provides a firmware update method and apparatus to solve the technical problem that in the prior art, firmware version updates require maintenance personnel or users to download the firmware themselves, which wastes time and effort and may cause server damage due to the selection of the wrong version.
[0005] This invention provides a firmware update method, comprising:
[0006] Based on the product identification code of the target device, the firmware version information of the firmware to be updated of the target device is determined from the first database;
[0007] Based on the product identification code, all firmware versions of the firmware to be updated are determined from the second database;
[0008] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions;
[0009] Based on the target firmware version, the firmware to be updated is updated, and the version information of the target firmware version is used as the firmware version information of the firmware to be updated in the first database.
[0010] According to a firmware update method provided by the present invention, before determining the firmware version information of the firmware to be updated of the target device from a first database based on the product identification code of the target device, the method further includes:
[0011] Based on the model information and user type information of the target device, the product identification code of the target device is determined;
[0012] The association between the product identification code and the firmware to be updated of the target device is determined, and the association and the firmware version information of the firmware to be updated are stored in the first database.
[0013] According to a firmware update method provided by the present invention, after determining the product identification code of the target device based on the model information and user type information of the target device, the method further includes:
[0014] Based on the model information of the target device, determine the first-level index of the product identification code;
[0015] Based on the user type information of the target device, determine the second-level index of the product identification code;
[0016] Based on the first-level index and the second-level index, an index structure for storing the product identification code in the third database is constructed, and based on the index structure, the product identification code is stored in the third database.
[0017] According to a firmware update method provided by the present invention, based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions, including:
[0018] Multiple stable firmware versions of the firmware to be updated are obtained from the various firmware versions. From the multiple stable firmware versions, the firmware version with the highest update download frequency is selected as the target firmware version of the firmware to be updated.
[0019] According to a firmware update method provided by the present invention, based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions, including:
[0020] When the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, the first download version with the highest update download frequency of the first firmware to be updated and the second download version with the highest update download frequency of the second firmware to be updated are determined from the update download frequency of each firmware version.
[0021] Obtain multiple download versions that are used in combination to download the first firmware to be updated and the second firmware to be updated, and determine the third download version with the highest update download frequency among the multiple download versions;
[0022] If the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency that is a preset multiple, then the download version corresponding to the third download frequency is taken as the target firmware version of the firmware to be updated.
[0023] According to a firmware update method provided by the present invention, after determining the third download frequency with the highest update download frequency among the plurality of paired download versions, the method further includes:
[0024] If the sum of the first download frequency of the first download version and the second download frequency of the second download version is greater than a third download frequency of a preset multiple, then the first download version is taken as the target firmware version of the first firmware to be updated, and the second download version is taken as the target firmware version of the second firmware to be updated.
[0025] The present invention also provides a firmware update device, comprising:
[0026] The version acquisition module is used to determine the firmware version information of the firmware to be updated of the target device from the first database based on the product identification code of the target device;
[0027] The version lookup module is used to determine all firmware versions of the firmware to be updated from the second database based on the product identification code.
[0028] The version determination module is used to determine the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions;
[0029] The update module is used to update the firmware to be updated based on the target firmware version, and to use the version information of the target firmware version as the firmware version information of the firmware to be updated in the first database.
[0030] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the firmware update methods described above.
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the firmware update methods described above.
[0032] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the firmware update method as described above.
[0033] The firmware update method and apparatus provided by this invention determine the firmware version information of the firmware to be updated and all firmware versions of the firmware to be updated in the target device from a first database using the product identification code of the target device. Based on the correspondence between the product identification code and the firmware to be updated, the method of querying firmware according to model is transformed into a method of querying according to the device's product identification code, which facilitates users to quickly and accurately obtain the firmware update version. The target firmware version for the update is determined according to the update download frequency of each firmware version, realizing automatic selection of the firmware update version among the firmware to be updated and improving the efficiency of firmware update version selection. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly described below. Obviously, the accompanying drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the firmware update method provided by the present invention;
[0036] Figure 2 This is a flowchart illustrating the firmware update method provided by the present invention;
[0037] Figure 3 This is a schematic diagram of the third database storage structure provided by the present invention;
[0038] Figure 4 This is a schematic diagram of batch firmware version association provided by the present invention;
[0039] Figure 5 This is a schematic diagram of the new firmware association provided by the present invention;
[0040] Figure 6 This is a schematic diagram of the second database update provided by the present invention;
[0041] Figure 7 This is a schematic diagram of the firmware version query process provided by the present invention;
[0042] Figure 8 This is a schematic diagram of the download process provided by the present invention;
[0043] Figure 9 This is a schematic diagram of the firmware update device provided by the present invention;
[0044] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0046] This invention proposes a firmware update method. Figure 1 This is a schematic flowchart illustrating the firmware update method provided by the present invention. (Refer to...) Figure 1 The firmware update method provided by this invention may include:
[0047] Step 110: Based on the product identification code of the target device, determine the firmware version information of the firmware to be updated for the target device from the first database;
[0048] Step 120: Based on the product identification code, determine all firmware versions of the firmware to be updated from the second database;
[0049] Step 130: Based on the update download frequency of each firmware version among all firmware versions, determine the target firmware version of the firmware to be updated from all firmware versions;
[0050] Step 140: Based on the target firmware version, update the firmware to be updated, and use the version information of the target firmware version as the firmware version information of the firmware to be updated in the first database.
[0051] The firmware update method provided by this invention can be executed by an electronic device, a component within the electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), or personal computer (PC), etc. This invention does not impose specific limitations.
[0052] The following describes the technical solution of the present invention in detail using a computer executing the firmware update method provided by the present invention as an example.
[0053] In step 110, based on the product identification code of the target device, the firmware version information of the firmware to be updated for the target device corresponding to the product identification code is searched in the first database.
[0054] The first database stores the association between the device's product identification code and the firmware version information of the device to be updated. By searching the first database based on the target device's product identification code, the firmware version information of the target device to be updated can be found.
[0055] The product identification code of the target device can be a custom SN (Serial Number). The product identification code records the device information of the target device. The product identification code can be affixed to the target device as a QR code or barcode. Using an image acquisition device, scanning the product identification code can retrieve the information contained within it.
[0056] Optionally, the product identification code of the target device can be determined in a customized way. For example, the product identification code of the target device can be defined based on the user type and the model information of the target device.
[0057] For example, users are coded as follows: ordinary users are defined as "TY". Key users are defined as "A1", "A2", "B1", "B2", etc. Confidential users are defined as "BM1", "BM2", etc.
[0058] The rules for establishing product identification codes are divided into three parts: the first part is the target device model information, the second part is the user information, and the third part is a 6-digit number. Each part is separated by a hyphen "_". The resulting product identification code can be:
[0059] Regular users: NF5280M5_TY_000001; NX5180M5_TY_000001;
[0060] Key users: NF5280M5_A1_000001; NX5180M5_A1_000001;
[0061] Confidential users: NF5280M5_BM1_000001; NX5180M5_BM1_000001.
[0062] The first database stores firmware version information for each firmware in various types of devices. The firmware version information refers to the current firmware version. If the device has not been updated since leaving the factory, the firmware version information is the version of the firmware at the time of manufacture. If the firmware version has been updated since leaving the factory, the firmware version information is the updated firmware version.
[0063] The product identification code serves as an index to the corresponding firmware version information. That is, based on the product identification code, the firmware version information of the target device with root firmware can be determined from the first database.
[0064] In step 120, based on the product identification code of the target device in step 110, all firmware versions of the firmware to be updated are determined from the second database. The second database stores all firmware versions corresponding to each product identification code.
[0065] The second database stores all the versions required for different firmware updates, and the product identifier code serves as an index for all corresponding firmware versions within the second database. In other words, based on the target device's product identifier code, all firmware versions of the target device to be updated can be determined from the second database.
[0066] During product development, the firmware version to be updated will be continuously updated. Therefore, the second database will contain newly added firmware versions among all firmware versions of the target device to be updated.
[0067] Optionally, a firmware maintenance module can be created to add new firmware versions, including the following attributes: Name field, Upload file field, Update description field (e.g., what features were added and what bugs were fixed), and Firmware compatibility field (divided into minimum compatibility and mandatory compatibility). Clicking "Upload File" will automatically retrieve the name of the new firmware package and upload it to the Name field. Then, fill in the Update description and Firmware Compatibility attributes, and click "Save" to save the new firmware.
[0068] Create a tool maintenance module, including attributes: a name field and an upload file field. Clicking "Upload File" will automatically retrieve the tool package name and upload it to the name field. Clicking "Save" will save the tool.
[0069] A "bulk firmware association" function can be established, which can associate newly added firmware with multiple different server models. Clicking the "bulk firmware association" button will retrieve all server models stored in the third-party database, open the tree node of all server models, select the model information applicable to the firmware in the tree node, click save, and start synchronizing to each model (e.g., NF5280M5, NX5180M5) until all associated models are synchronized.
[0070] When the newly added firmware includes applicable models, you can click the "Batch Firmware Association" button again to add this model to the tree node. It will be maintained synchronously under this model, and other existing association relationships will remain unchanged.
[0071] In step 130, after determining all firmware versions of the firmware to be updated from the second database, the target firmware version of the firmware to be updated is determined from all firmware versions based on the update download frequency of each firmware version among all firmware versions.
[0072] After identifying all firmware versions to be updated, determine the update loading frequency for each firmware version within the firmware to be updated. Each time the firmware to be updated downloads its corresponding update, count the number of downloads for each firmware version in the database.
[0073] After identifying all firmware versions to be updated from the second database, the update download frequency for each firmware version can be determined by examining the download counts. Based on the update download frequencies of each firmware version across all firmware versions, the target firmware version is then identified.
[0074] Understandably, there are usually multiple firmware versions available for updates, and many users find it difficult to distinguish between them, preferring to download only a stable and usable version. Based on the download frequency of each firmware version, the most frequently downloaded version can be selected as the target firmware version for subsequent updates. If all firmware versions include multiple stable and regular versions, the most frequently downloaded stable version can also be selected as the target firmware version.
[0075] In step 140, based on the target firmware version determined in step 130, the firmware to be updated is updated, and the version information of the firmware to be updated is used as the firmware version information of the firmware to be updated in the first database, thereby realizing the update of the firmware version information of the firmware to be updated in the first database.
[0076] After determining the target firmware version, the system automatically selects the target firmware version for the next update from the firmware to be updated. Based on the determined target firmware version, the firmware to be updated is then updated. After the update is complete, the current version information of the firmware to be updated stored in the second database needs to be further updated. The version information of the target firmware version is then used as the firmware version information of the firmware to be updated in the first database, thus realizing the update process of the firmware version information of the firmware to be updated in the first database.
[0077] The firmware update method provided in this invention uses the product identifier code of the target device to determine the firmware version information of the firmware to be updated and all firmware versions of the firmware to be updated in the first database. Based on the correspondence between the product identifier code and the firmware to be updated, the method of querying firmware according to model is transformed into a method of querying according to the device's product identifier code, which facilitates users to quickly and accurately obtain the firmware update version. The target firmware version for the update is determined according to the update download frequency of each firmware version, realizing automatic selection of the firmware update version among the firmware to be updated and improving the efficiency of firmware update version selection.
[0078] In one embodiment, before determining the firmware version information of the firmware to be updated of the target device from the first database based on the product identification code of the target device, the method further includes: determining the product identification code of the target device based on the model information and user type information of the target device; determining the association between the product identification code and the firmware to be updated of the target device; and storing the association and the firmware version information of the firmware to be updated in the first database.
[0079] By identifying the firmware version information of the target device's firmware to be updated, a correlation is established between the target device's product identification code and the firmware to be updated, so that after obtaining the target device's product identification code, the firmware to be updated can be quickly determined based on the correlation.
[0080] Based on the target device's model information and user type information, the product identification code of the target device is determined.
[0081] For example, users are coded: ordinary users are defined as "TY". Key users are defined as "A1", "A2", "B1", "B2", etc. Confidential users are defined as "BM1", "BM2", etc. The determined product identification code can be divided into three parts: the first part is the target device model information, the second part is the different user information, and the third part is a 6-digit number information, with each part separated by a hyphen "_". The resulting product identification code can be:
[0082] Regular users: NF5280M5_TY_000001; NX5180M5_TY_000001;
[0083] Key users: NF5280M5_A1_000001; NX5180M5_A1_000001;
[0084] Confidential users: NF5280M5_BM1_000001; NX5180M5_BM1_000001.
[0085] The association between the product identification code and the firmware to be updated for the target device is determined, and the association and the firmware version information of the firmware to be updated are stored in a first database. This allows the firmware version information of the target device to be updated to be retrieved from the first database after obtaining the product identification code of the target device.
[0086] The firmware update method provided in this invention uses the product identification code of the target device to determine the firmware version information of the firmware to be updated and all firmware versions of the firmware to be updated in the first database. Based on the association between the product identification code and the firmware to be updated, the method of querying firmware corresponding to the model is converted into the method of querying the product identification code of the device, which facilitates users to quickly and accurately obtain the firmware update version.
[0087] In one embodiment, after determining the product identification code of the target device based on the model information and user type information of the target device, the method further includes: determining a first-level index of the product identification code based on the model information of the target device; determining a second-level index of the product identification code based on the user type information of the target device; constructing an index structure for storing the product identification code in a third database based on the first-level index and the second-level index; and storing the product identification code in the third database based on the index structure.
[0088] After determining the product identification code of the target device, the determined product identification code is stored in a third database for easy retrieval and subsequent access. To further facilitate the storage and retrieval of the product identification code, the product identification code is split, and an index for storing the product identification code can be created based on the target device's model information and user type information.
[0089] The user type information of the target device refers to the type of user using the target device. For example, the user type of the target device can be a regular user, a key user, or a confidential user.
[0090] Based on the target device's model information, determine the first-level index of the product identification code. Based on the target device's user type information, determine the second-level index of the product identification code. Based on the determined first-level and second-level indexes, construct the index structure for storing the product identification code in the third database. Based on the determined index structure, store the product identification code in the third database.
[0091] Understandably, the constructed index structure can improve the speed of product identification code storage and retrieval in subsequent processes.
[0092] The firmware update method provided in this invention determines a first-level index and a second-level index of the product identification code based on the target device's model information and user type information. Based on the determined first-level and second-level indexes, an index structure for storing the product identification code in a third database is constructed. This constructed index structure improves the speed of product identification code storage and retrieval in subsequent processes.
[0093] In one embodiment, determining the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version in all firmware versions includes: obtaining multiple stable firmware versions of the firmware to be updated from each firmware version, and selecting the firmware version with the highest update download frequency from the multiple stable firmware versions as the target firmware version of the firmware to be updated.
[0094] When selecting the target firmware version for the final update from all firmware versions corresponding to the product identification code, the update download frequency can be used as a basis. The update download frequency is determined by statistically analyzing historical user updates to the firmware version selected from all firmware versions.
[0095] The firmware to be updated typically includes multiple versions, such as test versions and stable versions. The stable version is the one that has been tested multiple times and can run stably on the target device.
[0096] Multiple stable firmware versions are selected from all firmware versions, and the firmware version with the highest update download frequency is selected from these stable firmware versions as the target firmware version to be updated, thus achieving automatic determination of the target firmware version.
[0097] The firmware update method provided in this invention automatically determines the target firmware version by selecting multiple stable firmware versions from all firmware versions and then selecting the firmware version with the highest update download frequency from among the multiple stable firmware versions as the target firmware version to be updated.
[0098] In one embodiment, determining the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version includes: when the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, determining, from the update download frequencies of each firmware version, the first download version with the highest update download frequency of the first firmware to be updated and the second download version with the highest update download frequency of the second firmware to be updated; obtaining multiple paired download versions of the first firmware to be updated and the second firmware to be updated, and determining the third download frequency with the highest update download frequency among the multiple paired download versions; if the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency that is a preset multiple, then taking the paired download version corresponding to the third download frequency as the target firmware version of the firmware to be updated.
[0099] It is understandable that a single firmware update for a target device may involve multiple firmware updates. That is, the firmware to be updated may include a first firmware update and a second firmware update. When the firmware to be updated includes both a first and a second firmware update, the frequency of each firmware version's update download can be used to determine the update frequency.
[0100] Specifically, based on the update download frequency of each firmware version, the first download version with the highest update download frequency for the first firmware to be updated and the second download version with the highest update download frequency for the second firmware to be updated are determined.
[0101] Obtain multiple paired download versions of the first and second firmware updates. These paired download versions are the versions of the first and second firmware updates selected simultaneously when both need to be downloaded and upgraded. Generally, multiple paired download versions are included in all firmware versions. Determine the third download version with the highest update frequency among these paired download versions.
[0102] If the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency of a preset multiple, the download version corresponding to the third download frequency will be used as the target firmware version to be updated. The preset multiple can be manually set as needed.
[0103] The firmware update method provided in this invention can automatically determine the target firmware version when the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, based on the update download frequency of each firmware version among all firmware versions.
[0104] In one embodiment, after determining the third download frequency with the highest update download frequency among the plurality of paired download versions, the method further includes: if the sum of the first download frequency of the first download version and the second download frequency of the second download version is greater than a third download frequency of a preset multiple, then the first download version is taken as the target firmware version of the first firmware to be updated, and the second download version is taken as the target firmware version of the second firmware to be updated.
[0105] When the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, if the sum of the first download frequency of the first download version and the second download frequency of the second download version is greater than a preset multiple of the third download frequency, it can be said that the first download frequency and the second download frequency are relatively high. Therefore, the first download version is taken as the target firmware version of the first firmware to be updated, and the second download version is taken as the target firmware version of the second firmware to be updated.
[0106] The firmware update method provided in this invention, when the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, and when the sum of the first download frequency of the first download version and the second download frequency of the second download version is used, the first download version is used as the target firmware version of the first firmware to be updated, and the second download version is used as the target firmware version of the second firmware to be updated, achieves automatic determination of the target firmware version when the firmware to be updated includes multiple firmwares.
[0107] The following is a flowchart illustrating an application of the firmware update method provided by this invention. Figure 2 For example, the technical solution provided by this invention will be explained:
[0108] Step 210: Construct the device's product identification code (SN code). First, define the user type information using codes: ordinary users are defined as "TY". Key users are defined as "A1", "A2", "B1", "B2", etc. Confidential users are defined as "BM1", "BM2", etc.
[0109] The device's serial number (SN) is used as the device's product identification code. The SN code is structured into three parts: the first part is the device model information; the second part is the user type information; and the third part is a 6-digit number. Each part is separated by a hyphen (_). Example of a generated SN:
[0110] Regular users: NF5280M5_TY_000001; NX5180M5_TY_000001;
[0111] Key users: NF5280M5_A1_000001; NX5180M5_A1_000001;
[0112] Confidential users: NF5280M5_BM1_000001; NX5180M5_BM1_000001.
[0113] Step 220: Establish a firmware package naming rule corresponding to the firmware version of the firmware to be updated. When the firmware of the device includes BIOS firmware and BMC firmware, establish a rule for naming the firmware package corresponding to the firmware version. The name is divided into five parts: the first part is model information, the second part is different user type information, the third part is firmware version information, the fourth part is the corresponding firmware version information of the other type of firmware matched with this firmware, and the fifth part is the version information of the tool matching this firmware. Each part is separated by a short line "_". Example of firmware package:
[0114] Regular users: BIOS_TY_SV1_CV1_TV1; BMC_TY_SV1_CV1_TV1;
[0115] Key users: BIOS_A1_SV1_CV1_TV1; BMC_A1_SV1_CV1_TV1;
[0116] Confidential users: BIOS_A1_SV1_CV1_TV1; BMC_A1_SV1_CV1_TV1;
[0117] Establish a naming rule for the tool kit that firmware package update depends on. The name is divided into two parts: the first part is type information, the second part is version information, and each part is separated by a short line "_".
[0118] Example of tool kit: BIOS tool kit: BIOS_TV1; BMC tool kit: BMC_TV1;
[0119] Step 230: Construct a third database and store SN codes in the third database. The storage structure of the constructed third database is as follows Figure 3The schematic diagram of the third database storage structure provided by this invention is shown. After the production line equipment is manufactured, a unique SN code is generated for each server device according to the SN code rules, based on model information and user type information. When an SN is uploaded to the third database, the uploaded SN number (NF5280M5_TY_000001) is retrieved first. The data before the first underscore is extracted as the server model information (NF5280M5). The first two characters of the model number (e.g., NF, NX, etc.) are extracted as the first-level classification (NF series, NX series, etc.). Simultaneously, a deduplication mechanism is established to avoid constructing duplicate hierarchical classifications. Then, the model information is named (NF5280M5) as the second-level classification (NF5280M5, NX5180M5, etc.), and a deduplication mechanism is established. Then, the customer information (TY) between the first and second underscores is extracted and named as the third-level classification (TY), and a deduplication mechanism is established. Finally, the uploaded serial numbers (SNs) are stored according to the naming rules into their respective third-level categories (NF5280M5_TY_000001, NF5280M5_TY_000002, etc.). This achieves the goal of storing the acquired SNs into the third database.
[0120] Step 240: Construct the first database to store the serial number (SN) and its corresponding firmware version. When the server equipment is shipped, a BIOS and BMC version are installed. The SN information of this machine is associated with the BIOS and BMC versions installed on the device and stored in the first database (i.e., NF5280M5_TY_000001:BIOS_SV1:BMC_CV1). When a user selects and downloads the corresponding BIOS and BMC versions from the webpage, the SN information and the selected BIOS and BMC versions are retrieved, the firmware correspondence under the SN is updated, and stored in the first database. The association relationships stored in the first database are shown in Table 1, the first database association table.
[0121] Table 1. First Database Relationship Table
[0122] NF5280M5_TY_000001 SV1 CV1 …… …… …… …… …… ……
[0123] Step 250: Construct a second database to store the correspondence between each SN code and all its corresponding firmware versions. The correspondence between each SN code and its corresponding firmware versions is shown in Table 2, "SN Code to All Firmware Versions Table."
[0124] Table 2 shows the corresponding firmware versions for each SN code.
[0125] NF5280M5_TY_000001 SV1, SV2, SV3, SV4... CV1, CV2, CV3, CV4... …… …… ……
[0126] Step 260: Based on the update download frequency of each firmware version in all firmware versions in the second database, filter all firmware versions.
[0127] During backend data maintenance:
[0128] Create a firmware maintenance module, including the following attributes: Name field, Upload file field, Update description field (e.g., what features were added in the version, what bugs were fixed), and Firmware compatibility field (divided into minimum compatibility and mandatory compatibility). Click Upload File, and the firmware maintenance module will automatically retrieve the firmware package name and upload it to the Name field. Then, fill in the update description and firmware compatibility attributes, and click Save to save the firmware.
[0129] Create a tool maintenance module, including attributes: a name field and an upload file field. Clicking "Upload File" will automatically retrieve the tool package name and upload it to the name field. Clicking "Save" will save the tool.
[0130] Batch addition and association can be performed on the firmware. The specific process is as follows: Figure 4 The diagram illustrating the batch firmware version association provided by this invention illustrates how a "batch firmware association function" can be established to associate firmware with specific server device models. Clicking the "Batch Firmware Association" button retrieves all server device models from the third database, opens a tree node for all server device models, allows users to select the applicable firmware models within the tree node, and clicks "Save" to begin synchronization to each model (e.g., NF5280M5, NX5180M5) until all associated models are synchronized.
[0131] When applicable models are added to this firmware, you can click the "Batch Firmware Association" button again to add this model to the tree node. It will be maintained synchronously under this model, and other existing association relationships will remain unchanged.
[0132] When new firmware is added and associated with a specific model, the specific association process is as follows: Figure 5The newly added firmware association diagram provided by this invention is shown below. (For example: NF5280M5). Based on its model information NF5280M5, the same second-level NF5280M5 is retrieved from the third database. Then, the associated firmware information (BIOS_TY_SV1_CV1_TV1) is retrieved. Based on the second part of the firmware (the information between the first and second underscores of the firmware name), i.e., the customer information TY, the same third-level (TY) is retrieved from the second-level NF5280M5 in the third database, and this firmware is associated with the third-level TY. All individual SN codes under the third-level TY are retrieved, and each individual SN code is associated with all firmware under the third-level TY, and stored in the second database. When a new SN code or new firmware is added under the third-level TY, the association between the individual SN code and all firmware under the third-level TY is updated, and the second database is updated. The process of updating the second database is as follows: Figure 6 The second database update diagram provided by this invention is shown.
[0133] When querying on the front end:
[0134] The specific query process is as follows: Figure 7 The firmware version query process provided by this invention is illustrated in the diagram. The user enters their server's serial number (SN) in the SN query box and clicks the "Query" button. The system then compares the entered SN with the SN from a third-party database. If no matching SN is found, the system prompts, "Your input is incorrect; please check and re-enter." If a matching SN is found (e.g., NF5280M5_TY_000001):
[0135] The system calls the first database to retrieve the same serial number (SN) (NF5280M5_TY_000001). It then queries the BIOS and BMC versions installed under this SN, recording them as A1 and A2 (the current SN (server) installation versions). Next, it checks the model and customer information (i.e., the information before the second underscore) of this SN, filtering for all SNs with identical model and user type information. It then retrieves the BIOS and BMC version information for all SNs, filtering for the most frequent BIOS version, recording it as B1. Next, it filters for the most frequent BMC version, recording it as B2. Finally, it filters for the most frequent version pairings, recording them as C1:C2. The system then calls the second database to retrieve all firmware entries (including BIOS and BMC) under this SN, querying the type information for each firmware (i.e., the information before the first underscore), categorizing them into BIOS and BMC types. Under the BIOS category, the latest version of the BIOS is selected by comparing the version information of each BIOS (i.e., the information between the second and third underscores), and recorded as D1. Under the BMC category, the latest version of the BMC is selected by comparing the version information of each BMC (i.e., the information between the second and third underscores), and recorded as D2.
[0136] When displaying query results on the webpage: only the latest version, the most stable version, and the current SN code (server) installation version are shown. These are categorized into two types based on BIOS and BMC, as illustrated in Table 3.
[0137] Table 3. Illustration of webpage display
[0138]
[0139] Under "Current SN Code (Server Device) Installation Version": Retrieve the BIOS version A1 and BMC version A2 of the currently installed SN code, and display them in "Current SN Code (Server) Installation Version". Refer to Table 4 for an illustration of the current SN Code (Server Device) installation version displayed on the webpage:
[0140] Table 4 shows the current SN code installation version displayed on the webpage.
[0141]
[0142] Under "Most Stable Version": The most frequent BIOS version B1 and the most frequent BMC version B2, as well as the most frequent pairing relationship C1:C2, were retrieved and compared.
[0143] Referring to Table 5, which shows the most stable version displayed on the webpage (B1+B2≤C1+C2), when the sum of the frequency of BIOS version B1 and the frequency of BMC version B2 is less than or equal to 2 × the number of versions with the highest frequency of pairing relationships, C1:C2 (i.e., B1+B2≤C1+C2), then the most stable version displays BIOS version C1 and BMC version C2, and binds the association relationship β1 between the two versions. The 2 × number of versions with the highest frequency of pairing relationships needs to be multiplied by two because C1:C2 and C2:C1 are paired together.
[0144] Table 5 shows the most stable version displayed on the webpage.
[0145] Most stable version C1 C2
[0146] When the sum of the frequency of BIOS version B1 and the frequency of BMC version B2 is greater than 2 × the number of corresponding relationships between versions with the highest frequency of pairing (C1:C2) (i.e., B1+B2>C1+C2), determine the frequency relationship between B1 and B2:
[0147] When the frequency of B1 is greater than or equal to the frequency of B2, the B1 version is used as the stable version of the BIOS, as shown in Table 6, which displays the most stable version (B1+B2>C1+C2 and B1≥B2).
[0148] Table 6 shows an example of the most stable version displayed on the webpage.
[0149]
[0150] Retrieve the "Matching Relationship Attribute" for this BIOS version: When the matching relationship attribute is "Forced Matching", retrieve the strongly matched BMC firmware version CV1 (i.e., the version information of the 3rd and 4th "_" in the BIOS B1 firmware package), display BIOS B1 and BMC CV1 under the most stable version, and bind the association relationship β2 between the two versions; when the matching relationship attribute is "Minimum Matching", filter out all SN codes using version B1, retrieve all BMC versions matched with all SN codes, filter out the BMC version with the highest frequency, record it as B2-1, display BIOS B1 and BMC B2-1 under the most stable version, and bind the association relationship β3 between the two versions.
[0151] When the frequency of B1 is less than that of B2, B2 is used as the stable version of BMC, as shown in Table 7, which displays the most stable version (B1+B2>C1+C2 and B1<B2). The "pairing relationship attribute" of this BMC version is retrieved: When the pairing relationship attribute is "forced pairing," the strongly paired BIOS firmware version SV1 is retrieved (i.e., the version information of the 3rd and 4th underscores in the B2 version firmware package of BMC). The B2 version of BMC and the SV1 version of BIOS are displayed under the most stable version, and the association relationship β4 between the two versions is bound. When the pairing relationship attribute is "minimum pairing," all SN codes using the B2 version of BMC are filtered out, and the BIOS versions paired with all SN codes are retrieved. The BIOS version with the highest frequency is filtered out and recorded as B1-1. The B2 version of BMC and the B1-1 version of BIOS are displayed under the most stable version, and the association relationship β5 between the two versions is bound.
[0152] Table 7 shows the most stable version displayed on the webpage.
[0153]
[0154] Under "Latest Version", retrieve the filtered latest versions of BIOS (D1) and BMC (D2) from the webpage. Then, search for the compatibility attributes of BIOS (D1), as shown in Table 8, which displays the latest version example: ① When both BIOS (D1) and BMC (D2) have strong compatibility relationships, use BIOS (D1) as the base (discard BMC (D2)) to retrieve the forced compatibility version of BIOS (D1) – BMC (CV5). These two firmware versions, BIOS (D1) and BMC (CV5), are displayed under "Latest Version" and bound to the association α1. ② When BIOS (D1) has a strong compatibility relationship but BMC (D2) does not, use BIOS (D1) as the base (discard BMC (D2)) to retrieve the forced compatibility version of BIOS (D1) – BMC (CV5). These two firmware versions, BIOS (D1) and BMC (CV5), are displayed under "Latest Version" and bound to the association α2. ③ When BMC D2 has a strong pairing relationship and BIOS D1 does not, use BMC D2 as the baseline (discard BIOS D1), retrieve the forced pairing version BIOS SV4 of BMC D2, and display these two firmware versions, BMCD2 and BIOS SV5, under "Latest Version," and bind the association relationship α3. ④ When neither BIOS D1 nor BMC D2 has a strong pairing relationship, display these two versions of BIOS D1 and BMC D2 under "Latest Version," and bind the association relationship α4.
[0155] Table 8 shows a sample of the latest version displayed on the webpage.
[0156]
[0157] When a customer selects a firmware version and clicks download, the specific download process is as follows: Figure 8 The download process provided by this invention is illustrated in the following diagram. (For example: Select the latest version of BIOS D1), retrieve this BIOS D1 version file, and wait for download (File 1). Then, based on the type information (BIOS) of this BIOS D1 firmware and the version information of the tool that accompanies this BIOS D1 firmware (e.g., TV3, i.e., the version information of the 4th and 5th underscores in the BIOS package name), retrieve the corresponding tool package (e.g., BIOS_TV3), and wait for download (File 2). Then, query the association relationship of this BIOS D1 firmware (e.g., α1), retrieve the BMCCV5 firmware, retrieve this file, and wait for download (File 3). Then, based on the type information (BMC) of this BMC CV5 firmware and the version information of the tool that accompanies this BMC CV5 firmware (e.g., TV4, i.e., the version information of the 4th and 5th underscores in the BMC package name), retrieve the corresponding tool package (e.g., BMC_TV4) (File 4). Download files 1, 2, 3, and 4 together to the client.
[0158] Figure 9 This is a schematic diagram of the firmware update device provided by the present invention, as shown below. Figure 9 As shown, the device includes:
[0159] Version acquisition module 910 is used to determine the firmware version information of the firmware to be updated of the target device from the first database based on the product identification code of the target device;
[0160] Version lookup module 920 is used to determine all firmware versions of the firmware to be updated from the second database based on the product identification code;
[0161] Version determination module 930 is used to determine the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions;
[0162] The update module 940 is used to update the firmware to be updated based on the target firmware version, and to use the version information of the target firmware version as the firmware version information of the firmware to be updated in the first database.
[0163] The firmware update device provided in this invention, based on the correspondence between product identification codes and firmware to be updated, transforms the method of querying firmware corresponding to a specific model into a method of querying based on the device's product identification code, facilitating users to quickly and accurately obtain firmware update versions. By determining the target firmware version for updating based on the update download frequency of each firmware version, it achieves automatic selection of firmware update versions among the firmware to be updated, improving the efficiency of firmware update version selection.
[0164] In one embodiment, the version acquisition module 910 is specifically used for:
[0165] Before determining the firmware version information of the target device's firmware to be updated from the first database based on the target device's product identification code, the process also includes:
[0166] Based on the model information and user type information of the target device, the product identification code of the target device is determined;
[0167] The association between the product identification code and the firmware to be updated of the target device is determined, and the association and the firmware version information of the firmware to be updated are stored in the first database.
[0168] In one embodiment, the version acquisition module 910 is further specifically used for:
[0169] After determining the product identification code of the target device based on the model information and user type information of the target device, the process further includes:
[0170] Based on the model information of the target device, determine the first-level index of the product identification code;
[0171] Based on the user type information of the target device, determine the second-level index of the product identification code;
[0172] Based on the first-level index and the second-level index, an index structure for storing the product identification code in the third database is constructed, and based on the index structure, the product identification code is stored in the third database.
[0173] In one embodiment, the version determination module 930 is specifically used for:
[0174] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions, including:
[0175] Multiple stable firmware versions of the firmware to be updated are obtained from the various firmware versions. From the multiple stable firmware versions, the firmware version with the highest update download frequency is selected as the target firmware version of the firmware to be updated.
[0176] In one embodiment, the version determination module 930 is further specifically used for:
[0177] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions, including:
[0178] When the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, the first download version with the highest update download frequency of the first firmware to be updated and the second download version with the highest update download frequency of the second firmware to be updated are determined from the update download frequency of each firmware version.
[0179] Obtain multiple download versions that are used in combination to download the first firmware to be updated and the second firmware to be updated, and determine the third download version with the highest update download frequency among the multiple download versions;
[0180] If the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency that is a preset multiple, then the download version corresponding to the third download frequency is taken as the target firmware version of the firmware to be updated.
[0181] In one embodiment, the version determination module 930 is further specifically used for:
[0182] After determining the third download frequency with the highest update frequency among the multiple downloadable versions, the process also includes:
[0183] If the sum of the first download frequency of the first download version and the second download frequency of the second download version is greater than a third download frequency of a preset multiple, then the first download version is taken as the target firmware version of the first firmware to be updated, and the second download version is taken as the target firmware version of the second firmware to be updated.
[0184] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10 As shown, the electronic device may include: a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communications interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute a firmware update method, which includes:
[0185] Based on the product identification code of the target device, the firmware version information of the firmware to be updated of the target device is determined from the first database;
[0186] Based on the product identification code, all firmware versions of the firmware to be updated are determined from the second database;
[0187] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions;
[0188] Based on the target firmware version, the firmware to be updated is updated, and the version information of the target firmware version is used as the firmware version information of the firmware to be updated in the first database.
[0189] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0190] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is able to execute the firmware update method provided by the above methods, the method comprising:
[0191] Based on the product identification code of the target device, the firmware version information of the firmware to be updated of the target device is determined from the first database;
[0192] Based on the product identification code, all firmware versions of the firmware to be updated are determined from the second database;
[0193] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions;
[0194] Based on the target firmware version, the firmware to be updated is updated, and the version information of the target firmware version is used as the firmware version information of the firmware to be updated in the first database.
[0195] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the firmware update methods provided above, the method comprising:
[0196] Based on the product identification code of the target device, the firmware version information of the firmware to be updated of the target device is determined from the first database;
[0197] Based on the product identification code, all firmware versions of the firmware to be updated are determined from the second database;
[0198] Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions;
[0199] Based on the target firmware version, the firmware to be updated is updated, and the version information of the target firmware version is used as the firmware version information of the firmware to be updated in the first database.
[0200] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0201] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A firmware update method, characterized in that, The method includes: Based on the product identification code of the target device, the firmware version information of the firmware to be updated of the target device is determined from the first database; Based on the product identification code, all firmware versions of the firmware to be updated are determined from the second database; Based on the update download frequency of each firmware version among all firmware versions, the target firmware version of the firmware to be updated is determined from all firmware versions; Based on the target firmware version, the firmware to be updated is updated, and the version information of the target firmware version is used as the firmware version information of the firmware to be updated in the first database; The step of determining the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions includes: When the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, the first download version with the highest update download frequency of the first firmware to be updated and the second download version with the highest update download frequency of the second firmware to be updated are determined from the update download frequency of each firmware version. Obtain multiple download versions that are used in combination to download the first firmware to be updated and the second firmware to be updated, and determine the third download version with the highest update download frequency among the multiple download versions; If the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency that is a preset multiple, then the download version corresponding to the third download frequency is taken as the target firmware version of the firmware to be updated.
2. The firmware update method according to claim 1, characterized in that, Before determining the firmware version information of the target device's firmware to be updated from the first database based on the target device's product identification code, the process also includes: Based on the model information and user type information of the target device, the product identification code of the target device is determined; The association between the product identification code and the firmware to be updated of the target device is determined, and the association and the firmware version information of the firmware to be updated are stored in the first database.
3. The firmware update method according to claim 2, characterized in that, After determining the product identification code of the target device based on the model information and user type information of the target device, the process further includes: Based on the model information of the target device, determine the first-level index of the product identification code; Based on the user type information of the target device, determine the second-level index of the product identification code; Based on the first-level index and the second-level index, an index structure for storing the product identification code in the third database is constructed, and based on the index structure, the product identification code is stored in the third database.
4. The firmware update method according to claim 1, characterized in that, The step of determining the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions includes: Multiple stable firmware versions of the firmware to be updated are obtained from the various firmware versions. From the multiple stable firmware versions, the firmware version with the highest update download frequency is selected as the target firmware version of the firmware to be updated.
5. The firmware update method according to claim 1, characterized in that, After determining the third download frequency with the highest update frequency among the multiple paired download versions, the process also includes: If the sum of the first download frequency of the first download version and the second download frequency of the second download version is greater than a third download frequency of a preset multiple, then the first download version is taken as the target firmware version of the first firmware to be updated, and the second download version is taken as the target firmware version of the second firmware to be updated.
6. A firmware update device, characterized in that, include: The version acquisition module is used to determine the firmware version information of the firmware to be updated of the target device from the first database based on the product identification code of the target device; The version lookup module is used to determine all firmware versions of the firmware to be updated from the second database based on the product identification code. The version determination module is used to determine the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions; The update module is used to update the firmware to be updated based on the target firmware version, and use the version information of the target firmware version as the firmware version information of the firmware to be updated in the first database; The step of determining the target firmware version of the firmware to be updated from all firmware versions based on the update download frequency of each firmware version among all firmware versions includes: When the firmware to be updated includes a first firmware to be updated and a second firmware to be updated, the first download version with the highest update download frequency of the first firmware to be updated and the second download version with the highest update download frequency of the second firmware to be updated are determined from the update download frequency of each firmware version. Obtain multiple download versions that are used in combination to download the first firmware to be updated and the second firmware to be updated, and determine the third download version with the highest update download frequency among the multiple download versions; If the sum of the first download frequency of the first download version and the second download frequency of the second download version is less than or equal to a third download frequency that is a preset multiple, then the download version corresponding to the third download frequency is taken as the target firmware version of the firmware to be updated.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the firmware update method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the firmware update method as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the firmware update method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Firmware upgrading method of equipment, equipment and medium
CN111158717A