Firmware upgrade method, device, medium and program product
By parsing the firmware upgrade package and identifying the target hardware configuration data, and combining proprietary and general configuration data of multiple hardware devices for firmware upgrade, the storage pressure problem caused by the large amount of upgrade package data in the existing technology is solved, and efficient and compatible firmware upgrade for multiple terminal devices is achieved.
Patent Information
- Application Number
- CN202610314329.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, firmware upgrade solutions require integrating the firmware information of all hardware into the same upgrade package, resulting in a large data volume of the upgrade package, excessive FLASH space occupied by the terminal device, and storage pressure.
By parsing the firmware upgrade package, the target hardware configuration data of the terminal device is identified, and the upgrade is performed by combining multi-hardware proprietary configuration data and general configuration data, avoiding the full loading of multi-hardware firmware information and enabling a single upgrade package to adapt to multiple terminal devices.
It reduces the storage pressure and upgrade bandwidth consumption of terminal devices, improves the efficiency and compatibility of firmware upgrades, and reduces version maintenance costs.
Smart Images

Figure CN122387485A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of firmware upgrade technology, and in particular to a firmware upgrade method, device, medium, and program product. Background Technology
[0002] Over-the-Air (OTA) technology refers to the technology of updating software by downloading upgrade packages over the network. With the increasing popularity of hardware products with multiple regions and configurations, the need for OTA upgrades that adapt to different hardware configurations with a single software is becoming more and more urgent.
[0003] In related technologies, during the firmware upgrade process, the firmware information of all hardware can be integrated into the same upgrade package and written to the FLASH of each hardware product via OTA. After the system of the hardware product starts up, it loads the firmware information corresponding to the hardware from the FLASH to perform the upgrade.
[0004] However, the firmware upgrade solutions provided in related technologies significantly increase the data size of the upgrade package and the space occupied by FLASH, putting considerable pressure on the FLASH space of hardware products. Summary of the Invention
[0005] This disclosure was made in view of the above-mentioned problems. This disclosure provides a firmware upgrade method, apparatus, media, and program product that reduces the flash memory requirements for firmware upgrades.
[0006] According to a first aspect of this disclosure, a firmware upgrade method is provided, the method being applied in a terminal device, comprising:
[0007] In response to receiving a firmware upgrade package from the server, the firmware upgrade package is parsed to obtain the firmware file to be upgraded; If the firmware file to be upgraded contains a first firmware type parameter, then in the multi-hardware proprietary configuration data package of the firmware file to be upgraded, the target hardware configuration data associated with this terminal device is searched. The first firmware type parameter is used to indicate that the firmware upgrade package is compatible with multiple terminal devices. The multi-hardware proprietary configuration data package includes the hardware configuration data of each of the multiple terminal devices. If the target hardware configuration data exists in the multi-hardware proprietary configuration data package, the flash of the terminal device is updated using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded to perform a firmware upgrade.
[0008] According to a second aspect of this disclosure, a firmware upgrade method is provided, the method being applied in a server, comprising: In response to receiving the firmware upgrade command, the production flashing package is decompressed to obtain the firmware file to be packaged; If the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a multi-hardware production flashing package, then the hardware configuration data of each of the various terminal devices in the firmware file to be packaged is packaged into a multi-hardware proprietary configuration data package, and the configuration data common to the various terminal devices is determined as multi-hardware common configuration data. The multi-hardware proprietary configuration data package and the multi-hardware general configuration data are combined to obtain an initial firmware upgrade package. A first firmware type parameter is added to the initial firmware upgrade package to obtain a firmware upgrade package. The firmware upgrade package is then sent to multiple terminal devices.
[0009] According to a third aspect of this disclosure, a network device is provided, the network device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the method of the first or second aspect.
[0010] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described in the first or second aspect.
[0011] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first or second aspect.
[0012] The firmware upgrade method, device, medium, and program product provided in this disclosure parse the firmware upgrade package and identify multiple hardware upgrade types based on configuration information. Then, it accurately matches the target hardware configuration data corresponding to the terminal from the multi-hardware proprietary configuration data package and completes the FLAS update by combining it with the multi-hardware general configuration data. This achieves the adaptation and upgrade of a single upgrade package for multiple terminal devices, avoiding the increased version maintenance costs caused by making separate upgrade packages for different hardware. Furthermore, the mode of accurately matching hardware configuration data avoids the waste of storage resources caused by fully loading multi-hardware firmware information. At the same time, it ensures the targeting and compatibility of terminal device firmware upgrades. While improving the firmware upgrade efficiency in the scenario of adapting a single software to multiple hardware products, it also reduces the storage pressure and upgrade bandwidth consumption of terminal devices.
[0013] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0014] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0015] Figure 1 This is a schematic diagram illustrating an application scenario of a firmware upgrade scheme according to an embodiment of this disclosure.
[0016] Figure 2 This is a flowchart of a firmware upgrade method according to an embodiment of the present disclosure.
[0017] Figure 3 This is a flowchart of another firmware upgrade method according to an embodiment of the present disclosure.
[0018] Figure 4 This is a schematic block diagram of the functional modules of a firmware upgrade device according to an embodiment of the present disclosure.
[0019] Figure 5 This is a schematic block diagram of the functional modules of another firmware upgrade device according to an embodiment of the present disclosure.
[0020] Figure 6 This is a schematic diagram of a computer program product according to an embodiment of the present disclosure.
[0021] Figure 7 This is a hardware block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0023] In related technologies, due to the diversity of device types, a single firmware may need to be compatible with multiple different hardware devices. During the firmware upgrade process via OTA, the firmware information of all types of hardware devices needs to be packaged in the upgrade package and sent to the terminal device for download. The terminal device then identifies the firmware information that matches its own terminal device and performs the upgrade.
[0024] However, in the firmware upgrade solutions provided in related technologies, since the terminal device needs to download the upgrade package containing firmware information of all types of hardware to the terminal device, the terminal device needs to reserve a large amount of FLASH space to download the upgrade package. For example, if the firmware file to be upgraded for each hardware device is 1M and there are 128 types of hardware devices, then each terminal device needs 128M of storage space to download the upgrade package, which puts considerable pressure on the FLASH space of the terminal device.
[0025] To address the aforementioned problems, this disclosure provides a firmware upgrade solution, such as... Figure 2 As shown, Figure 1 The illustration shows an application scenario diagram of the firmware upgrade scheme provided in the embodiments of this disclosure, including a terminal device 101 and a server 102. The terminal device 101 is a device that can perform firmware upgrades based on OTA technology. The terminal device can be a desktop computer, laptop, tablet computer, IoT device, smart home appliance, vehicle device, or wearable device, etc. The server 102 is a service device used by the firmware upgrade package creator.
[0026] The terminal device 101 and the server 102 can establish a wired or wireless connection to implement the firmware upgrade scheme provided in this embodiment.
[0027] Figure 2 A flowchart illustrating an exemplary embodiment of the present disclosure of a firmware upgrade method is shown. This method can be applied to a terminal device, such as... Figure 2 As shown, the method in this embodiment of the disclosure may include: Step S201: In response to receiving the firmware upgrade package sent by the server, parse the firmware upgrade package to obtain the firmware file to be upgraded; Step S202: If the firmware file to be upgraded contains the first firmware type parameter, then search for the target hardware configuration data associated with this terminal device in the multi-hardware proprietary configuration data packet of the firmware file to be upgraded. The first firmware type parameter is used to indicate that the firmware upgrade package is compatible with multiple terminal devices, and the multi-hardware proprietary configuration data package includes the hardware configuration data of each of the multiple terminal devices. Step S203: If target hardware configuration data exists in the multi-hardware proprietary configuration data packet, update the flash of this terminal device to perform firmware upgrade by using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded. In summary, the firmware upgrade method provided in this disclosure parses the firmware upgrade package and identifies multiple hardware upgrade types based on configuration information. Then, it accurately matches the target hardware configuration data corresponding to the terminal from the multi-hardware proprietary configuration data package and completes the FLAS update by combining it with the multi-hardware general configuration data. This achieves the adaptation and upgrade of a single upgrade package for multiple terminal devices, avoiding the increased version maintenance costs caused by creating separate upgrade packages for different hardware. Furthermore, the mode of accurately matching hardware configuration data avoids the waste of storage resources caused by fully loading multi-hardware firmware information. At the same time, it ensures the targeting and compatibility of terminal device firmware upgrades. While improving the firmware upgrade efficiency in scenarios where a single software adapts to multiple hardware products, it also reduces the storage pressure and upgrade bandwidth consumption of terminal devices.
[0028] The following are Figure 2 The specific implementation methods of each step in the illustrated embodiment are described in detail below: In step S201, in response to receiving a firmware upgrade package sent by the server, the firmware upgrade package is parsed to obtain the firmware file to be upgraded; In this embodiment, the firmware file to be upgraded includes firmware data, firmware configuration information, and firmware type parameters. Firmware data refers to a set of binary data stored in the hardware storage medium (such as FLASH) of the terminal device, providing underlying drivers, core operating logic, and configuration support for the device hardware. Firmware configuration information is a structured data set stored within the firmware, defining firmware operating rules, hardware adaptation parameters, and upgrade management logic. It is the core basis for interaction between the firmware and the terminal device and upgrade system, determining the firmware's functional adaptation range, operating parameters, and upgrade execution method. Firmware type parameters are indicators used to distinguish whether the firmware upgrade package is adapted to a single terminal device or multiple terminal devices. The firmware type parameter can be a first firmware type parameter or a second firmware type parameter. The first firmware type parameter indicates that the firmware upgrade package is adapted to multiple terminal devices, while the second firmware type parameter indicates that the firmware upgrade package is adapted to one terminal device.
[0029] In one optional implementation, the process by which the terminal device, in response to receiving a firmware upgrade package sent by the server, parses the firmware upgrade package to obtain the firmware file to be upgraded may include: the terminal device, in response to receiving the firmware upgrade package sent by the server, parses the firmware upgrade package based on predefined firmware upgrade package parsing rules to obtain the firmware file to be upgraded.
[0030] In step S202, if the firmware file to be upgraded contains a first firmware type parameter, the terminal device searches for the target hardware configuration data associated with the terminal device in the multi-hardware proprietary configuration data packet of the firmware file to be upgraded.
[0031] In this embodiment of the disclosure, when the firmware file to be upgraded contains a first firmware type parameter, the terminal device can determine that the current upgrade scenario is a single-software, multi-hardware upgrade scenario (i.e., the same version of firmware needs to be upgraded to different types of terminal devices). The firmware data in the firmware file to be upgraded includes multi-hardware proprietary configuration data packets and multi-hardware general configuration data. The multi-hardware proprietary configuration data packets include hardware configuration information unique to each of the various terminal devices. The multi-hardware general configuration data consists of configuration data that is the same for various terminal devices. The configuration information unique to each terminal device can be determined based on the type of the terminal device, and this embodiment of the disclosure does not limit this. For example, for a communication terminal, the configuration information unique to the terminal device may include radio frequency parameters, regional adaptation parameters, and / or operator-specific function configurations, etc. The multi-hardware general configuration data may be software code (such as operating system and / or application) data that is independent of hardware.
[0032] In one optional implementation, the process of the terminal device searching for target hardware configuration data associated with itself in the multi-hardware proprietary configuration data packet of the firmware file to be upgraded includes: determining whether there is hardware configuration information corresponding to the device model identifier of the terminal device in the multi-hardware proprietary configuration data packet, wherein if it exists, it is determined that the multi-hardware proprietary configuration data packet contains target hardware configuration data associated with itself; if it does not exist, it is determined that the multi-hardware proprietary configuration data packet does not contain target hardware configuration data associated with itself.
[0033] In step S203, if the target hardware configuration data exists in the multi-hardware proprietary configuration data packet, the terminal device updates the flash of the terminal device to perform a firmware upgrade using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded.
[0034] In an optional implementation, the terminal device may further: generate an error message if the target proprietary configuration data is not found in the multi-hardware proprietary configuration data package. The error message indicates that the firmware upgrade package does not include the target hardware configuration data associated with the terminal device. Generating and feeding back an error message containing "no matching hardware configuration data" when the target proprietary configuration data corresponding to the terminal device is not found in the multi-hardware proprietary configuration data package can quickly identify the core reason for the upgrade failure, preventing invalid retries or abnormal operation of the terminal device due to configuration mismatch. It also provides accurate fault location information for servers and maintenance personnel, facilitating timely troubleshooting of upgrade package compatibility vulnerabilities or abnormal device hardware identification issues, reducing bandwidth waste and time costs caused by invalid operations, and ensuring the standardization of the upgrade process and the efficiency of fault handling.
[0035] Optionally, after generating the error message, the terminal device can display the error message on the electronic display device to inform the user of the upgrade anomaly, and send the error message to the server to facilitate fault location by the server-side maintenance personnel; or, for terminal devices that do not contain an electronic display device, the terminal device can directly send the error message to the server for the server-side maintenance personnel to troubleshoot the anomaly.
[0036] It should be noted that if the firmware file to be upgraded contains a second firmware type parameter, it indicates that the firmware data in the firmware file to be upgraded is only the firmware configuration data for this terminal device.
[0037] In one optional implementation, after parsing the firmware file to be upgraded, if the firmware file contains a second firmware type parameter, the terminal device updates its flash memory using the firmware configuration data in the firmware file to perform a firmware upgrade. When the firmware file contains a second firmware type parameter, it is determined that all firmware data in the file is specific to the terminal device. The firmware configuration data within the file is directly used to update the terminal device's flash memory, achieving efficient upgrades in non-single-software, multi-hardware scenarios. This ensures the consistency between firmware configuration and terminal hardware, improving the convenience and reliability of firmware upgrades for single-hardware-type terminals.
[0038] It should be noted that, in this embodiment of the disclosure, in order to facilitate the standardized and efficient upgrade of firmware to adapt to different hardware device scenarios, the flash is usually divided into a dedicated storage partition and a general storage partition.
[0039] In one optional implementation, before parsing the firmware upgrade package to obtain the firmware file to be upgraded in response to receiving the firmware upgrade package sent by the server, the terminal device can: divide the flash into a dedicated storage partition and a general storage partition based on the flash partition configuration information; divide the flash memory into a dedicated storage partition and a general storage partition based on the FLAS partition configuration information, thereby realizing modular isolation storage of firmware data according to functional attributes. This not only reserves an independent storage area for hardware-specific configurations in single-software multi-hardware upgrade scenarios, but also retains storage space for multiple hardware devices to share general configurations, avoiding read / write chaos and resource waste caused by mixed storage of hardware-specific and general configurations; at the same time, the standardized partitioning also provides a precise storage address mapping basis for firmware upgrades, supporting planned and precise erasure and matching updates of corresponding partitions during the upgrade process, improving the efficiency of firmware storage and upgrades.
[0040] It should be noted that, in the embodiments disclosed herein, the flash partition configuration information is a structured data set that is embedded in the firmware during the development stage of the terminal device. It is used to define the partitioning rules of the FLASH physical storage medium, the attributes of each partition, and the usage logic. It is the core basis for the terminal device to partition the FLASH, store data, and perform firmware upgrade operations, and is used to adapt to the firmware upgrade and operation requirements of single-software multi-hardware and non-single-software multi-hardware.
[0041] The flash partition configuration information includes basic partitioning parameters for storage partitions, such as the starting address, storage capacity, and partition identifier of each general storage partition and dedicated storage partition. It also includes the functional definition, data storage type, access rules, and mapping relationship with firmware data for each partition. In addition, it includes the execution specifications for partition erasure and data writing. Terminal devices can complete the standardized partitioning of FLASH based on the flash partition configuration information, accurately locate the position of each partition, and perform corresponding data read / write and firmware upgrade operations. This ensures that different types of firmware data, such as general configuration data and hardware-specific configuration data, are isolated in FLASH, and that standardized storage and management are achieved.
[0042] In one optional implementation, for a single-software, multi-hardware upgrade scenario, the process of updating the flash of the terminal device to perform a firmware upgrade using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded includes: erasing the old data in the dedicated storage partition and writing the target hardware configuration data into the dedicated storage partition of the flash; and erasing the old data in the general storage partition and writing the multi-hardware general configuration data into the general storage partition. By sequentially erasing the old data in the dedicated flash storage partition and the general storage partition, and then precisely writing the target hardware configuration data and the multi-hardware general configuration data matching the terminal into the corresponding partitions to complete the firmware upgrade, independent partition updates and storage isolation of the two types of configuration data are achieved. This enables precise adaptation of general configuration and hardware-specific configuration in a single-software, multi-hardware upgrade scenario, improving the standardization and reliability of firmware upgrades in this scenario.
[0043] In one optional implementation, in non-single-software-multiple-hardware scenarios, the firmware configuration data also includes the hardware configuration data and software configuration data of the terminal device. Specifically, for non-single-software-multiple-hardware upgrade scenarios, the process of updating the terminal device's flash memory using the firmware configuration data in the firmware file to be upgraded includes: erasing old data in the dedicated storage partition and writing the hardware configuration data to the dedicated storage partition of the flash memory; and erasing old data in the general storage partition and writing the software configuration data to the general storage partition. By erasing old data from both the dedicated and general storage partitions of the flash memory in one go, and sequentially writing the firmware configuration data of the terminal device to the corresponding dedicated and general storage partitions, reliable firmware data updates are achieved in non-single-software-multiple-hardware upgrade scenarios. This ensures the orderliness and integrity of firmware configuration data writing in non-single-software-multiple-hardware upgrade scenarios, improving the efficiency and reliability of firmware upgrades in such scenarios.
[0044] Figure 3 A flowchart illustrating an exemplary embodiment of the present disclosure of a firmware upgrade method is shown. This method can be applied to a server, such as... Figure 3 As shown, the method in this embodiment of the disclosure may include: Step S301: In response to receiving the firmware upgrade instruction, decompress the production flashing package to obtain the firmware file to be packaged; Step S302: If the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a multi-hardware production flashing package, then the hardware configuration data of each of the various terminal devices in the firmware file to be packaged is packaged into a multi-hardware proprietary configuration data package, and the configuration data common to the various terminal devices is determined as multi-hardware common configuration data. Step S303: Combine the multi-hardware proprietary configuration data package and the multi-hardware general configuration data to obtain the initial firmware upgrade package, add the first firmware type parameter to the initial firmware upgrade package to obtain the firmware upgrade package, and send the firmware upgrade package to multiple terminal devices.
[0045] In summary, the firmware upgrade method provided in this disclosure, by responding to firmware upgrade commands, parses and distinguishes between hardware-specific configuration data and general configuration data from the production flashing package, packages and combines them, adds exclusive type parameters, and generates a firmware upgrade package for distribution to various terminals. This achieves single upgrade package adaptation to multiple terminal hardware, eliminating the need to create separate upgrade packages for different hardware, significantly reducing version maintenance costs, and improving the efficiency of upgrade package creation and mass production distribution. Furthermore, by separating the storage of hardware-specific configurations and sharing general configurations, it avoids the problem of excessively large upgrade package size caused by fully integrating all hardware configurations, thus saving terminal FLASH storage space and supporting the efficient implementation of single-software multi-hardware upgrade solutions from the source of upgrade package creation.
[0046] The production flashing package can be pre-stored on the server. Since the server can store multiple production flashing packages, the service provider's engineers can use firmware upgrade commands to determine the production flashing package related to the firmware that needs to be upgraded. The firmware upgrade command is a command issued by the service provider's engineers to the server through the user terminal. The firmware upgrade command contains the target production flashing package identifier. After the server parses the firmware upgrade command to obtain the target production flashing package identifier, it can decompress the production flashing package corresponding to the target production flashing package identifier to obtain the firmware file to be packaged.
[0047] It should be noted that, in this embodiment of the disclosure, the firmware tag parameter in the firmware file to be packaged is used to indicate that the firmware file to be packaged is adapted to one or more terminal devices. The firmware tag parameter may include a first firmware tag parameter and a second firmware tag parameter. In the case where the firmware tag parameter is the first firmware tag parameter, it indicates that the type of the production flash package is a multi-hardware production flash package, that is, the firmware file to be packaged is adapted to multiple terminal devices; or, in the case where the firmware tag parameter is the second firmware tag parameter, it indicates that the type of the production flash package is a single-hardware production flash package, that is, the firmware file to be packaged is adapted to one terminal device. The firmware tag parameter is configured and added to the production flash package by the developers during the production flash package development process.
[0048] In one optional implementation, if the server determines that the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a non-multi-hardware production flashing package, then the server packages the firmware configuration data in the firmware file to be packaged to obtain an initial firmware upgrade package. Next, a second firmware type parameter is added to the initial firmware upgrade package to obtain a firmware upgrade package, and the firmware upgrade package is sent to multiple terminal devices. After identifying the production flashing package as a non-multi-hardware type, directly packaging the configuration data of the firmware file to be packaged and adding the second firmware type parameter to generate and distribute the upgrade package enables rapid creation and distribution of upgrade packages in non-single-software multi-hardware upgrade scenarios. Simultaneously, the dedicated second firmware type parameter allows terminal devices to quickly identify the upgrade package type and perform the corresponding non-single-software multi-hardware upgrade operation, ensuring the targeting and smoothness of firmware upgrades in non-multi-hardware scenarios.
[0049] An exemplary embodiment of this disclosure provides a firmware upgrade apparatus, which can be a terminal device. Figure 4 A schematic block diagram of the functional modules of a firmware upgrade apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 4 As shown, the firmware upgrade device 400 includes: The parsing module 401 is configured to parse the firmware upgrade package to obtain the firmware file to be upgraded in response to receiving the firmware upgrade package sent by the server. The lookup module 402 is configured to, if the firmware file to be upgraded contains a first firmware type parameter, search for target hardware configuration data associated with the terminal device in the multi-hardware proprietary configuration data package of the firmware file to be upgraded. The first firmware type parameter is used to indicate that the firmware upgrade package is compatible with multiple terminal devices. The multi-hardware proprietary configuration data package includes the hardware configuration data of each of the multiple terminal devices. The update module 403 is configured to perform a firmware upgrade by updating the flash of the terminal device using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded, when the target hardware configuration data exists in the multi-hardware proprietary configuration data package.
[0050] Optional, such as Figure 4 As shown, the firmware upgrade device 400 also includes a processing module 404, configured to: If the target proprietary configuration data is not found in the multi-hardware proprietary configuration data package, an error message is generated. The error message is used to indicate that the firmware upgrade package does not include the target hardware configuration data associated with the terminal device.
[0051] Optionally, update module 403 is also configured as follows: If the firmware file to be upgraded contains a second firmware type parameter, then the firmware upgrade is performed by updating the flash of the terminal device through the firmware configuration data in the firmware file to be upgraded.
[0052] Optionally, processing module 404 is also configured as follows: Based on the flash partition configuration information, the flash is divided into a dedicated storage partition and a general storage partition.
[0053] Optionally, the update module 403 is configured as follows: Erase the old data in the proprietary storage partition and write the target hardware configuration data into the proprietary storage partition of the flash; Erase the old data in the general storage partition and write the multi-hardware general configuration data into the general storage partition.
[0054] An exemplary embodiment of this disclosure provides a firmware upgrade apparatus, which can be a server. Figure 5 A schematic block diagram of the functional modules of a firmware upgrade apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 5 As shown, the firmware upgrade device 500 includes: The decompression module 501 is configured to decompress the production flashing package to obtain the firmware file to be packaged in response to receiving the firmware upgrade command; Packaging module 502 is configured to, if the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a multi-hardware production flashing package, package the hardware configuration data of each of the various terminal devices in the firmware file to be packaged into a multi-hardware proprietary configuration data package, and determine the configuration data common to the various terminal devices as multi-hardware common configuration data. The encapsulation module 503 is configured to combine the multi-hardware proprietary configuration data package and the multi-hardware general configuration data to obtain an initial firmware upgrade package, add a first firmware type parameter to the initial firmware upgrade package to obtain a firmware upgrade package, and send the firmware upgrade package to multiple terminal devices.
[0055] Optionally, the encapsulation module 503 is also configured as follows: If the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a non-multi-hardware production flashing package, then the firmware configuration data in the firmware file to be packaged is packaged to obtain an initial firmware upgrade package. A second firmware type parameter is added to the initial firmware upgrade package to obtain a firmware upgrade package, and the firmware upgrade package is sent to multiple terminal devices.
[0056] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0057] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0058] like Figure 6 As shown, an exemplary embodiment of this disclosure also provides a computer program product 600, including a computer program 601, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0059] refer to Figure 7The present invention describes a structural block diagram of an electronic device 700 that can serve as a terminal device or server of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0060] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0061] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0062] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. In some embodiments, the computing unit 701 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0063] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0064] 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.
[0065] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0066] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0067] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0068] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0069] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A firmware upgrade method, characterized in that, The method is applied in a terminal device and includes: In response to receiving a firmware upgrade package from the server, the firmware upgrade package is parsed to obtain the firmware file to be upgraded; If the firmware file to be upgraded contains a first firmware type parameter, then in the multi-hardware proprietary configuration data package of the firmware file to be upgraded, the target hardware configuration data associated with this terminal device is searched. The first firmware type parameter is used to indicate that the firmware upgrade package is compatible with multiple terminal devices. The multi-hardware proprietary configuration data package includes the hardware configuration data of each of the multiple terminal devices. If the target hardware configuration data exists in the multi-hardware proprietary configuration data package, the flash of the terminal device is updated using the target hardware configuration data and the multi-hardware general configuration data in the firmware file to be upgraded to perform a firmware upgrade.
2. The method according to claim 1, characterized in that, The method further includes: If the target proprietary configuration data is not found in the multi-hardware proprietary configuration data package, an error message is generated. The error message is used to indicate that the firmware upgrade package does not include the target hardware configuration data associated with the terminal device.
3. The method according to claim 1, characterized in that, The method further includes: If the firmware file to be upgraded contains a second firmware type parameter, then the firmware upgrade is performed by updating the flash of the terminal device through the firmware configuration data in the firmware file to be upgraded.
4. The method according to any one of claims 1 to 3, characterized in that, include: Based on the flash partition configuration information, the flash is divided into a dedicated storage partition and a general storage partition.
5. The method according to claim 4, characterized in that, The step of updating the flash of the terminal device to perform firmware upgrade using the target hardware configuration data and the multi-hardware common configuration data in the firmware file to be upgraded includes: Erase the old data in the proprietary storage partition and write the target hardware configuration data into the proprietary storage partition of the flash; Erase the old data in the general storage partition and write the multi-hardware general configuration data into the general storage partition.
6. A firmware upgrade method, characterized in that, The method is applied in a server and includes: In response to receiving the firmware upgrade command, the production flashing package is decompressed to obtain the firmware file to be packaged; If the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a multi-hardware production flashing package, then the hardware configuration data of each of the various terminal devices in the firmware file to be packaged is packaged into a multi-hardware proprietary configuration data package, and the configuration data common to the various terminal devices is determined as multi-hardware common configuration data. The multi-hardware proprietary configuration data package and the multi-hardware general configuration data are combined to obtain an initial firmware upgrade package. A first firmware type parameter is added to the initial firmware upgrade package to obtain a firmware upgrade package. The firmware upgrade package is then sent to multiple terminal devices.
7. The method according to claim 6, characterized in that, The method further includes: If the firmware tag parameter in the firmware file to be packaged indicates that the type of the production flashing package is a non-multi-hardware production flashing package, then the firmware configuration data in the firmware file to be packaged is packaged to obtain an initial firmware upgrade package. A second firmware type parameter is added to the initial firmware upgrade package to obtain a firmware upgrade package, and the firmware upgrade package is sent to multiple terminal devices.
8. A network device, the network device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 5, or claims 6 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method of any one of claims 1 to 5, or claims 6 to 7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the method of any one of claims 1 to 5, or claims 6 to 7.