Firmware updating method and device of IOS system and storage medium
By generating HTML files, parsing YAML files, and using CI/CD tools to automatically update the firmware repository, the problem of low efficiency in iOS system firmware package management was solved, enabling timely updates and efficient management of firmware versions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-04
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional iOS system firmware package management is inefficient and version updates are not timely, which makes it impossible for testing to cover the latest issues in a timely manner. In addition, manual downloads consume network bandwidth and storage space, making it difficult to achieve continuous 24-hour automated monitoring.
By receiving firmware metadata to generate HTML files, using the BeautifulSoup library to parse them into YAML files, using the pyyaml library to download resource packages, and using CI/CD tools to periodically update the index, the firmware resource repository is automatically built and managed. Users only need to issue commands to obtain the latest firmware.
It enables efficient management and timely updates of iOS system firmware packages, reduces manual operations, improves the efficiency and timeliness of firmware version management, and supports 24/7 monitoring and updates.
Smart Images

Figure CN121635937A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of firmware upgrade, in particular to a firmware update method and device of an IOS system and a storage medium. BACKGROUND
[0002] With the continuous release of new iOS versions and device models by Apple, ensuring software compatibility and stability is crucial for developers and testers. Traditional Apple device flashing regression testing usually relies on manually downloading firmware packages (IPSW files) and finding and selecting the corresponding firmware according to testing needs.
[0003] Current firmware package update management is mainly done manually by engineers, which is time-consuming and labor-intensive, especially when testing a large number of devices and firmware combinations. The efficiency is extremely low, and the latest firmware release cannot be obtained and responded to in time, resulting in testing based on outdated firmware, which cannot cover the latest potential issues. Most firmware packages are large in size, frequent downloading will occupy a large amount of network bandwidth and local storage space, and repeated downloading often occurs. The entire process highly depends on manual operation, making it difficult to achieve 24-hour continuous automated monitoring and testing preparation. Therefore, to solve the current problems of low efficiency and untimely firmware version update of manually managing IOS system firmware packages, a new technology is needed. SUMMARY
[0004] The main purpose of the present application is to solve the technical problems of low efficiency and untimely firmware version update of manually managing IOS system firmware packages.
[0005] The first aspect of the present application provides a firmware update method of an IOS system, which comprises: receiving firmware metadata, and generating a firmware download HTML file based on the firmware metadata; parsing the firmware download HTML file according to a preset BeautifulSoup library to generate a firmware information YAML file; parsing and downloading the firmware information YAML file according to a preset pyyaml library to obtain a firmware resource package; placing all firmware resource packages in a preset resource storage area to generate a firmware resource library; based on a preset CI / CD tool, collecting firmware release pages regularly to generate a firmware update index; updating the firmware resource library based on the firmware update index to obtain an updated firmware resource library; When the firmware update instruction of the user is received, then according to the firmware information corresponding to the firmware update instruction, the updated firmware resource library is queried to obtain an updated firmware package, and the updated firmware package is loaded.
[0006] Optionally, in the first implementation manner of the first aspect of the present application, the step of parsing and downloading the firmware information YAML file according to the preset pyyaml library to obtain the firmware resource package comprises: calling yaml.safe_load() in the preset pyyaml library to convert and process the firmware information YAML file to obtain a python object; calling the preset requests library to download and process the python object to obtain the firmware resource package.
[0007] Optionally, in the second implementation manner of the first aspect of the present application, the step of placing all the firmware resource packages in the preset resource storage area to generate the firmware resource library comprises: placing all the firmware resource packages in the preset resource storage area to generate the firmware resource library and a storage address index; mapping and modifying the storage address index based on the mapping relationship between the firmware information YAML file and the firmware resource package to generate a firmware storage index.
[0008] Optionally, in the third implementation manner of the first aspect of the present application, the step of collecting the firmware release page based on the preset CI / CD tool to generate a firmware update index comprises: collecting the firmware release page based on the preset CI / CD tool to generate a collection release index; judging whether there is a new entry in the collection release index compared with the firmware storage index; when there is a new entry, combining all the new entries in the collection release index compared with the firmware storage index to generate a firmware update index.
[0009] Optionally, in the fourth implementation manner of the first aspect of the present application, the step of updating the firmware resource library based on the firmware update index to obtain an updated firmware resource library comprises: downloading an updated firmware package corresponding to the firmware update index based on the firmware update index; placing the updated firmware package in the preset resource storage area to obtain an updated firmware resource library and a new address index; mapping and modifying the new address index based on the mapping relationship between the firmware update index and the updated firmware package to generate a new firmware storage index; Add the new firmware storage index to the firmware storage index to obtain an updated firmware storage index.
[0010] Optionally, in a fifth implementation form of the first aspect of the application, the step of querying the updated firmware resource library according to the firmware information corresponding to the firmware update instruction to obtain an updated firmware package comprises: querying the updated firmware storage index according to the firmware information corresponding to the firmware update instruction to obtain an index query result; when the index query result is empty, sending instruction exception information to a preset user port; when the index query result is not empty, reading a firmware resource package from the updated firmware resource library according to the index query result to obtain an updated firmware package.
[0011] Optionally, in a sixth implementation form of the first aspect of the application, after the step of loading the updated firmware package, the method further comprises: when the updated firmware package is loaded, sending update notification information to a preset management port, and writing firmware information of the updated firmware package into a preset update log.
[0012] Optionally, in a seventh implementation form of the first aspect of the application, after the step of collecting a firmware release page based on a preset CI / CD tool and generating a firmware update index, the method further comprises: sending the firmware update index to a preset communication interface to synchronize firmware update information.
[0013] The second aspect of the application provides a firmware update device of an IOS system, comprising a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected through a line; the at least one processor invokes the instructions in the memory, so that the firmware update device of the IOS system executes the firmware update method of the IOS system described above.
[0014] The third aspect of the application provides a computer readable storage medium, the computer readable storage medium storing instructions, when the instructions are run on a computer, the computer executes the firmware update method of the IOS system described above.
[0015] In the embodiment of the present application, the firmware metadata is converted into an HTML file, the HTML file format is converted into a structured YAML file by using the BeautifulSoup library, and the YAML file is parsed by using the pyyaml library to batch download the firmware resource package and place the firmware resource package in the designated storage space, thereby completing the construction of the firmware resource library. Through the CI / CD tool, the firmware release webpage is collected regularly, and when the firmware update is detected, the firmware resource library is updated in a timely manner based on the firmware update index. The user only needs to obtain the latest version of the firmware resource in the firmware resource library based on the update instruction, without manually managing the firmware resource package, automatically updating the specified firmware resource package, improving the firmware package management efficiency and timeliness of the IOS system, and solving the technical problems of low efficiency and untimely firmware version update of the current manual management of the firmware package of the IOS system. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 An embodiment of the firmware update method for the IOS system in the embodiment of the present application is shown. Figure 2 An embodiment of the step 103 of the firmware update method for the IOS system in the embodiment of the present application is shown. Figure 3 An embodiment of the step 104 of the firmware update method for the IOS system in the embodiment of the present application is shown. Figure 4 An embodiment of the step 107 of the firmware update method for the IOS system in the embodiment of the present application is shown. Figure 5 An embodiment of the firmware update device for the IOS system in the embodiment of the present application is shown. DETAILED DESCRIPTION
[0017] The embodiment of the present application provides a firmware update method and device for an IOS system and a storage medium.
[0018] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms, and should not be interpreted as being limited to the embodiments described herein, but rather, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes, and are not intended to limit the scope of protection of the present application.
[0019] In the description of the embodiments disclosed herein, the term "comprising" and its similar words are understood to mean "including but not limited to". The term "based on" is understood to mean "based at least in part on". The term "one embodiment" or "the embodiment" is understood to mean "at least one embodiment". The terms "first", "second", etc. can refer to different or the same objects. Other explicit and implicit definitions can also be included below.
[0020] For ease of understanding, the specific process of the embodiments of the present application is described below. Please refer to Figure 1 An embodiment of the firmware update method of the IOS system in the embodiments of the present application is shown in the figure, which includes the following steps: 101, receiving firmware metadata, and generating a firmware download HTML file based on the firmware metadata; In this embodiment, the firmware metadata is obtained from a trusted third-party source (IPSW.me), and the format of the firmware metadata is IPSW file. The firmware metadata includes version number, Build number, file size, SHA-1, release date, download address, etc. The firmware metadata is saved in HTML to generate a firmware download HTML file.
[0021] 102, parsing the firmware download HTML file according to a preset BeautifulSoup library to generate a firmware information YAML file; In this embodiment, the BeautifulSoup library is used to read the version number, Build, SHA1, size, download link, etc. of the firmware download HTML file, and write them into a structured YAML file to generate a firmware information YAML file.
[0022] 103, parsing and downloading the firmware information YAML file according to a preset pyyaml library to obtain a firmware resource package; In this embodiment, the pyyaml library is used to access the download link in the firmware information YAML file, and obtain all firmware resource packages of the specified model from the download link.
[0023] For details, please refer to Figure 2 , Figure 2 An embodiment of the firmware update method of the IOS system in the embodiments of the present application is shown in the figure, which includes the following specific implementation of step 103: 1031, calling yaml.safe_load() in the preset pyyaml library to convert and process the firmware information YAML file to obtain a python object; 1032, calling the preset requests library to download and process the python object to obtain a firmware resource package.
[0024] In steps 1031-1032, first call the yaml.safe_load() in the preset pyyaml library, read each url field of the firmware information YAML file as a python object. Call the requests library, stream download the url field in the python object, and save several GB of ipsw files to the local directory to form a firmware resource package.
[0025] 104, Place all firmware resource packages in a preset resource storage area to generate a firmware resource library; In this embodiment, the firmware packages are uniformly stored in the firmware resource library partition of the storage device to form a centralized and orderly firmware resource collection, thereby generating the firmware resource library.
[0026] For details, please refer to Figure 3 , Figure 3 is a specific embodiment of step 104 of the firmware update method for the IOS system in the embodiment of the application, and step 104 includes the following specific embodiments: 1041, Place all firmware resource packages in a preset resource storage area to generate a firmware resource library and a storage address index; 1042, Based on the mapping relationship between the firmware information YAML file and the firmware resource package, the storage address index is mapped and modified to generate a firmware storage index.
[0027] In steps 1041-1042, all firmware resource packages are placed in the resource storage area, for example, firmware package 1, firmware package 2, and firmware package 3 are stored in the D disk A folder m subfolder, and the storage address index corresponding to each firmware is the D disk A folder m subfolder. The m subfolder is database, and the firmware resource library is obtained. Based on the index chain table association of firmware package 1, firmware package 2, and firmware package 3 corresponding to firmware information 1, firmware information 2, and firmware information 3, the firmware storage index of firmware information 1, firmware information 2, and firmware information 3 stored in the D disk A folder m subfolder is generated. The firmware information includes version number, Build number, file size, SHA-1, release date, download address, and other specific information.
[0028] 105, Based on a preset CI / CD tool, collect firmware release pages at regular intervals to generate a firmware update index; In this embodiment, the CI / CD tool is a continuous integration / continuous deployment tool that can create a pipeline project to automatically execute and automatically publish data, such as Jenkins, GitLab CI, etc. The CI / CD tool is set to collect firmware release pages at regular intervals every hour or every day, and then analyze the newly released version in the firmware based on the firmware release page to generate a firmware update index.
[0029] Specifically, in the 1041-1042 embodiment, the 105 step includes the following specific implementation: 1051, based on the preset CI / CD tool, collect the firmware release page regularly to generate a collection release index; 1052, judge whether there are new entries in the collection release index compared with the firmware storage index; 1053, when there are new entries, combine all new entries in the collection release index compared with the firmware storage index to generate a firmware update index.
[0030] In the 1051-1053 steps, the CI / CD tool collects the firmware release page regularly, and collects the firmware information 1, firmware information 2, firmware information 3, firmware information 4, and firmware information 5 to generate the collection release index. It is analyzed that the firmware information in the collection release index has new entries of firmware information 4 and firmware information 5 compared with the firmware storage index. Then, the firmware information 4 and firmware information 5 are combined to generate the firmware update index.
[0031] Further, after the 105 step, the following specific implementation is also included: 1054, send the firmware update index to a preset communication interface to synchronize the firmware update information.
[0032] In this embodiment, by accessing the communication interface of the instant messaging software, such as the communication interface of Feishu, Dingding, and WeChat for enterprise, the firmware update index information supported by the device is synchronized to the designated group chat in real time, realizing 7*24 hours uninterrupted monitoring and information synchronization.
[0033] 106, based on the firmware update index, update the firmware resource library to obtain an updated firmware resource library; In this embodiment, based on the content of the firmware information 4 and firmware information 5, the firmware resource library is updated in a storage mode similar to the 103-104 steps. For example, the firmware package 4 and firmware package 5 corresponding to the firmware information 4 and firmware information 5 are stored in the D drive A folder n subfolder, and then the relevant new storage information is written into the index of the firmware resource library to obtain the updated firmware resource library.
[0034] Specifically, in the 1051-1053 steps, the 106 step includes the following specific implementation: 1061, based on the firmware update index, download the update firmware package corresponding to the firmware update index; 1062, place the update firmware package in a preset resource storage area to obtain an updated firmware resource library and a new address index; 1063、based on the mapping relationship between the firmware update index and the update firmware package, mapping modification is performed on the new address index to generate a new firmware storage index; 1064、the new firmware storage index is added to the firmware storage index to obtain an updated firmware storage index.
[0035] In steps 1061-1064, similar to the process of 103-104, the corresponding firmware resource package 4, firmware resource package 5 is downloaded based on the firmware information 4, firmware information 5, and then the firmware resource package 4, firmware resource package 5 is stored in the D disk A folder n sub folder, and the firmware resource package 4, firmware resource package 5 and the new address index of the D disk A folder n sub folder are generated.
[0036] Then, the new firmware storage index of the firmware information 4, firmware information 5 and the D disk A folder n sub folder is calculated using the mapping relationship of the firmware resource package 4, firmware resource package 5 corresponding to the firmware information 4, firmware information 5. Finally, the new firmware storage index is added to the back of the original firmware storage index to obtain an updated firmware storage index.
[0037] 107、When receiving a firmware update instruction of a user, the corresponding firmware information of the firmware update instruction is queried to obtain an update firmware package from the updated firmware resource library, and the update firmware package is loaded.
[0038] In this embodiment, when regression testing is needed, the user issues a firmware update instruction, and the corresponding update firmware package is queried from the updated firmware resource library based on the firmware information related to the firmware update instruction, and the loading process of the update firmware package is performed.
[0039] For details, please refer to Figure 4 , Figure 4 For a specific embodiment of step 107 of the firmware update method of the IOS system in the embodiment of the application, step 107 in the embodiment of 1061-1064 includes the following specific implementation: 1071、According to the firmware information corresponding to the firmware update instruction, the updated firmware storage index is queried to obtain an index query result; 1072、When the index query result is empty, send an instruction exception information to a preset user port; 1073、When the index query result is not empty, the firmware resource package is read from the updated firmware resource library according to the index query result to obtain an update firmware package.
[0040] In steps 1071-1073, based on the firmware information corresponding to the firmware update instruction, a query and match is first performed on firmware information 1, firmware information 2, firmware information 3, firmware information 4, and firmware information 5 in the updated firmware storage index to obtain the index query results.
[0041] If the index query result is empty, it means that the firmware resource to be updated by the firmware update command does not exist. In this case, an error message is sent to the preset user port so that the user can check whether there is any error in the specific content of the command.
[0042] If the index query result is not empty, it means that there is matching firmware information in the index query result. Based on the matching firmware information in the index query result, the firmware resource package is read from the updated firmware resource library to obtain the updated firmware package.
[0043] Furthermore, following step 107, the following specific implementation methods are also included: 108. When the updated firmware package is loaded, an update notification message is sent to the preset management port, and the firmware information of the updated firmware package is written into the preset update log.
[0044] In step 108, after the firmware update package is loaded, an update notification message needs to be sent to a preset management port so that users can be informed of the firmware update status in a timely manner. This management port can be different from the communication interface of the communication software. Finally, the firmware information of the updated firmware package is written to a preset update log so that users can view the loading history of each firmware version in a timely manner.
[0045] In this embodiment of the invention, firmware metadata is converted into HTML files, the BeautifulSoup library is used to convert the HTML files into structured YAML files, and the pyyaml library is used to parse the YAML files before batch downloading firmware resource packages. These packages are then placed in designated storage space, completing the construction of the firmware resource library. Using CI / CD tools, firmware release web pages are periodically collected. When a firmware update is detected, the firmware resource library is updated promptly based on the firmware update index. Users only need to follow the update command to obtain the latest version of firmware resources from the firmware resource library, eliminating the need for manual management of firmware resource packages. The automatic update of specified firmware resource packages improves the efficiency and timeliness of firmware package management in the iOS system, solving the technical problems of low efficiency and untimely firmware version updates in current manual management of iOS system firmware packages.
[0046] Figure 5This is a schematic diagram of the structure of an iOS system firmware update device 500 provided in an embodiment of the present invention. The iOS system firmware update device 500 can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 510 and memory 520, and one or more storage media 530 for storing applications 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The programs stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the iOS system firmware update device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the iOS system firmware update device 500.
[0047] The firmware update device 500 based on the iOS system may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, Free BSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated firmware update device structure for iOS systems does not constitute a limitation on firmware update devices based on iOS systems. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0048] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the firmware update method of the iOS system.
[0049] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0050] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0051] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A firmware update method of an IOS system, characterized by, The method comprises the steps of: receiving firmware metadata, and generating a firmware download HTML file based on the firmware metadata; parsing the firmware download HTML file according to a preset BeautifulSoup library to generate a firmware information YAML file; parsing and downloading the firmware information YAML file according to a preset pyyaml library to obtain a firmware resource package; placing all firmware resource packages in a preset resource storage area to generate a firmware resource library; based on a preset CI / CD tool, collecting firmware release pages in a timely manner to generate a firmware update index; based on the firmware update index, updating the firmware resource library to obtain an updated firmware resource library; when a firmware update instruction of a user is received, querying the updated firmware resource library according to firmware information corresponding to the firmware update instruction to obtain an updated firmware package, and loading the updated firmware package.
2. The firmware update method of the IOS system according to claim 1, wherein The step of parsing and downloading the firmware information YAML file according to the preset pyyaml library to obtain the firmware resource package comprises: calling yaml.safe_load() in the preset pyyaml library to convert and process the firmware information YAML file to obtain a python object; calling a preset requests library to download the python object to obtain the firmware resource package.
3. The firmware update method of the IOS system according to claim 1, wherein The step of placing all firmware resource packages in a preset resource storage area to generate a firmware resource library comprises: placing all firmware resource packages in a preset resource storage area to generate a firmware resource library and a storage address index; based on a mapping relationship between the firmware information YAML file and the firmware resource package, mapping and modifying the storage address index to generate a firmware storage index.
4. The firmware update method of the IOS system according to claim 3, wherein The step of collecting firmware release pages in a timely manner based on a preset CI / CD tool to generate a firmware update index comprises: collecting firmware release pages in a timely manner based on a preset CI / CD tool to generate a collection release index; determining whether there are new entries in the collection release index compared with the firmware storage index; when there are new entries, combining all new entries in the collection release index compared with the firmware storage index to generate a firmware update index.
5. The firmware update method of the IOS system according to claim 4, wherein The step of updating the firmware resource library based on the firmware update index to obtain an updated firmware resource library comprises: based on the firmware update index, downloading the updated firmware package corresponding to the firmware update index; placing the updated firmware package in a preset resource storage area to obtain an updated firmware resource library and a new address index; based on a mapping relationship between the firmware update index and the updated firmware package, mapping and modifying the new address index to generate a new firmware storage index; adding the new firmware storage index to the firmware storage index to obtain an updated firmware storage index.
6. The firmware update method of the IOS system according to claim 5, wherein, The step of querying the updated firmware resource library according to firmware information corresponding to the firmware update instruction to obtain an updated firmware package comprises: querying the updated firmware storage index according to firmware information corresponding to the firmware update instruction to obtain an index query result; When the index query result is empty, instruction exception information is sent to a preset user port; When the index query result is not empty, a firmware resource package is read from the updated firmware resource library according to the index query result, and an updated firmware package is obtained.
7. The firmware update method of the IOS system according to claim 1, wherein After the step of loading the updated firmware package, the method further comprises: When the updated firmware package is loaded, update notification information is sent to a preset management port, and firmware information of the updated firmware package is written into a preset update log.
8. The firmware update method of the IOS system according to claim 1, wherein, After the step of collecting a firmware release page based on a preset CI / CD tool and generating a firmware update index, the method further comprises: The firmware update index is sent to a preset communication interface to synchronize firmware update information.
9. A firmware update device of an IOS system, characterized by, The firmware update device of the IOS system comprises a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected through a circuit; The at least one processor calls the instructions in the memory to enable the firmware update device of the IOS system to perform the firmware update method of the IOS system as claimed in any one of claims 1-8.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to implement the firmware update method of the IOS system as claimed in any one of claims 1-8.
Citation Information
Patent Citations
Firmware upgrade method and system
CN103164237A
Firmware publishing method and system
CN103309897A
Firmware management system, firmware version automatic detection and refreshing method, equipment and medium
CN116466984A
Cross validation method and device for BMC and BIOS suitability of server and storage medium
CN120234037A
Navigating network resources based on metadata
US6151624A