CN-121979557-A - Firmware version configuration loading method, equipment, storage medium and product
Abstract
The embodiment of the disclosure relates to a loading method, equipment, a storage medium and a product of firmware version configuration. The method comprises the steps of obtaining a firmware version configuration template corresponding to a target firmware version, filling an immutable field in the firmware version configuration template based on fixed parameters corresponding to the target firmware version, obtaining a firmware package associated with the target firmware version, wherein the firmware package carries variable field content of the target firmware, filling the variable field in the firmware version configuration template based on the firmware package associated with the target firmware version to load firmware configuration of the target firmware version, and generating a firmware upgrade package.
Inventors
- LIU PEI
Assignees
- 中移物联网有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251211
Claims (10)
- 1. A method for loading a firmware version configuration, the method comprising: Obtaining a firmware version configuration template corresponding to a target firmware version, wherein the firmware version configuration template carries an invariable field corresponding to a fixed parameter and a variable field corresponding to a variable parameter; filling an immutable field in the firmware version configuration template based on fixed parameters corresponding to the target firmware version; acquiring a firmware package associated with the target firmware version, wherein the firmware package carries variable field content of target firmware; and filling variable fields in the firmware version configuration template based on the firmware package associated with the target firmware version to load the firmware configuration of the target firmware version, and generating a firmware upgrade package.
- 2. The method of claim 1, wherein prior to obtaining the firmware version configuration template corresponding to the target firmware version, the method further comprises: and extracting historical firmware version metadata through a rule engine, and generating an immutable field and a variable field in the firmware version configuration template, wherein the immutable field at least comprises a version number and a device type, and the variable field at least comprises a firmware fingerprint and an upgrade policy.
- 3. The method of claim 1, wherein prior to obtaining a firmware version configuration template corresponding to a target firmware version, the method further comprises adding a digital signature to the template to prevent tampering.
- 4. The method of claim 1, wherein prior to retrieving the firmware package associated with the target firmware version, the method further comprises: taking the SHA-256 hash value of the firmware as a firmware fingerprint; constructing a firmware storage path based on the hash value, storing a target firmware based on the firmware storage path, and associating a version number of the target firmware with the firmware fingerprint; If the firmware exists in the firmware storage path, skipping storage operation, and associating the version number of the existing firmware with the firmware fingerprint.
- 5. The method of claim 4, wherein the associating the version number of the target firmware with the firmware fingerprint comprises: Maintaining a version fingerprint mapping table, wherein the mapping table records a firmware fingerprint list and a fingerprint association time line associated with each firmware version; Marking the latest state for each firmware fingerprint, wherein the latest state is automatically updated when the firmware fingerprint is uploaded; A semantic tag or alias is added to each firmware fingerprint.
- 6. The method of claim 1, wherein the populating the variable fields in the firmware version configuration template based on the firmware package associated with the target firmware version to load the firmware configuration of the target firmware version, generating a firmware upgrade package, comprises: multiplexing the template to generate a configuration copy, and updating a variable field of the configuration copy based on the latest firmware fingerprint associated with the target firmware version in the firmware package; And submitting version configuration after checking the version consistency, and generating a firmware upgrade package after checking the compatibility of equipment based on firmware corresponding to the latest firmware fingerprint in the version configuration and an upgrade strategy in the variable field.
- 7. The method of claim 6, wherein the updating the variable field of the configuration copy based on the latest firmware fingerprint associated with the target firmware version in the firmware package comprises: Locating a latest firmware fingerprint according to a latest mark field in the fingerprint association time line; if a plurality of firmware fingerprints with latest marks exist, selecting the firmware fingerprint with the latest firmware uploading time stamp as the latest firmware fingerprint; the variable field of the configuration copy is updated based on the latest firmware fingerprint.
- 8. An electronic device, comprising: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-7.
- 9. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of claims 1-7.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1-7.
Description
Firmware version configuration loading method, equipment, storage medium and product Technical Field The embodiment of the disclosure relates to the technical field of OTA upgrade management, in particular to a loading method, equipment, a storage medium and a product for firmware version configuration. Background In the traditional OTA upgrade management technical scheme, the same version number may correspond to a plurality of firmware files, an effective history record tracing mechanism is lacked, and it is difficult to clearly trace the firmware update process and compare the content differences of the firmware packages. In the step of generating the upgrade package checksum, the integrity of the file needs to be checked again each time, and the verification rule is single, so that automatic generation cannot be realized, and the complexity of manufacturing the upgrade package is further increased. In addition, the storage mode of strong coupling between the firmware file and the version number leads to the fact that the original version and the old upgrade package are required to be deleted and rebuilt when the firmware is updated, the automatic association between the firmware and the version cannot be realized, the repetition rate of the same firmware in different version management is high, the time for regenerating the upgrade package is long, and the flexibility and the high efficiency of the firmware version management are seriously affected. Disclosure of Invention In order to solve the above problems, the present disclosure provides a loading method, device, storage medium and product of firmware version configuration. According to a first aspect of an embodiment of the present disclosure, there is provided a loading method of firmware version configuration, the method including: Obtaining a firmware version configuration template corresponding to a target firmware version, wherein the firmware version configuration template carries an invariable field corresponding to a fixed parameter and a variable field corresponding to a variable parameter; filling an immutable field in the firmware version configuration template based on fixed parameters corresponding to the target firmware version; acquiring a firmware package associated with the target firmware version, wherein the firmware package carries variable field content of target firmware; and filling variable fields in the firmware version configuration template based on the firmware package associated with the target firmware version to load the firmware configuration of the target firmware version, and generating a firmware upgrade package. In one embodiment, before obtaining the firmware version configuration template corresponding to the target firmware version, the method further includes: and extracting historical firmware version metadata through a rule engine, and generating an immutable field and a variable field in the firmware version configuration template, wherein the immutable field at least comprises a version number and a device type, and the variable field at least comprises a firmware fingerprint and an upgrade policy. In one embodiment, before obtaining the firmware version configuration template corresponding to the target firmware version, the method further comprises adding a digital signature to the template to prevent tampering. In one embodiment, before obtaining the firmware package associated with the target firmware version, the method further comprises: taking the SHA-256 hash value of the firmware as a firmware fingerprint; constructing a firmware storage path based on the hash value, storing a target firmware based on the firmware storage path, and associating a version number of the target firmware with the firmware fingerprint; If the firmware exists in the firmware storage path, skipping storage operation, and associating the version number of the existing firmware with the firmware fingerprint. In one embodiment, the associating the version number of the target firmware with the firmware fingerprint includes: Maintaining a version fingerprint mapping table, wherein the mapping table records a firmware fingerprint list and a fingerprint association time line associated with each firmware version; Marking the latest state for each firmware fingerprint, wherein the latest state is automatically updated when the firmware fingerprint is uploaded; A semantic tag or alias is added to each firmware fingerprint. In one embodiment, the filling the variable fields in the firmware version configuration template based on the firmware package associated with the target firmware version to load the firmware configuration of the target firmware version, generating a firmware upgrade package includes: multiplexing the template to generate a configuration copy, and updating a variable field of the configuration copy based on the latest firmware fingerprint associated with the target firmware version in the firmware package; An