Terminal firmware upgrade method, system, device and medium based on communication module

Through the collaboration between the communication module and the cloud platform, the problem of slow upgrade speed and complex process of terminal firmware is solved, and a faster and simplified firmware upgrade process is achieved, reducing the resource requirements and costs of terminal equipment.

CN118689514BActive Publication Date: 2024-12-06E SURFING IOT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411166926.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

In the prior art, terminal firmware upgrade speed is slow and the process is complicated, especially when resource-constrained terminal devices require external storage media, which increases operational complexity and upgrade time.

Method used

Through the communication module and the cloud platform, we obtain the firmware upgrade file and send the firmware upgrade prompt information to the terminal MCU. The terminal MCU judges and performs the upgrade based on the summary information, avoiding the acquisition and storage of firmware directly from the cloud platform and reducing the terminal's resources Requirements and complexity.

Benefits of technology

It improves firmware upgrade speed, reduces terminal cost and complexity, simplifies the upgrade process, and avoids dependence on external Flash or on-chip Flash.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689514B_ABST
    Figure CN118689514B_ABST
Patent Text Reader

Abstract

The present invention discloses a terminal firmware upgrade method, system, device and medium based on a communication module. The method is applied to a terminal firmware upgrade system based on a communication module, the system includes a communication module, a terminal MCU and a cloud platform, and the method includes: the communication module determines whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform, and if it is upgraded, the firmware upgrade file is obtained in the cloud platform according to the preset upgrade protocol, and the firmware upgrade prompt information is sent to the terminal MCU, wherein the firmware upgrade prompt information includes summary information of the firmware upgrade file; the terminal MCU receives the firmware upgrade prompt information, determines whether to upgrade the terminal firmware according to the summary information, and if it is upgraded, sends a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware. By implementing the method of the present invention, the problem of slow terminal firmware upgrade speed and complicated upgrade process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless communications, and in particular to a terminal firmware upgrade method, system, device and medium based on a communication module. Background Art

[0002] With the rapid advancement of technology, terminal devices are constantly facing the need for firmware upgrades to ensure that users have a smoother and more efficient experience. The firmware upgrade process generally relies on on-chip Flash storage and external Flash storage to carry the firmware package to be upgraded. For terminal devices in the field of the Internet of Things, when performing firmware upgrades, the microcontroller unit (MCU) needs to establish a stable data channel with the cloud platform through a communication module. Subsequently, the firmware file is transferred to the MCU using the exclusive protocol provided by the cloud platform. Subsequently, the MCU needs to properly store the received firmware based on the hardware architecture of the device, and finally execute the firmware activation step to complete the entire upgrade process. However, this traditional process in the prior art is not only cumbersome, but also often requires the use of external storage media to complete the firmware upgrade on resource-constrained terminal devices, which undoubtedly increases the complexity of the operation and slows down the upgrade speed. Summary of the invention

[0003] The embodiments of the present invention provide a terminal firmware upgrade method, system, device and medium based on a communication module, aiming to solve the problems of slow terminal firmware upgrade speed and complicated upgrade process in the prior art.

[0004] In a first aspect, an embodiment of the present invention provides a terminal firmware upgrade method based on a communication module, which is applied to a terminal firmware upgrade system based on a communication module, the system comprising a communication module, a terminal MCU and a cloud platform, the method comprising: the communication module determines whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform, and if it is to be upgraded, obtains the firmware upgrade file in the cloud platform according to a preset upgrade protocol, and sends a firmware upgrade prompt message to the terminal MCU, wherein the firmware upgrade prompt message includes summary information of the firmware upgrade file; the terminal MCU receives the firmware upgrade prompt message, determines whether to upgrade the terminal firmware according to the summary information, and if it is to be upgraded, sends a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware.

[0005] In the second aspect, an embodiment of the present invention also provides a terminal firmware upgrade system based on a communication module, the system comprising a communication module, a terminal MCU and a cloud platform, wherein the communication module is used to determine whether to upgrade the terminal firmware according to the upgrade instructions sent by the cloud platform, and if it is to be upgraded, the firmware upgrade file is obtained in the cloud platform according to a preset upgrade protocol, and a firmware upgrade prompt message is sent to the terminal MCU, wherein the firmware upgrade prompt message includes summary information of the firmware upgrade file; the terminal MCU is used to receive the firmware upgrade prompt message, determine whether to upgrade the terminal firmware according to the summary information, and if it is to be upgraded, send a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware.

[0006] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0007] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and the program instructions can implement the above method when executed by a processor.

[0008] The embodiment of the present invention provides a terminal firmware upgrade method, system, device and medium based on a communication module. Among them, it is applied to a terminal firmware upgrade system based on a communication module, the system includes a communication module, a terminal MCU and a cloud platform, and the method includes: the communication module determines whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform, if it is upgraded, the firmware upgrade file is obtained in the cloud platform according to the preset upgrade protocol, and the firmware upgrade prompt information is sent to the terminal MCU, wherein the firmware upgrade prompt information includes the summary information of the firmware upgrade file; the terminal MCU receives the firmware upgrade prompt information, determines whether to upgrade the terminal firmware according to the summary information, and if it is upgraded, sends the preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware. The embodiment of the present invention obtains the firmware upgrade file in the cloud platform by the communication module, and sends the firmware upgrade prompt information to the terminal MCU so that the terminal MCU can read the firmware upgrade file in the communication module and upgrade the terminal firmware. There is no need to use external flash or on-chip flash to perform firmware upgrades in the cloud platform, which reduces terminal costs. In addition, the terminal does not need to integrate a firmware upgrade protocol, which reduces the complexity of terminal firmware upgrades and effectively improves the firmware upgrade speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0010] Figure 1 A schematic diagram of a process flow of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention;

[0011] Figure 2 A schematic diagram of a first sub-process of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention;

[0012] Figure 3 A schematic diagram of a second sub-process of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention;

[0013] Figure 4 A schematic diagram of a third sub-process of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention;

[0014] Figure 5 A schematic diagram of a fourth sub-process of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention;

[0015] Figure 6 A schematic block diagram of a terminal firmware upgrade system based on a communication module provided in an embodiment of the present invention;

[0016] Figure 7 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0019] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0020] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0021] See also Figure 1 , Figure 1 A flow chart of a terminal firmware upgrade method based on a communication module provided in an embodiment of the present invention. The terminal firmware upgrade method based on a communication module in this embodiment can be applied to a terminal firmware upgrade system based on a communication module, the system including a communication module, a terminal MCU and a cloud platform, and by using the terminal firmware upgrade method of the present invention, the terminal MCU does not need to perform firmware upgrades through a cloud platform, so that the complexity of terminal firmware upgrades is reduced, thereby effectively improving the firmware upgrade speed.

[0022] Figure 1 1 is a flow chart of a terminal firmware upgrade method based on a communication module provided by an embodiment of the present invention. As shown in the figure, the method includes the following steps S110-S120.

[0023] S110, the communication module determines whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform. If it is upgraded, the firmware upgrade file is obtained in the cloud platform according to the preset upgrade protocol, and a firmware upgrade prompt message is sent to the terminal MCU, wherein the firmware upgrade prompt message includes summary information of the firmware upgrade file.

[0024] In this embodiment, the communication module is a device with communication capabilities, specifically, it can be a device with communication capabilities such as WIFi, 5G, gateway, etc. The terminal firmware is a program written into the memory, which is a device "driver" stored inside the device. Only through the firmware terminal system can the operation of a specific machine be realized according to the standard device driver. For example, the terminal firmware can be an internal firmware such as an optical drive and a burner. The terminal MCU is a microcontroller unit (Microcontroller Unit), which is a microcomputer that integrates the CPU, memory, input and output interface and other components of a computer on a single chip. The terminal MCU can control the functions of the terminal. The cloud platform is a service based on hardware resources and software resources, which can provide computing, network and storage capabilities. The to-be-upgraded instruction is an instruction sent to the communication module that the current terminal firmware can be upgraded, and the to-be-upgraded instruction includes information such as the size, checksum, and version number of the firmware upgrade file. The communication module receives the upgrade instruction sent by the cloud platform and determines whether to upgrade the current terminal firmware based on the information carried therein. For example, the file version number in the upgrade instruction can be compared with the version number of the current firmware. If the file version number in the upgrade instruction is greater than the version number of the current firmware, it is determined that the terminal firmware needs to be upgraded. Then, the firmware upgrade file is downloaded frame by frame or file package by file package from the cloud platform according to the preset upgrade protocol set with the platform, wherein the preset upgrade protocol is the upgrade protocol set by the cloud platform, which is not limited. The communication module sends a firmware upgrade prompt message to the terminal MCU, wherein the firmware upgrade prompt message is information that prompts the terminal to perform a firmware upgrade, including summary information such as the verification code and version number of the firmware upgrade file. Specifically, the firmware upgrade prompt information is sent to the terminal MCU via AT instructions, wherein the AT (Attention) instructions are a set of command sets used for connection and communication between the terminal device and the communication module, and the firmware upgrade prompt information is specifically: AT+FOTANOTIFY: version.checksum.time, wherein FOTANOTIFY is the notification identifier, version is the version number in the summary information, checksum is the firmware checksum in the summary information, and time is the time point when the new version of the firmware in the summary information is issued. The communication module obtains the firmware upgrade file from the cloud platform and sends the firmware upgrade prompt information to the terminal MCU, thereby avoiding the process of the terminal MCU obtaining the firmware upgrade file from the cloud platform, so that the terminal does not need to integrate the firmware upgrade protocol, thereby reducing the complexity of the terminal firmware upgrade.

[0025] In one embodiment, if Figure 2As shown, the step S110 also includes steps S111-S112.

[0026] S111, obtaining attribute information of the firmware upgrade file in the instruction to be upgraded, wherein the attribute information includes a firmware version number and a firmware verification code;

[0027] S112, comparing the firmware version number with a pre-stored firmware version number, and verifying the firmware verification code, if the verification passes and the firmware version number is the latest version number, determining to upgrade the terminal firmware, wherein the pre-stored firmware version number is attribute information of the current terminal firmware.

[0028] In this embodiment, the communication module can obtain the attribute information of the firmware upgrade file by reading the information carried by the instruction to be upgraded. The attribute information is the basic information describing the attributes of the firmware upgrade file, including but not limited to the firmware version number of the firmware upgrade file, the firmware check code, the size of the firmware upgrade file, and the time when the firmware upgrade file is issued. Among them, the check code is a CRC16 check code, wherein the CRC16 check code is an error detection technology used for data transmission and storage, which detects whether an error occurs during data transmission or whether data integrity is damaged by calculating a check value of a fixed length. The communication module compares the firmware version number with the pre-stored firmware version number. For example, if the firmware version number is 2.2.1 and the pre-stored firmware version number is 2.2.0, it can be determined that the firmware version number is the latest version number, wherein the pre-stored firmware version number is the attribute information of the current terminal firmware. Specifically, the communication module can store the attribute information of the current terminal firmware as a criterion for whether to perform a terminal firmware upgrade. Furthermore, the communication module verifies the firmware verification code to verify the integrity of the firmware upgrade file. If the verification passes and the firmware version number is the latest version, it is determined that the terminal firmware needs to be upgraded. By determining whether to upgrade the terminal firmware based on the firmware version number and the firmware verification code, it is ensured that the downloaded firmware upgrade file must be the latest file and a safe and complete file, thereby avoiding waste of communication module resources and ensuring the safety of the communication module.

[0029] In one embodiment, if Figure 3 As shown, the step S110 further includes steps S1101 - S1102 .

[0030] S1101, verifying the integrity of the firmware upgrade file according to the firmware size and the firmware verification code;

[0031] S1102: If the firmware upgrade file is complete, store the firmware upgrade file.

[0032] In this embodiment, the firmware size is the size of the memory occupied by the firmware upgrade file. After the firmware upgrade file is obtained from the cloud platform, the firmware size of the downloaded firmware upgrade file is compared with the firmware size carried in the instruction to be upgraded to determine whether the downloaded firmware upgrade file is complete, and the communication module will verify the CRC16 check code of the firmware to determine whether the firmware upgrade file is complete. If both are verified, it proves that the firmware upgrade file is complete and the firmware upgrade file is stored. If one item is not verified, the already obtained firmware upgrade file is deleted and the firmware upgrade file is obtained from the cloud platform again. Among them, when the communication module obtains the firmware upgrade file from the cloud platform, it will prepare a new storage space (it can also clear the historical space) for interacting with the cloud platform to complete the download of the firmware. It should be noted that there is at least one firmware space in the communication module that can be used to store the firmware upgrade file to ensure that the firmware upgrade file can be downloaded completely and the downgrade function of the terminal firmware can be guaranteed. Specifically, it ensures that the version of the terminal firmware is reduced from the current version to an earlier version. ‌This operation is usually performed when there are some problems with the current version of the device, such as poor performance, bugs, etc. By verifying the integrity of the firmware upgrade file, it is ensured that the downloaded firmware upgrade file is a safe and complete file. ‌

[0033] In one embodiment, if Figure 4 As shown, the step S1102 also includes steps S11021-S10122.

[0034] S11021. Generate the corresponding summary information according to the attribute information of the firmware upgrade file;

[0035] S11022. Store the summary information and the firmware upgrade file.

[0036] In this embodiment, the summary information is information that can summarize the attributes of the terminal firmware file. When the communication module passes the integrity verification of the firmware upgrade file, the firmware upgrade file will be stored. When storing, it is necessary to generate firmware summary information, such as firmware version number, firmware size, firmware checksum and other information, and store the summary information together with the firmware upgrade file. It can be stored in the form of a file, or binary data can be directly stored. It can be understood that there is no restriction on the way to store the summary information and the firmware upgrade file, as long as it can be stored. By storing the summary information together with the firmware upgrade file, the firmware upgrade file can be understood by only reading the summary information, thereby improving the efficiency of viewing the file.

[0037] S120, the terminal MCU receives the firmware upgrade prompt information, determines whether to upgrade the terminal firmware according to the summary information, and if it is to be upgraded, sends a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware.

[0038] In this embodiment, after the terminal MCU receives the firmware upgrade prompt information, it determines whether to upgrade the terminal firmware according to the summary information carried in the firmware upgrade prompt information. Specifically, the firmware version number in the summary information can be compared with the version number of the terminal firmware currently used. If the firmware version number in the summary information is greater than the version number of the terminal firmware currently used, it can be determined that the terminal firmware is upgraded, and a preset upgrade instruction is sent to the communication module to read the firmware upgrade file and upgrade the terminal firmware, wherein the preset upgrade instruction is an AT instruction, specifically, the preset upgrade instruction is AT + FREAD = handle, size, offset, wherein FREAD is a read function, Handle is the storage address of the firmware upgrade file, size is the data size of the firmware upgrade file to be read, and offset is a firmware address offset value (the location of the data in the firmware file, specifically the storage location on the disk, it is an offset relative to the beginning of the file). After receiving the preset upgrade instruction, the communication module performs security verification on it. If the verification is successful, the terminal MCU can read the firmware upgrade file from the communication module to download it, and use the firmware upgrade file to upgrade the current terminal firmware after reading successfully. By controlling the terminal MCU to read the firmware upgrade file from the communication module, the terminal can avoid upgrading the firmware from the cloud platform, so that the terminal MCU only needs to copy the firmware from the communication module to the terminal MCU to complete the firmware download, thereby significantly reducing the complexity of the terminal MCU upgrade, making the upgrade simpler, and saving the cost of the MCU's external flash.

[0039] In one embodiment, the step S120 also includes a step S121.

[0040] S121, the communication module performs security verification on the terminal that sends the preset upgrade instruction and the summary information carried in the preset upgrade instruction, and if the verification is successful, sends a response instruction allowing the firmware upgrade file to be read to the terminal MCU.

[0041] In this embodiment, after the communication module receives the preset upgrade instruction sent by the terminal MCU, the terminal and the summary information carried in the preset upgrade instruction are verified for security. Specifically, the terminal can be verified by the communication key between the terminal MCU and the terminal. The specific verification method of the terminal MCU is not limited. It is sufficient to verify that the terminal is a bound terminal, and the summary information carried in the preset upgrade instruction is verified, that is, it is determined whether the summary information is the summary information of the firmware upgrade file to ensure that the firmware upgrade file to be read by the terminal MCU is the terminal file to be upgraded. If all verifications are passed, a response instruction allowing the firmware upgrade file to be read is sent to the terminal MCU, wherein the response instruction is an AT instruction, specifically: AT + FREAD: handle, size, offset, data. Among them, the same parameters have the same meaning as the parameters in the above instructions, which will not be repeated here, and data is the firmware data read. The terminal that sends the preset upgrade instruction is subjected to security verification against the summary information carried in the preset upgrade instruction to determine whether the terminal MCU is legitimate and to verify whether the firmware upgrade file obtained by the terminal MCU is the corresponding file. If so, the terminal is responded to so that it can read the firmware upgrade file to ensure the security of the firmware upgrade file.

[0042] In one embodiment, if Figure 5 As shown, the step S120 also includes steps S122-S124.

[0043] S122, the communication module constructs a virtual file system and a virtual serial interface;

[0044] S123, the terminal MCU selects whether to communicate with the communication module through the virtual file system and the virtual serial interface according to the size of the built-in resources;

[0045] S124: If it is chosen not to communicate through the virtual file system and the virtual serial interface, communicate with the communication module according to a preset universal interface.

[0046] In this embodiment, the virtual file system is a kernel software layer, which is used to process all system calls related to the Unix standard file system. Its main function is to provide a common interface for various file systems, so that the operating system can support multiple different types of file systems and allow users to access these file systems in a unified manner. The communication module stores the firmware upgrade files in several storage areas, and simulates the virtual file system through the universal serial bus (USB, Universal Serial Bus) connected to the terminal to generate a virtual serial interface, and provides the terminal MCU with two interfaces for communication: a virtual serial interface and a preset universal interface, wherein the preset universal interface is an interface that all terminal MCUs can communicate with, such as open, read, close and other standard interfaces. The virtual serial interface requires more terminal resources and can be used by terminals with sufficient resources. The terminal resources can be built-in resources such as terminal running memory. The terminal MCU selects whether to communicate with the communication module through the virtual file system and the virtual serial interface according to the size of the built-in resources. If the terminal MCU has large built-in resources, it can choose to communicate through the virtual serial interface to quickly download the firmware upgrade file; if the terminal MCU has small built-in resources, it can choose to download the firmware upgrade file frame by frame through a preset universal interface. The communication module provides two communication methods so that terminals with sufficient built-in resources can download firmware upgrade files faster to meet the usage requirements of different terminals.

[0047] In one embodiment, step S120 further includes step S1201 after step S120.

[0048] S1201: If the communication module receives an upgrade success instruction sent by the terminal MCU, the attribute information of the current terminal firmware is updated to the attribute information of the firmware upgrade file.

[0049] In this embodiment, the terminal MCU can send an upgrade success instruction to the communication module after upgrading the original terminal firmware according to the firmware upgrade file, wherein the upgrade success instruction is AT + FOTASET = version, time, wherein FOTASET is an upgrade success identifier, Version is the firmware version number after the current terminal MCU is upgraded, and time is the time point when the upgrade is completed. After the communication module receives the upgrade success instruction sent by the terminal MCU, it updates the attribute information of the currently stored terminal firmware to the attribute information of the firmware upgrade file. By updating the attribute information of the current terminal firmware stored in the communication module to the attribute information of the firmware upgrade file, it is convenient for the subsequent continuous upgrade of the terminal firmware.

[0050] Figure 6 FIG. 2 is a schematic block diagram of a terminal firmware upgrade system 200 based on a communication module provided in an embodiment of the present invention. Figure 6 As shown, corresponding to the above terminal firmware upgrade method based on the communication module, the present invention also provides a terminal firmware upgrade system based on the communication module. The terminal firmware upgrade system based on the communication module includes a unit for executing the above terminal firmware upgrade method based on the communication module, and the system can be configured in a desktop computer, a tablet computer, a laptop, and other terminals. Specifically, please refer to Figure 6 The terminal firmware upgrade system based on the communication module includes a cloud platform 210, a communication module 220, and a terminal MCU 230.

[0051] The communication module 220 is used to determine whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform. If it is upgraded, the firmware upgrade file is obtained in the cloud platform according to the preset upgrade protocol, and the firmware upgrade prompt information is sent to the terminal MCU, wherein the firmware upgrade prompt information includes the summary information of the firmware upgrade file.

[0052] In one embodiment, the communication module 220 includes an acquisition unit and a comparison unit.

[0053] An acquiring unit, configured to acquire attribute information of the firmware upgrade file in the instruction to be upgraded, wherein the attribute information includes a firmware version number and a firmware verification code;

[0054] The comparison unit is used to compare the firmware version number with the pre-stored firmware version number and verify the firmware verification code. If the verification passes and the firmware version number is the latest version number, it is determined to upgrade the terminal firmware, wherein the pre-stored firmware version number is the attribute information of the current terminal firmware.

[0055] In one embodiment, the communication module 220 includes a verification unit and a storage unit.

[0056] A verification unit, configured to verify the integrity of the firmware upgrade file according to the firmware size and the firmware verification code;

[0057] A storage unit is used to store the firmware upgrade file if the firmware upgrade file is complete.

[0058] In one embodiment, the communication module 220 includes a generation unit and a storage subunit.

[0059] A generating unit, configured to generate the corresponding summary information according to the attribute information of the firmware upgrade file;

[0060] The storage subunit is used to store the summary information and the firmware upgrade file.

[0061] The terminal MCU230 is used to receive the firmware upgrade prompt information, determine whether to upgrade the terminal firmware according to the summary information, and if it is upgraded, send a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware.

[0062] In one embodiment, the terminal MCU 230 includes a sending unit.

[0063] The sending unit is used for the communication module to perform security verification on the terminal that sends the preset upgrade instruction and the summary information carried in the preset upgrade instruction, and if the verification is passed, a response instruction allowing the firmware upgrade file to be read is sent to the terminal MCU.

[0064] In one embodiment, the terminal MCU 230 includes a construction unit, a selection unit and a communication unit.

[0065] A construction unit, used for the communication module to construct a virtual file system and a virtual serial interface;

[0066] A selection unit, used for the terminal MCU to select whether to communicate with the communication module through the virtual file system and the virtual serial interface according to the size of the built-in resources;

[0067] A communication unit is used for communicating with the communication module according to a preset universal interface if it is chosen not to communicate through the virtual file system and the virtual serial interface.

[0068] In one embodiment, the terminal MCU 230 includes an updating unit.

[0069] An updating unit is used to update the attribute information of the current terminal firmware to the attribute information of the firmware upgrade file if the communication module receives an upgrade success instruction sent by the terminal MCU.

[0070] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned terminal firmware upgrade system 200 based on the communication module and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and conciseness of the description, it will not be repeated here.

[0071] The terminal firmware upgrade system based on the communication module can be implemented in the form of a computer program. Figure 7 Runs on the computer device shown.

[0072] See also Figure 7 , Figure 75 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0073] See also Figure 7 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0074] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a terminal firmware upgrade method based on a communication module.

[0075] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0076] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a terminal firmware upgrade method based on a communication module.

[0077] The network interface 505 is used to communicate with other devices over the network. Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0078] The processor 502 is used to run a computer program 5032 stored in the memory to implement the steps of the above method.

[0079] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0080] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0081] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the above method.

[0082] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0083] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0084] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0085] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the system of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0086] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0087] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A terminal firmware upgrade method based on a communication module, characterized in that: The method is applied to a terminal firmware upgrade system based on a communication module, the system comprising a communication module, a terminal MCU and a cloud platform, and the method comprises: The communication module determines whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform, and if it is upgraded, obtains the firmware upgrade file in the cloud platform according to the preset upgrade protocol, and sends the firmware upgrade prompt information to the terminal MCU, wherein the firmware upgrade prompt information includes the summary information of the firmware upgrade file; The terminal MCU receives the firmware upgrade prompt information, determines whether to upgrade the terminal firmware according to the summary information, and if it is to be upgraded, sends a preset upgrade instruction to the communication module to read the firmware upgrade file and upgrade the terminal firmware; The step of determining whether to upgrade the terminal firmware according to the upgrade instruction sent by the cloud platform includes: Acquire attribute information of the firmware upgrade file in the instruction to be upgraded, wherein the attribute information includes a firmware version number and a firmware verification code; Compare the firmware version number with the pre-stored firmware version number, and verify the firmware verification code, and if the verification passes and the firmware version number is the latest version number, determine to upgrade the terminal firmware, wherein the pre-stored firmware version number is the attribute information of the current terminal firmware; After the step of obtaining the firmware upgrade file in the cloud platform according to the preset upgrade protocol, the method further includes: Performing integrity verification on the firmware upgrade file according to the firmware size and the firmware verification code, wherein the attribute information includes the firmware size; If the firmware upgrade file is complete, storing the firmware upgrade file; The step of storing the firmware upgrade file comprises: Generate the corresponding summary information according to the attribute information of the firmware upgrade file; Storing the summary information and the firmware upgrade file; The step of reading the firmware upgrade file comprises: The communication module constructs a virtual file system and a virtual serial interface; The terminal MCU selects whether to communicate with the communication module through the virtual file system and the virtual serial interface according to the size of the built-in resources; If it is chosen not to communicate through the virtual file system and the virtual serial interface, then communicating with the communication module according to a preset universal interface; The step of sending a preset upgrade instruction to the communication module to read the firmware upgrade file if the firmware is to be upgraded includes: The communication module performs security verification on the terminal that sends the preset upgrade instruction and the summary information carried in the preset upgrade instruction, and if the verification is successful, sends a response instruction allowing the firmware upgrade file to be read to the terminal MCU.

2. The method according to claim 1, characterized in that After the step of upgrading the terminal firmware, the method further comprises: If the communication module receives an upgrade success instruction sent by the terminal MCU, the attribute information of the current terminal firmware is updated to the attribute information of the firmware upgrade file.

3. A terminal firmware upgrade system based on a communication module, characterized in that: The system includes a communication module, a terminal MCU and a cloud platform, wherein the system includes a unit for executing the method as described in any one of claims 1-2.

4. A terminal firmware upgrade system based on a communication module, characterized in that: The method comprises at least three computer devices, each of which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processors in at least two of the computer devices jointly implement the method as claimed in any one of claims 1 to 2 when executing the corresponding computer programs.

5. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 2 can be implemented.

Citation Information

Patent Citations

  • Equipment upgrading method and device

    CN112445507A