An intelligent firmware batch upgrading method and system for a terminal device and a medium
By configuring plugin containers and general interfaces, peripheral update requirement information is obtained, and selective upgrades are performed using benchmark parameters and firmware upgrade time matching tables. This solves the problem of low efficiency in firmware upgrades for terminal devices and enables efficient batch version verification and upgrades.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2021-12-21
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, firmware upgrades for terminal devices cannot achieve batch integration verification and upgrades, resulting in low maintenance and upgrade efficiency.
This paper provides an intelligent firmware batch upgrade method for terminal devices. By configuring a plug-in container and a general interface, the method obtains peripheral update requirement information and performs selective upgrades using benchmark parameters and a firmware upgrade time matching table, thereby realizing batch version verification and upgrades for different types of peripherals.
It enables batch version verification and upgrade of firmware for several different types of peripherals in terminal devices. It is highly intelligent, does not affect the normal operation of the device, and improves maintenance and upgrade efficiency.
Smart Images

Figure CN114356367B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of firmware upgrade technology, and in particular to an intelligent firmware batch upgrade method, system and medium for terminal devices. Background Technology
[0002] In the existing technology, the upgrade solutions for various models of peripherals on terminal devices can only be carried out by using the verification and upgrade tools provided by the peripheral vendors to perform upgrade verification operations on each peripheral on the terminal device one by one. It cannot achieve batch integrated verification and upgrade of peripheral firmware. Summary of the Invention
[0003] The present invention mainly addresses the problem that existing terminal device peripheral firmware upgrade methods cannot achieve batch integration verification and upgrade of peripheral firmware, resulting in low efficiency of terminal device maintenance and upgrade.
[0004] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is: to provide a method for batch upgrading intelligent firmware for terminal devices, comprising the following steps:
[0005] Initial configuration steps:
[0006] Configure the plug-in container to identify the peripheral types supported by the terminal device; perform a generalized configuration operation based on the plug-in container and the peripheral type information to obtain a general interface and a general peripheral control toolkit;
[0007] File acquisition steps:
[0008] Set a first file format, obtain peripheral update requirement information of the terminal device, and perform an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format and the peripheral update requirement information to obtain the file to be upgraded;
[0009] Smart upgrade steps:
[0010] Set baseline parameters, configure firmware upgrade time matching table, and obtain process information of the terminal device; perform selective upgrade operation based on the general interface, the peripheral general control toolkit, the file to be upgraded, the baseline parameters, the firmware upgrade time matching table, and the process information.
[0011] As an improved solution, the peripheral type information includes several first peripheral types;
[0012] The peripheral update requirement information stores several types of required peripherals.
[0013] The reference parameters include: a rate limit reference value, a first time threshold, a second time threshold, a first time period, and a second time period;
[0014] The firmware upgrade time matching table is configured with several upgrade times and several resource usage values that are respectively matched with several upgrade times.
[0015] As an improved approach, the generalized configuration operation includes:
[0016] Download several peripheral interface parameters that match several of the first peripheral types from the network data center; configure the general interface on the terminal device and set the parameter conversion logic of the general interface; generate several calling parameters that match several of the peripheral interface parameters according to the parameter conversion logic.
[0017] Obtain several SDKs corresponding to the first peripheral type; according to the first peripheral type and based on several calling parameters, encapsulate the several SDKs to obtain several peripheral control plugins; place the several peripheral control plugins into the plugin container to obtain a peripheral general control toolkit.
[0018] As an improved solution, the upgrade file acquisition operation includes:
[0019] Identify several of the required peripheral types in the peripheral update request information; obtain several peripheral firmware upgrade files that match the several required peripheral types respectively in the management background of the terminal device according to the first file format;
[0020] In the peripheral universal control toolkit, identify a number of first peripheral control plug-ins that match the types of peripheral requirements respectively; identify a number of peripherals to be detected on the terminal device that correspond to the types of peripheral requirements respectively;
[0021] The general interface is invoked to obtain the first firmware version information corresponding to the first peripheral device under test by using several first peripheral device control plugins; and to identify the second firmware version information corresponding to the firmware upgrade files of the peripheral devices.
[0022] According to the required peripheral type, several first firmware version information and several second firmware version information are compared respectively; the required peripheral type corresponding to the first firmware version information that matches the second firmware version information is set as the third peripheral type.
[0023] Identify the first peripheral firmware upgrade file corresponding to the third peripheral type among the plurality of peripheral firmware upgrade files; set the first peripheral firmware upgrade file as the file to be upgraded.
[0024] As an improved approach, the selective upgrade operation includes:
[0025] Calculate the first resource usage value of the first peripheral firmware upgrade file; identify several process IDs in the process information; identify several communication resource usage percentages corresponding to the several process IDs in the process information;
[0026] Calculate the sum of several communication resource occupancy percentages to obtain a first occupancy percentage; obtain a first bandwidth threshold for the terminal device; calculate a first product of the first bandwidth threshold and the first occupancy percentage to obtain a first bandwidth occupancy value;
[0027] Calculate the difference between the first bandwidth threshold and the first bandwidth occupancy value to obtain a first bandwidth redundancy value; confirm a first download speed value based on the first bandwidth redundancy value; calculate a second product of the first download speed value and the rate limit reference value to obtain a second download speed value;
[0028] Calculate the quotient of the first resource occupancy value and the second download speed value to obtain the first download time; access the firmware upgrade time matching table, and filter out the first upgrade time that matches the first resource occupancy value from a number of upgrade times; perform a time confirmation step based on the first download time and the first upgrade time.
[0029] As an improved solution, the time confirmation step includes:
[0030] Calculate the sum of the first download time and the first upgrade time to obtain the total upgrade time; compare the total upgrade time with the first time threshold.
[0031] If the total upgrade time is not greater than the first time threshold, then the first upgrade step is executed;
[0032] If the total upgrade time is greater than the first time threshold, the first download time is compared with the second time threshold; if the first upgrade time is not greater than the second time threshold, the second upgrade step is executed; if the first upgrade time is greater than the second time threshold, the third upgrade step is executed.
[0033] As an improved solution, the first upgrade step includes: firstly, calling the general interface to use the third peripheral control plugin corresponding to the third peripheral type to download the first peripheral firmware upgrade file based on the second download rate value, and then calling the general interface to use the third peripheral control plugin to run the downloaded first peripheral firmware upgrade file;
[0034] The second upgrade step includes: allocating cache space in the storage area of the terminal device; calling the third peripheral control plugin through the general interface with the cache space as the target download path and downloading the first peripheral firmware upgrade file according to the second download rate value; accessing the cache space through the third peripheral control plugin through the general interface within the first time period, and running the first peripheral firmware upgrade file in the cache space through the third peripheral control plugin through the general interface.
[0035] The third upgrade step includes: performing the first upgrade step during the second time period.
[0036] As an improved approach, the first file format includes XML and JSON formats.
[0037] The present invention also provides an intelligent firmware batch upgrade system for terminal devices, comprising:
[0038] Initial configuration module, file acquisition module, and intelligent upgrade module;
[0039] The initial configuration module is used to configure the plug-in container and identify the peripheral type information supported by the terminal device; the initial configuration module performs a generalized configuration operation based on the plug-in container and the peripheral type information to obtain a general interface and a general peripheral control toolkit;
[0040] The file acquisition module is used to set a first file format and acquire peripheral update requirement information of the terminal device; the file acquisition module performs an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format and the peripheral update requirement information to obtain the file to be upgraded;
[0041] The intelligent upgrade module is used to set baseline parameters, configure a firmware upgrade time matching table, and obtain the process information of the terminal device; the intelligent upgrade module performs selective upgrade operations based on the general interface, the peripheral general control toolkit, the file to be upgraded, the baseline parameters, the firmware upgrade time matching table, and the process information.
[0042] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the intelligent firmware batch upgrade method for the terminal device.
[0043] The beneficial effects of this invention are:
[0044] 1. The intelligent firmware batch upgrade method for terminal devices described in this invention can perform batch version verification and upgrade of firmware for several different types of peripherals in a terminal device. At the same time, it can selectively upgrade based on the real-time operation information of the terminal device without affecting the normal operation of the terminal device. It has a high degree of intelligence and convenience, makes up for the shortcomings of the prior art, and has certain application value.
[0045] 2. The intelligent firmware batch upgrade system for terminal devices described in this invention can achieve batch version verification and upgrade of firmware for several different types of peripherals in the terminal device through the cooperation of the initial configuration module, file acquisition module and intelligent upgrade module. At the same time, it can also selectively upgrade according to the real-time operation information of the terminal device without affecting the normal operation of the terminal device. It has a high degree of intelligence and convenience, makes up for the shortcomings of the prior art, and has certain application value.
[0046] 3. The computer-readable storage medium of the present invention can enable the boot initial configuration module, file acquisition module and intelligent upgrade module to cooperate, thereby realizing batch version verification and upgrade of firmware of several different types of peripherals in the terminal device. At the same time, it can also selectively upgrade according to the real-time operation information of the terminal device without affecting the normal operation of the terminal device. It has a high degree of intelligence and convenience, makes up for the shortcomings of the prior art, and effectively improves the operability of the intelligent firmware batch upgrade method for the terminal device. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 This is a flowchart of the intelligent firmware batch upgrade method for terminal devices described in Embodiment 1 of the present invention;
[0049] Figure 2 This is a schematic diagram of the specific process of the intelligent firmware batch upgrade method for terminal devices described in Embodiment 1 of the present invention;
[0050] Figure 3 This is an architecture diagram of the intelligent firmware batch upgrade system for terminal devices described in Embodiment 2 of the present invention. Detailed Implementation
[0051] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0052] In the description of this invention, it should be noted that the embodiments described in this invention are only some embodiments of this invention, not all embodiments; based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0053] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0054] In the description of this invention, it should be noted that: SDK is a software development kit; JSON / XML is a file format.
[0055] Example 1
[0056] This embodiment provides a method for batch upgrading intelligent firmware for terminal devices, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0057] The main problem addressed in this embodiment is to handle the batch upgrade needs of several firmware files in terminal devices, and to intelligently implement on-demand upgrades to meet current business requirements.
[0058] S100, initial configuration steps, specifically including:
[0059] S110. Configure the plug-in container and identify the peripheral type information supported by the terminal device; perform a generalized configuration operation based on the plug-in container and the peripheral type information to obtain a general interface and a general peripheral control toolkit.
[0060] Specifically, the peripheral type information includes the first peripheral type supported by several terminal devices, such as: contactless card reader, image recognition device, USB reading device, etc.
[0061] Specifically, the peripheral update request information includes several peripheral types; the peripheral type is the type of peripheral that needs to be upgraded.
[0062] Specifically, the generalized configuration operation includes:
[0063] Correspondingly, several peripheral interface parameters matching the first peripheral types are downloaded from the network data center; the peripheral interface parameters include the serial communication format specification and control command format corresponding to the peripheral; therefore, a general interface is configured on the terminal device, and the parameter conversion logic of the general interface is set; several calling parameters matching the several peripheral interface parameters are generated according to the parameter conversion logic; at the same time, the SDK corresponding to the peripheral type is obtained from the manufacturer of the peripheral, and finally several SDKs are obtained; based on the several calling parameters, the several SDKs are encapsulated again to obtain several peripheral control plugins; the several peripheral control plugins are placed into the plugin container to obtain a peripheral general control toolkit; S In this embodiment, DK refers to the software toolkit / software framework plugin corresponding to various functions of different types of peripherals. Correspondingly, since the purpose of the general interface is to achieve unified calling of different types of peripherals, its main calling logic is to convert the corresponding peripherals into dedicated control instructions based on several calling parameters. Correspondingly, in order to implement the corresponding functions of the peripheral, the general interface needs to call the SDK of the peripheral. Therefore, the calling logic of the SDK needs to be redesigned according to the calling parameters corresponding to the peripheral, that is, the SDK needs to be repackaged to generate the corresponding peripheral control plugin. Subsequently, in the calling process, only the general interface needs to call the peripheral control plugin to realize the control and function implementation of different types of peripherals.
[0064] S200, File Acquisition Steps, specifically including:
[0065] S210. Set the first file format, obtain the peripheral update requirement information of the terminal device, and perform an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format and the peripheral update requirement information to obtain the file to be upgraded;
[0066] Specifically, in this embodiment, the first file format includes, but is not limited to, JSON or XML formats; the limitation of the first file format is used to convert the configuration files corresponding to different peripheral types, thereby unifying the configuration file format and facilitating subsequent batch peripheral firmware upgrades.
[0067] Specifically, the upgrade file acquisition operation includes:
[0068] Correspondingly, identify several peripheral types in the peripheral update request information; at this time, it is necessary to perform step-by-step verification to determine whether an upgrade is possible; obtain several peripheral firmware upgrade files that match the several peripheral types according to the first file format in the management background of the terminal device; identify several first peripheral control plugins that match the several peripheral types; identify several peripherals to be detected on the terminal device that correspond to the several peripheral types; call the general interface and use the several first peripheral control plugins to obtain several first firmware version information corresponding to the several peripherals to be detected; identify the several peripheral firmware upgrade files... The system identifies several corresponding second firmware version information; it compares several first firmware version information with several second firmware version information according to the required peripheral type; in this embodiment, the comparison between firmware version information includes the comparison of firmware version numbers, the comparison of firmware performance indicators required by the version, etc. Only when the above data matches is it determined that the first firmware version information and the second firmware version information are matched. Correspondingly, if the version number of the first firmware version information is less than the version number of the second firmware version information, it is considered that the two are matched; therefore, the required peripheral type corresponding to the first firmware version information that matches the second firmware version information is set as the third peripheral type.
[0069] Identify the first peripheral firmware upgrade file corresponding to the third peripheral type among the several peripheral firmware upgrade files; the first peripheral firmware upgrade file is the file to be upgraded.
[0070] S300 Smart Upgrade Steps, specifically including:
[0071] S310. Set the baseline parameters, configure the firmware upgrade time matching table, and obtain the process information of the terminal device; perform a selective upgrade operation based on the general interface, the peripheral general control toolkit, the file to be upgraded, the baseline parameters, the firmware upgrade time matching table, and the process information.
[0072] Specifically, the benchmark parameters include: a rate limit benchmark value, a first time threshold, a second time threshold, a first time period, and a second time period. In this embodiment, the rate limit benchmark value is 1 / 2, which halves the download speed to ensure that the terminal device's business processing is not affected during the upgrade process. In this embodiment, the first time threshold is set to any value between 15 and 20 minutes, depending on the specific terminal device model and operating conditions. The second time threshold is set to any value between 30 and 45 minutes, depending on the specific terminal device model and operating conditions. The first time period is from 12:30 AM to 1:30 PM during the non-business hours of the institution where the terminal device is located. The second time period is from 5:30 PM to 8:00 PM during the non-business hours of the institution where the terminal device is located.
[0073] Specifically, in this embodiment, the firmware upgrade time matching table is configured with several upgrade times and several resource usage values that match the upgrade times respectively; the upgrade time is a combination of the device restart time and the installation and running time of the upgrade file; correspondingly, for example, a resource usage value of 1.5GB corresponds to an upgrade time of 15 minutes, and the larger the resource usage value, the longer the upgrade time; specifically, the process information refers to several processes that are running in the terminal device system.
[0074] Specifically, the selective upgrade operation includes:
[0075] The process involves: calculating the first resource usage value of the first peripheral firmware upgrade file; the first resource usage value being the size of the first peripheral firmware upgrade file, for example, 1.5GB; identifying several process IDs in the process information; process IDs including but not limited to several image names corresponding to several running process IDs in the terminal device; identifying several communication resource usage percentages corresponding to several process IDs in the process information; communication resource usage percentages being bandwidth usage; calculating the sum of several communication resource usage percentages to obtain a first usage percentage; obtaining a first bandwidth threshold for the terminal device; calculating a first product of the first bandwidth threshold and the first usage percentage to obtain a first bandwidth usage value; and calculating the first bandwidth usage value. The difference between the wide threshold and the first bandwidth occupancy value is used to obtain the first bandwidth redundancy value. The first bandwidth redundancy value is the available redundant bandwidth that is not occupied by any process and can be used to download related files. Therefore, the first download rate value is determined based on the first bandwidth redundancy value. The second download rate value is obtained by calculating the second product of the first download rate value and the rate limit benchmark value. The second download rate value is the download rate that ensures that it does not affect the existing processes of the terminal device. The first download time is obtained by calculating the quotient of the first resource occupancy value and the second download rate value. The first upgrade time that matches the first resource occupancy value is selected from the firmware upgrade time matching table. The time confirmation step is performed based on the first download time and the first upgrade time.
[0076] Specifically, the time confirmation step includes:
[0077] First, calculate the sum of the first download time and the first upgrade time to obtain the total upgrade time;
[0078] Compare the total upgrade time with the first time threshold;
[0079] If the total upgrade time is not greater than the first time threshold, it means that the upgrade can be completed in a very short time, so the first upgrade step is executed directly.
[0080] If the total upgrade time is greater than the first time threshold, it means that the upgrade can be completed in a very short time. Therefore, the first download time is compared with the second time threshold to determine whether background download can be performed. If the first upgrade time is not greater than the second time threshold, it means that background download can be performed in a relatively short time. Therefore, the second upgrade step is executed. If the first upgrade time is greater than the second time threshold, it means that background download cannot be performed in a relatively short time. Therefore, in order not to affect the normal operation of the device, the third upgrade step is executed.
[0081] Specifically, the first upgrade step includes: firstly, calling the general interface and using the third peripheral control plugin corresponding to the third peripheral type to download the first peripheral firmware upgrade file based on the second download rate value; then calling the general interface and using the third peripheral control plugin to run the downloaded first peripheral firmware upgrade file.
[0082] Specifically, the second upgrade step includes: allocating cache space in the storage area of the terminal device, calling the general interface and using the third peripheral control plugin to download the first peripheral firmware upgrade file according to the second download rate value, and installing the upgrade file during idle time periods; therefore, during the first time period, calling the general interface and using the third peripheral control plugin to access the cache space and running the first peripheral firmware upgrade file in the cache space.
[0083] Specifically, the third upgrade step includes: performing the first upgrade step during the second time period.
[0084] Example 2
[0085] This embodiment is based on the same inventive concept as the intelligent firmware batch upgrade method for terminal devices described in Embodiment 1, and provides an intelligent firmware batch upgrade system for terminal devices, such as... Figure 3 As shown, it includes: an initial configuration module, a file acquisition module, and an intelligent upgrade module;
[0086] In the intelligent firmware batch upgrade system for terminal devices, the initial configuration module is used to configure the plug-in container and identify the peripheral device type information supported by the terminal device; the initial configuration module performs a generalized configuration operation based on the plug-in container and the peripheral device type information to obtain a general interface and a general peripheral control toolkit.
[0087] Specifically, the peripheral type information includes several first peripheral types;
[0088] Specifically, the generalized configuration operation includes: the initial configuration module downloading several peripheral interface parameters that match several of the first peripheral types from the network data center; the initial configuration module configuring the general interface on the terminal device and setting the parameter conversion logic of the general interface; the initial configuration module generating several calling parameters that match several of the peripheral interface parameters according to the parameter conversion logic; the initial configuration module obtaining several SDKs corresponding to several of the first peripheral types; the initial configuration module encapsulating several SDKs according to the first peripheral type and based on several calling parameters to obtain several peripheral control plugins; and the initial configuration module placing several peripheral control plugins into the plugin container to obtain a peripheral general control toolkit.
[0089] In the intelligent firmware batch upgrade system for terminal devices, the file acquisition module is used to set a first file format and acquire peripheral update requirement information of the terminal device; the file acquisition module performs an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format and the peripheral update requirement information to obtain the file to be upgraded;
[0090] Specifically, the peripheral update request information stores several types of required peripherals; the first file format includes XML and JSON formats;
[0091] Specifically, the upgrade file acquisition operation includes: the file acquisition module identifying several of the required peripheral types in the peripheral update requirement information; the file acquisition module acquiring several peripheral firmware upgrade files that match the several required peripheral types respectively in the management background of the terminal device according to the first file format; the file acquisition module identifying several first peripheral control plugins that match the several required peripheral types respectively in the peripheral universal control toolkit; the file acquisition module identifying several peripherals to be detected on the terminal device that correspond to the several required peripheral types respectively; and the file acquisition module calling the universal interface to acquire several peripherals to be detected using the several first peripheral control plugins respectively. The document describes a system that identifies several first firmware version information corresponding to each peripheral device, a file acquisition module that identifies several second firmware version information corresponding to several peripheral firmware upgrade files, a file acquisition module that compares several first firmware version information with several second firmware version information according to the required peripheral device type, a file acquisition module that sets the required peripheral device type corresponding to the first firmware version information that matches the second firmware version information as a third peripheral device type, a file acquisition module that identifies the first peripheral firmware upgrade file corresponding to the third peripheral device type among several peripheral firmware upgrade files, and a file acquisition module that sets the first peripheral firmware upgrade file as the file to be upgraded.
[0092] In the intelligent firmware batch upgrade system for terminal devices, the intelligent upgrade module is used to set baseline parameters, configure a firmware upgrade time matching table, and obtain the process information of the terminal devices. The intelligent upgrade module performs selective upgrade operations based on the general interface, the peripheral general control toolkit, the file to be upgraded, the baseline parameters, the firmware upgrade time matching table, and the process information.
[0093] Specifically, the benchmark parameters include: a rate limit benchmark value, a first time threshold, a second time threshold, a first time period, and a second time period; the firmware upgrade time matching table is configured with several upgrade times and several resource usage values that are respectively matched with several upgrade times;
[0094] Specifically, the selective upgrade operation includes: the intelligent upgrade module calculating the first resource usage value of the first peripheral firmware upgrade file; the intelligent upgrade module identifying several process IDs in the process information; the intelligent upgrade module identifying several communication resource usage percentages corresponding to the several process IDs in the process information; the intelligent upgrade module calculating the sum of the several communication resource usage percentages to obtain a first usage percentage; the intelligent upgrade module obtaining a first bandwidth threshold of the terminal device; the intelligent upgrade module calculating a first product of the first bandwidth threshold and the first usage percentage to obtain a first bandwidth usage value; the intelligent upgrade module calculating the difference between the first bandwidth threshold and the first bandwidth usage value to obtain a first bandwidth redundancy value; the intelligent upgrade module confirming a first download rate value based on the first bandwidth redundancy value; the intelligent upgrade module calculating a second product of the first download rate value and the rate limit benchmark value to obtain a second download rate value; the intelligent upgrade module calculating the quotient of the first resource usage value and the second download rate value to obtain a first download time; the intelligent upgrade module accessing the firmware upgrade time matching table, and the intelligent upgrade module filtering out the first upgrade time that matches the first resource usage value from several upgrade times; and the intelligent upgrade module performing a time confirmation step based on the first download time and the first upgrade time.
[0095] Specifically, the time confirmation step includes: the intelligent upgrade module calculates the sum of the first download time and the first upgrade time to obtain the total upgrade time; the intelligent upgrade module compares the total upgrade time with the first time threshold; if the total upgrade time is not greater than the first time threshold, the intelligent upgrade module executes the first upgrade step; if the total upgrade time is greater than the first time threshold, the intelligent upgrade module compares the first download time with the second time threshold; if the first upgrade time is not greater than the second time threshold, the intelligent upgrade module executes the second upgrade step; if the first upgrade time is greater than the second time threshold, the intelligent upgrade module executes the third upgrade step.
[0096] Specifically, the first upgrade step includes: the intelligent upgrade module first calls the general interface and uses the third peripheral control plugin corresponding to the third peripheral type to download the first peripheral firmware upgrade file based on the second download rate value; then the intelligent upgrade module calls the general interface and uses the third peripheral control plugin to run the downloaded first peripheral firmware upgrade file.
[0097] Specifically, the second upgrade step includes: the intelligent upgrade module allocating cache space in the storage area of the terminal device; the intelligent upgrade module calling the third peripheral control plugin through the general interface to download the first peripheral firmware upgrade file according to the cache space as the target download path and according to the second download rate value; the intelligent upgrade module accessing the cache space through the general interface calling the third peripheral control plugin within the first time period, and running the first peripheral firmware upgrade file in the cache space through the general interface calling the third peripheral control plugin.
[0098] Specifically, the third upgrade step includes: the intelligent upgrade module executing the first upgrade step during the second time period.
[0099] Example 3
[0100] This embodiment provides a computer-readable storage medium, including:
[0101] The storage medium is used to store computer software instructions used to implement the intelligent firmware batch upgrade method for terminal devices as described in Embodiment 1 above. It includes a program for executing the program set for the intelligent firmware batch upgrade method for terminal devices. Specifically, the executable program can be built into the intelligent firmware batch upgrade system for terminal devices as described in Embodiment 2. In this way, the intelligent firmware batch upgrade system for terminal devices can implement the intelligent firmware batch upgrade method for terminal devices as described in Embodiment 1 by executing the built-in executable program.
[0102] Furthermore, the computer-readable storage medium in this embodiment can be any combination of one or more readable storage media, wherein the readable storage medium includes an electrical, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0103] Unlike existing technologies, the intelligent firmware batch upgrade method, system, and medium for terminal devices proposed in this application can perform batch version verification and upgrade of firmware for several different types of peripherals in a terminal device. At the same time, it can also selectively upgrade based on the real-time operation information of the terminal device without affecting the normal operation of the terminal device. It has a high degree of intelligence and convenience. This system provides effective technical support for this method, ultimately making up for the shortcomings of existing technologies and has certain application value.
[0104] The embodiment numbers disclosed in the above embodiments of the present invention are merely for description and do not represent the superiority or inferiority of the embodiments.
[0105] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware to implement the program, which can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0106] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for batch upgrading intelligent firmware for terminal devices, characterized in that, Includes the following steps: Initial configuration steps: Configure the plug-in container to identify the peripheral types supported by the terminal device; perform a generalized configuration operation based on the plug-in container and the peripheral type information to obtain a general interface and a general peripheral control toolkit; File acquisition steps: Set a first file format, obtain peripheral update requirement information of the terminal device, and perform an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format and the peripheral update requirement information to obtain the file to be upgraded; Smart upgrade steps: Set baseline parameters, configure firmware upgrade time matching table, and obtain process information of the terminal device; Selective upgrade operations are performed based on the general interface, the peripheral general control toolkit, the file to be upgraded, the reference parameters, the firmware upgrade time matching table, and the process information; The peripheral type information includes several first peripheral types; The peripheral update requirement information stores several types of required peripherals. The generalized configuration operation includes: Download several peripheral interface parameters that match several of the first peripheral types from the network data center; configure the general interface on the terminal device and set the parameter conversion logic of the general interface; generate several calling parameters that match several of the peripheral interface parameters according to the parameter conversion logic. Obtain several SDKs corresponding to several first peripheral types; according to the first peripheral type and based on several calling parameters, encapsulate several SDKs to obtain several peripheral control plugins; place several peripheral control plugins into the plugin container to obtain a peripheral general control toolkit; The upgrade file acquisition operation includes: Identify several of the required peripheral types in the peripheral update request information; obtain several peripheral firmware upgrade files that match the several required peripheral types respectively in the management background of the terminal device according to the first file format; In the peripheral universal control toolkit, identify a number of first peripheral control plug-ins that match the types of peripheral requirements respectively; identify a number of peripherals to be detected on the terminal device that correspond to the types of peripheral requirements respectively; The general interface is invoked to obtain the first firmware version information corresponding to the first peripheral device under test by using several first peripheral device control plugins; and to identify the second firmware version information corresponding to the firmware upgrade files of the peripheral devices. According to the required peripheral type, several first firmware version information and several second firmware version information are compared respectively; the required peripheral type corresponding to the first firmware version information that matches the second firmware version information is set as the third peripheral type. Identify the first peripheral firmware upgrade file corresponding to the third peripheral type among the plurality of peripheral firmware upgrade files; set the first peripheral firmware upgrade file as the file to be upgraded.
2. The intelligent firmware batch upgrade method for terminal devices according to claim 1, characterized in that: The reference parameters include: a rate limit reference value, a first time threshold, a second time threshold, a first time period, and a second time period; The firmware upgrade time matching table is configured with several upgrade times and several resource usage values that are respectively matched with several upgrade times.
3. The intelligent firmware batch upgrade method for terminal devices according to claim 2, characterized in that: The selective upgrade operation includes: Calculate the first resource usage value of the first peripheral firmware upgrade file; identify several process IDs in the process information; identify several communication resource usage percentages corresponding to the several process IDs in the process information; Calculate the sum of several communication resource occupancy percentages to obtain a first occupancy percentage; obtain a first bandwidth threshold for the terminal device; calculate a first product of the first bandwidth threshold and the first occupancy percentage to obtain a first bandwidth occupancy value; Calculate the difference between the first bandwidth threshold and the first bandwidth occupancy value to obtain a first bandwidth redundancy value; confirm a first download speed value based on the first bandwidth redundancy value; calculate a second product of the first download speed value and the rate limit reference value to obtain a second download speed value; Calculate the quotient of the first resource occupancy value and the second download speed value to obtain the first download time; access the firmware upgrade time matching table, and filter out the first upgrade time that matches the first resource occupancy value from a number of upgrade times; perform a time confirmation step based on the first download time and the first upgrade time.
4. The intelligent firmware batch upgrade method for terminal devices according to claim 3, characterized in that: The time confirmation step includes: Calculate the sum of the first download time and the first upgrade time to obtain the total upgrade time; compare the total upgrade time with the first time threshold. If the total upgrade time is not greater than the first time threshold, then the first upgrade step is executed; If the total upgrade time is greater than the first time threshold, the first download time is compared with the second time threshold; if the first upgrade time is not greater than the second time threshold, the second upgrade step is executed; if the first upgrade time is greater than the second time threshold, the third upgrade step is executed.
5. The intelligent firmware batch upgrade method for terminal devices according to claim 4, characterized in that: The first upgrade step includes: firstly, calling the general interface and using the third peripheral control plugin corresponding to the third peripheral type to download the first peripheral firmware upgrade file based on the second download rate value; then calling the general interface and using the third peripheral control plugin to run the downloaded first peripheral firmware upgrade file. The second upgrade step includes: allocating cache space in the storage area of the terminal device; calling the third peripheral control plugin through the general interface with the cache space as the target download path and downloading the first peripheral firmware upgrade file according to the second download rate value; accessing the cache space through the third peripheral control plugin through the general interface within the first time period, and running the first peripheral firmware upgrade file in the cache space through the third peripheral control plugin through the general interface. The third upgrade step includes: performing the first upgrade step during the second time period.
6. The intelligent firmware batch upgrade method for terminal devices according to claim 5, characterized in that: The first file format includes XML and JSON formats.
7. A system for batch upgrading intelligent firmware for terminal devices, based on any one of claims 1 to 6, characterized in that: include: Initial configuration module, file acquisition module, and intelligent upgrade module; The initial configuration module is used to configure the plug-in container and identify the peripheral types supported by the terminal device; The initial configuration module performs a generalized configuration operation based on the plug-in container and the peripheral type information to obtain a general interface and a general peripheral control toolkit; The file acquisition module is used to set the first file format and acquire the peripheral update requirement information of the terminal device; The file acquisition module performs an upgrade file acquisition operation based on the general interface, the peripheral general control toolkit, the first file format, and the peripheral update requirement information to obtain the file to be upgraded. The intelligent upgrade module is used to set baseline parameters, configure a firmware upgrade time matching table, and obtain the process information of the terminal device. The intelligent upgrade module performs selective upgrade operations based on the general interface, the peripheral general control toolkit, the file to be upgraded, the benchmark parameters, the firmware upgrade time matching table, and the process information.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the intelligent firmware batch upgrade method for terminal devices according to any one of claims 1 to 6.