OTA firmware upgrading method and system, terminal equipment and storage medium

By querying the upgraded equipment in the local area network and obtaining the firmware upgrade package on the server side, the problem of server network congestion and computing pressure caused by the central structure firmware download caused by the existing technology in the existing technology, and realized the efficient and fast of the equipment firmware upgrade.

CN119383081APending Publication Date: 2025-01-28GUANGDONG POWER GRID CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411511055.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing technology adopts a central structure for firmware download, which cannot adapt to the situation where a large number of device terminals need to upgrade firmware, resulting in increased network congestion and calculation pressure on the server terminal, which in turn leads to slow upgrade of equipment firmware.

Method used

After receiving the firmware upgrade package information query request through the server, the query has an upgraded user device with the target user device in the same local area network. The firmware upgrade package version information is determined according to the version information to obtain the firmware upgrade package from the server or upgraded user device for sharding and verification, and finally the firmware upgrade.

Benefits of technology

Through the acquisition of the firmware upgrade package between equipment and equipment or devices or servers, make full use of the computing and storage resources of the device side to reduce the computing pressure and network congestion of the server, and improve the efficiency and speed of the equipment firmware upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383081A_ABST
    Figure CN119383081A_ABST
Patent Text Reader

Abstract

The invention discloses an OTA firmware upgrading method and system, terminal equipment and a storage medium, and the method comprises the steps: querying whether upgraded user equipment in the same local area network as target user equipment exists or not through a server; the target user equipment can obtain the firmware upgrade package from the server or the upgraded user equipment in the same local area network to carry out firmware upgrade, that is, the firmware upgrade can be carried out by obtaining the firmware upgrade package between the equipment, and the firmware upgrade can also be carried out by obtaining the firmware upgrade package between the equipment and the server. The computing and storage resources of the device side are fully utilized, the computing pressure of the server and the network congestion condition are reduced, and the problem that the network congestion and computing pressure of the server side are increased due to the fact that the mode of downloading firmware through a center structure in the prior art cannot adapt to the condition that a large number of device sides need to be subjected to firmware upgrading is solved. And thus, the problem of slow firmware upgrading of the equipment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of OTA firmware upgrade, and in particular to an OTA firmware upgrade method, system, terminal device and storage medium. Background Art

[0002] Existing OTA firmware upgrade methods include methods based on the HTTP(S) protocol and methods based on the MQTT protocol. However, both of these existing methods involve subscribing to a server via the device side, and the server sends a firmware upgrade package to the device that requests a firmware upgrade. That is, the existing OTA firmware upgrade method uses a central structure to connect the device side to the server one by one, and uses the server to complete the distribution of the firmware upgrade package. However, when there are a large number of device sides that need to be firmware upgraded, since the existing technology uses a central structure for firmware downloads that mainly relies on the resources of the OTA server side, and the resources of the OTA server side are limited, this increases the network congestion and computing pressure on the OTA server side, which in turn leads to the problem of slow firmware upgrades on the device side. Summary of the invention

[0003] The present invention provides an OTA firmware upgrade method, system, terminal device and storage medium, which can solve the problem that the existing technology using a central structure to download firmware cannot adapt to the situation where a large number of device ends need to perform firmware upgrades, resulting in increased network congestion and computing pressure on the server side, thereby causing slow device firmware upgrades.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides an OTA firmware upgrade method, including:

[0005] Sending a firmware upgrade package information query request to a server, so that after receiving the firmware upgrade package information query request, the server queries the upgrade status of other user devices in the same local area network as the target user device, and when it is determined that there is no upgraded user device, the server feeds back the version information of the first firmware upgrade package stored in the server itself, and when it is determined that there is an upgraded user device, the server feeds back the version information of the second firmware upgrade package of the upgraded user device;

[0006] Receive version information of the firmware upgrade package sent by the server;

[0007] When the firmware upgrade package is a first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a first firmware upgrade package acquisition request is sent to the server so that the server feeds back the first firmware upgrade package;

[0008] When the firmware upgrade package is a second firmware upgrade package and it is determined, based on the version information of the firmware upgrade package, that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a second firmware upgrade package acquisition request is sent to the upgraded user equipment so that the upgraded user equipment feeds back the second firmware upgrade package;

[0009] The firmware upgrade is performed according to the firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

[0010] Further, the sending of the firmware upgrade package information query request to the server so that the server queries the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request includes:

[0011] Establish an MQTT connection with the server and send a firmware upgrade package information query request to the server via the MQTT protocol;

[0012] The server extracts the LAN IP of the target user device according to the MQTT protocol, and queries the upgrade status of other user devices with the same LAN IP as the target user device according to the LAN IP.

[0013] Further, in the case where it is determined that there is no upgraded user equipment, the feedback of the version information of the first firmware upgrade package stored in the server itself, and in the case where it is determined that there is an upgraded user equipment, the feedback of the version information of the second firmware upgrade package of the upgraded user equipment includes:

[0014] When it is determined that there is no upgraded user device, the server feeds back version information of the first firmware upgrade package stored in the server itself through the MQTT protocol;

[0015] When it is determined that there is an upgraded user device, the server feeds back version information of the second firmware upgrade package of the upgraded user device through the MQTT protocol.

[0016] Further, when the firmware upgrade package is the first firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a first firmware upgrade package acquisition request to the server so that the server feeds back the first firmware upgrade package, including:

[0017] When the firmware upgrade package is a first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a first firmware upgrade package acquisition request to the server, so that after receiving the first firmware upgrade package acquisition request, the server fragments the first firmware upgrade package to obtain the fragmented first firmware upgrade package, and feeds back the fragmented first firmware upgrade package;

[0018] receiving the fragmented first firmware upgrade package sent by the server, performing fragment verification on the fragmented first firmware upgrade package and combining the fragments to obtain a combined first firmware upgrade package;

[0019] The combined first firmware upgrade package is subjected to firmware information verification to obtain a verified first firmware upgrade package.

[0020] Further, when the firmware upgrade package is a second firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a second firmware upgrade package acquisition request to the upgraded user equipment so that the upgraded user equipment feeds back the second firmware upgrade package, including:

[0021] When the firmware upgrade package is a second firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a second firmware upgrade package acquisition request to the upgraded user equipment, so that after receiving the second firmware upgrade package acquisition request, the upgraded user equipment fragments the second firmware upgrade package to obtain the fragmented second firmware upgrade package, and feeds back the fragmented second firmware upgrade package;

[0022] receiving a fragmented second firmware upgrade package sent by an upgraded user device, performing fragment verification on the fragmented second firmware upgrade package and combining the fragments to obtain a combined second firmware upgrade package;

[0023] The combined second firmware upgrade package is subjected to firmware information verification to obtain a verified second firmware upgrade package.

[0024] Furthermore, the OTA firmware upgrade method further includes:

[0025] The firmware upgrade progress is sent to the console, so that the console displays the firmware upgrade progress status in real time when receiving the firmware upgrade progress.

[0026] Based on the above method embodiment, the present invention provides a corresponding system embodiment;

[0027] An embodiment of the present invention provides an OTA firmware upgrade system, comprising: a user device and a server; wherein the user device comprises: a target user device and other user devices except the target user device;

[0028] The target user equipment is used to send a firmware upgrade package information query request to the server,

[0029] The server is used to query the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request, and feedback the version information of the first firmware upgrade package stored in the server itself when it is determined that there is no upgraded user device, and feedback the version information of the second firmware upgrade package of the upgraded user device when it is determined that there is an upgraded user device;

[0030] The target user equipment is used to receive version information of the firmware upgrade package sent by the server;

[0031] The target user equipment is used to send a first firmware upgrade package acquisition request to the server when the firmware upgrade package is the first firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the server feeds back the first firmware upgrade package;

[0032] The target user equipment is used to send a second firmware upgrade package acquisition request to the upgraded user equipment when the firmware upgrade package is the second firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the upgraded user equipment feeds back the second firmware upgrade package;

[0033] The target user equipment is used to perform firmware upgrade according to a firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

[0034] Furthermore, the OTA firmware upgrade system further includes: a console;

[0035] The console is used to receive the firmware upgrade progress sent by the target user equipment and display the firmware upgrade progress status in real time.

[0036] Based on the above-mentioned method embodiment, the present invention provides a corresponding terminal device embodiment, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the transient stability assessment method of a multi-machine system based on a hyper-cutting plane as described in the present invention is implemented.

[0037] Based on the above-mentioned method embodiment, the present invention provides a corresponding computer-readable storage medium embodiment, including: a stored computer program, which controls the device where the computer-readable storage medium is located to execute the multi-machine system transient stability assessment method based on the hyper-cutting plane as described in the present invention when the computer program is running.

[0038] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0039] After receiving a firmware upgrade package information query request through a server, the present invention queries whether there is an upgraded user device in the same local area network as the target user device. When the server determines that there is an upgraded user device, the server sends the version information of the firmware upgrade package of the upgraded user device to the target user device. When the version information of the firmware upgrade package of the upgraded user device is higher than the firmware version information currently stored in the target user device itself, the firmware upgrade package is obtained from the upgraded user device and the firmware upgrade is performed. When the server determines that there is no upgraded user device, the server sends the version information of the firmware upgrade package stored in the server to the target user device. When the firmware upgrade package of the server When the firmware version information of the upgrade package is higher than the firmware version information currently stored in the target user device itself, the firmware upgrade package is obtained from the server and the firmware upgrade is performed. That is, the present invention can perform firmware upgrades by obtaining firmware upgrade packages between devices, and can also perform firmware upgrades by obtaining firmware upgrade packages between devices and servers. It not only makes full use of the computing and storage resources on the device side, but also reduces the computing pressure on the server and the occurrence of network congestion, and solves the problem that the existing technology of using a central structure for firmware download cannot adapt to the situation where a large number of device sides need to perform firmware upgrades, which increases the network congestion and computing pressure on the server side, and then leads to slow device firmware upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 :A flowchart of the steps of an OTA firmware upgrade method provided by an embodiment of the present invention;

[0041] Figure 2 : A system structure diagram of an OTA firmware upgrade system provided by an embodiment of the present invention;

[0042] Figure 3 : A schematic diagram of the multi-device OTA upgrade process based on the MQTT protocol provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] 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 only 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.

[0044] In the description of the present invention, it should be understood that the terms “first” and “second” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.

[0045] Embodiment 1:

[0046] Reference Figure 1 , is a flowchart of a method for OTA firmware upgrade provided by an embodiment of the present invention, the method at least comprising the following steps:

[0047] Step S1: Sending a firmware upgrade package information query request to a server, so that after receiving the firmware upgrade package information query request, the server queries the upgrade status of other user devices in the same local area network as the target user device, and when it is determined that there is no upgraded user device, the server feeds back the version information of the first firmware upgrade package stored in the server itself, and when it is determined that there is an upgraded user device, the server feeds back the version information of the second firmware upgrade package of the upgraded user device;

[0048] In this embodiment, the target user equipment refers to the user equipment that currently sends the firmware upgrade package information query request.

[0049] In this embodiment, the sending of the firmware upgrade package information query request to the server so that the server queries the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request includes:

[0050] Establish an MQTT connection with the server and send a firmware upgrade package information query request to the server via the MQTT protocol;

[0051] The server extracts the LAN IP of the target user device according to the MQTT protocol, and queries the upgrade status of other user devices with the same LAN IP as the target user device based on the LAN IP;

[0052] When the server determines that there is no upgraded user device, the server feeds back version information of the first firmware upgrade package stored in the server itself through the MQTT protocol;

[0053] When the server determines that there is an upgraded user device, the server feeds back version information of the second firmware upgrade package of the upgraded user device through the MQTT protocol.

[0054] Step S2: receiving version information of the firmware upgrade package sent by the server;

[0055] In this embodiment, the version information of the firmware upgrade package sent by the server is received through the MQTT protocol.

[0056] Step S3: when the firmware upgrade package is the first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a first firmware upgrade package acquisition request is sent to the server so that the server feeds back the first firmware upgrade package;

[0057] In this embodiment, when the version information of the firmware upgrade package received by the target user device from the server is the version information of the first firmware upgrade package, and the version information of the first firmware upgrade package is higher than the version of the firmware currently stored in the target user device, a first firmware upgrade package acquisition request is sent to the server through the MQTT protocol, so that after receiving the first firmware upgrade package acquisition request, the server fragments the first firmware upgrade package to obtain the fragmented first firmware upgrade package, and feeds back the fragmented first firmware upgrade package; when the version information of the firmware upgrade package received by the target user device from the server is the version information of the first firmware upgrade package, and the version information of the first firmware upgrade package is lower than or equal to the version of the firmware currently stored in the target user device, the target user device does not send the first firmware upgrade package acquisition request to the server.

[0058] In this embodiment, the fragmented first firmware upgrade package sent by the server is received, and the fragmented first firmware upgrade package is verified and combined to obtain a combined first firmware upgrade package;

[0059] The combined first firmware upgrade package is subjected to firmware information verification to obtain a verified first firmware upgrade package.

[0060] In this embodiment, the combined first firmware upgrade package and the unfragmented first firmware upgrade package stored in the server are verified for firmware information. When the firmware information verification shows that it is correct, the verified first firmware upgrade package is obtained. When the firmware information verification shows that it is wrong, the first firmware upgrade package acquisition request is re-sent to the server through the MQTT protocol, so that after receiving the first firmware upgrade package acquisition request, the server fragments the first firmware upgrade package to obtain the fragmented first firmware upgrade package, and feeds back the fragmented first firmware upgrade package. According to the fragmented first firmware upgrade package sent by the server, the fragmented first firmware upgrade package is verified, combined and firmware information verified until the firmware information verification shows that it is correct, and the verified first firmware upgrade package is obtained.

[0061] In this embodiment, the slice verification and firmware information verification include but are not limited to verification using the SHA256 algorithm.

[0062] Step S4: when the firmware upgrade package is a second firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a second firmware upgrade package acquisition request is sent to the upgraded user equipment so that the upgraded user equipment feeds back the second firmware upgrade package;

[0063] In this embodiment, when the version information of the firmware upgrade package received by the target user device from the server is the version information of the second firmware upgrade package, and the version information of the second firmware upgrade package is higher than the version of the firmware currently stored in the target user device, a second firmware upgrade package acquisition request is sent to the upgraded user device through the MQTT protocol, so that after receiving the second firmware upgrade package acquisition request, the upgraded user device fragments the second firmware upgrade package to obtain the fragmented second firmware upgrade package, and feeds back the fragmented second firmware upgrade package; when the version information of the firmware upgrade package received by the target user device from the server is the version information of the second firmware upgrade package, and the version information of the second firmware upgrade package is lower than or equal to the version of the firmware currently stored in the target user device, the target user device does not send the second firmware upgrade package acquisition request to the upgraded user device.

[0064] In this embodiment, a fragmented second firmware upgrade package sent by an upgraded user device is received, and the fragmented second firmware upgrade package is verified and combined to obtain a combined second firmware upgrade package;

[0065] The combined second firmware upgrade package is subjected to firmware information verification to obtain a verified second firmware upgrade package.

[0066] In this embodiment, the combined second firmware upgrade package and the unfragmented second firmware upgrade package stored in the upgraded user device are verified for firmware information. When the firmware information verification shows that it is correct, the verified second firmware upgrade package is obtained. When the firmware information verification shows that it is wrong, the second firmware upgrade package acquisition request is re-sent to the upgraded user device through the MQTT protocol, so that after receiving the second firmware upgrade package acquisition request, the upgraded user device fragments the second firmware upgrade package to obtain the fragmented second firmware upgrade package, and feeds back the fragmented second firmware upgrade package. According to the fragmented second firmware upgrade package sent by the upgraded user device, the fragmented second firmware upgrade package is verified, combined and firmware information verified until the firmware information verification shows that it is correct, and the verified second firmware upgrade package is obtained.

[0067] In this embodiment, the slice verification and firmware information verification include but are not limited to verification using the SHA256 algorithm.

[0068] Step S5: performing firmware upgrade according to the firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

[0069] In this embodiment, the firmware of the target user equipment is upgraded according to the verified first firmware upgrade package or the second firmware upgrade package.

[0070] In this embodiment, the target user equipment also sends the firmware upgrade progress to the console, so that the console displays the firmware upgrade progress status in real time when receiving the firmware upgrade progress.

[0071] Embodiment 2:

[0072] Reference Figure 2 , is a system structure diagram of an OTA firmware upgrade system provided by an embodiment of the present invention, the system comprising: a user device and a server; wherein the user device comprises: a target user device and other user devices except the target user device;

[0073] The target user equipment is used to send a firmware upgrade package information query request to the server,

[0074] The server is used to query the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request, and feedback the version information of the first firmware upgrade package stored in the server itself when it is determined that there is no upgraded user device, and feedback the version information of the second firmware upgrade package of the upgraded user device when it is determined that there is an upgraded user device;

[0075] The target user equipment is used to receive version information of the firmware upgrade package sent by the server;

[0076] The target user equipment is used to send a first firmware upgrade package acquisition request to the server when the firmware upgrade package is the first firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the server feeds back the first firmware upgrade package;

[0077] The target user equipment is used to send a second firmware upgrade package acquisition request to the upgraded user equipment when the firmware upgrade package is the second firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the upgraded user equipment feeds back the second firmware upgrade package;

[0078] The target user equipment is used to perform firmware upgrade according to a firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

[0079] In this embodiment, the target user equipment refers to the user equipment that currently sends the firmware upgrade package information query request.

[0080] In this embodiment, the system further includes: a console;

[0081] The console is used to receive the firmware upgrade progress sent by the target user equipment and display the firmware upgrade progress status in real time.

[0082] Embodiment 3:

[0083] Referring to 3, a schematic diagram of a multi-device OTA upgrade process based on the MQTT protocol provided in an embodiment of the present invention, combined with the steps of an OTA firmware upgrade method described in Example 1, the multi-device OTA upgrade process is as follows:

[0084] Step A1: Device A carries a token, initializes the OTA client, establishes an MQTT connection with the OTA server, and subscribes to the v1 / devices / me / attributes, v1 / devices / me / attributes / response / +, and v2 / fw / response / + / chunk / + queues;

[0085] Step A2: Device A sends a firmware upgrade package information query request to the OTA server through the v1 / devices / me / attributes / request / ${requestId} queue (step A2.1), so that after receiving the firmware upgrade package information query request, the OTA server queries the upgrade status of other devices in the same local area network as device A (step A2.2), and when it is determined that there is no upgraded device in the same local area network, the OTA server obtains the firmware upgrade package from the console (step A2.3), and the OTA server feeds back the firmware upgrade package information stored in the OTA server to device A;

[0086] Step A3: Device A receives the firmware upgrade package information sent by the server through the v1 / devices / me / attributes / request / ${requestId} queue; wherein the firmware upgrade package information includes but is not limited to title, version information, size, checksum, checksum algorithm, firmware upgrade mode, OTA server IP, and OTA server port;

[0087] Step A4: Device A compares the firmware upgrade package information sent by the server. When it is determined that the version of the firmware upgrade package is higher than the version of the firmware currently stored in device A, device A sends a firmware upgrade package acquisition request to the server through the v2 / fw / request / ${requestId} / chunk / ${chunkNum} queue according to the firmware upgrade mode in the firmware upgrade package information, so that after receiving the firmware upgrade package acquisition request, the server fragments the firmware upgrade package to obtain the fragmented firmware upgrade package, and feeds back the fragmented firmware upgrade package;

[0088] Step A5: Device A receives the fragmented firmware upgrade package sent by the server through the v2 / fw / response / ${requestId} / chunk / ${chunkNum} queue, performs fragment verification on the fragmented firmware upgrade package and combines them to obtain a combined firmware upgrade package, and uses a verification algorithm to perform firmware information verification on the combined firmware upgrade package to obtain a verified firmware upgrade package;

[0089] Step A6: Device A performs firmware upgrade according to the verified firmware upgrade package, and sends the firmware upgrade progress to the OTA server through the v1 / devices / me / telemetry queue (step A6.1), so that the console obtains the firmware upgrade progress of device A from the OTA server and displays the firmware upgrade status of device A in real time (step A6.2);

[0090] Step A7: Device B carries the token, initializes the OTA client, establishes an MQTT connection with the OTA server, and subscribes to the v1 / devices / me / attributes, v1 / devices / me / attributes / response / +, and v2 / fw / response / + / chunk / + queues;

[0091] Step A8: Device B sends a firmware upgrade package information query request to the OTA server through the v1 / devices / me / attributes / request / ${requestId} queue (step A8.1), so that after receiving the firmware upgrade package information query request, the OTA server queries the upgrade status of other devices in the same local area network as device B (step A8.2). When it is determined that there is an upgraded device in the same local area network and the upgraded device is device A, the OTA server feeds back the firmware upgrade package information stored in the upgraded device A to device B;

[0092] Step A9: Device B receives the firmware upgrade package information stored in the upgraded device A sent by the server through the v1 / devices / me / attributes / request / ${requestId} queue; wherein the firmware upgrade package information includes but is not limited to the title, version information, size, checksum, checksum algorithm, firmware upgrade mode, IP address of the upgraded device A, and port number of the upgraded device A;

[0093] Step A10: Device B compares the firmware upgrade package information stored in the upgraded device A sent by the server (step A10.1). When it is determined that the version of the firmware upgrade package stored in the upgraded device A is higher than the version of the firmware currently stored in device B, device B establishes an MQTT connection with the upgraded device A according to the firmware upgrade package information, and subscribes to the v2 / fw / response / ${requestId} / chunk / ${chunkNum} queue of device A (step A10.2);

[0094] Step A11: Device B sends a firmware upgrade package acquisition request to the upgraded device A through the v2 / fw / request / ${requestId} / chunk / ${chunkNum} queue, so that after receiving the firmware upgrade package acquisition request, the upgraded device A fragments the firmware upgrade package to obtain the fragmented firmware upgrade package and feeds back the fragmented firmware upgrade package;

[0095] Step A12: Device B receives the fragmented firmware upgrade package sent by the server through the v2 / fw / response / ${requestId} / chunk / ${chunkNum} queue, performs fragment verification on the fragmented firmware upgrade package and combines them to obtain a combined firmware upgrade package, and uses a verification algorithm to perform firmware information verification on the combined firmware upgrade package to obtain a verified firmware upgrade package;

[0096] Step A13: Device B performs firmware upgrade according to the verified firmware upgrade package, and sends the firmware upgrade progress to the OTA server through the v1 / devices / me / telemetry queue (step A13.1), so that the console obtains the firmware upgrade progress of device B from the OTA server and displays the firmware upgrade status of device B in real time (step A13.2).

[0097] Based on the above method embodiment, another embodiment is provided;

[0098] Another embodiment of the present invention provides an OTA firmware upgrade terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements an OTA firmware upgrade method described in any one of the above method embodiments of the present invention.

[0099] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the OTA firmware upgrade terminal device.

[0100] The OTA firmware upgrade terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The OTA firmware upgrade terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that, for example, the OTA firmware upgrade terminal device may also include input and output devices, network access devices, buses, etc.

[0101] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the OTA firmware upgrade terminal device, and uses various interfaces and lines to connect the various parts of the entire OTA firmware upgrade terminal device.

[0102] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the OTA firmware upgrade terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0103] Based on the above method embodiment, another embodiment is provided;

[0104] A storage medium provided by another embodiment of the present invention includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute an OTA firmware upgrade method described in any one of the above method embodiments of the present invention.

[0105] Wherein, the above-mentioned storage medium is a computer-readable storage medium, and the module / unit integrated in the OTA firmware upgrade system / terminal device, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0106] It should be noted that the above-mentioned terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the above-mentioned terminal device is merely an example and does not constitute a limitation on the terminal device. It may include more or fewer components, or a combination of certain components, or different components.

[0107] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. An OTA firmware upgrade method, applicable to a target user device, characterized in that: include: Sending a firmware upgrade package information query request to a server, so that after receiving the firmware upgrade package information query request, the server queries the upgrade status of other user devices in the same local area network as the target user device, and when it is determined that there is no upgraded user device, the server feeds back the version information of the first firmware upgrade package stored in the server itself, and when it is determined that there is an upgraded user device, the server feeds back the version information of the second firmware upgrade package of the upgraded user device; Receive version information of the firmware upgrade package sent by the server; When the firmware upgrade package is a first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a first firmware upgrade package acquisition request is sent to the server so that the server feeds back the first firmware upgrade package; When the firmware upgrade package is a second firmware upgrade package and it is determined, based on the version information of the firmware upgrade package, that the version of the firmware upgrade package is higher than the version of the currently stored firmware, a second firmware upgrade package acquisition request is sent to the upgraded user equipment so that the upgraded user equipment feeds back the second firmware upgrade package; The firmware upgrade is performed according to the firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

2. An OTA firmware upgrade method according to claim 1, characterized in that: The step of sending the firmware upgrade package information query request to the server so that the server queries the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request includes: Establish an MQTT connection with the server and send a firmware upgrade package information query request to the server via the MQTT protocol; The server extracts the LAN IP of the target user device according to the MQTT protocol, and queries the upgrade status of other user devices with the same LAN IP as the target user device according to the LAN IP.

3. An OTA firmware upgrade method according to claim 2, characterized in that: The method of feeding back version information of a first firmware upgrade package stored in the server itself when it is determined that no upgraded user equipment exists, and feeding back version information of a second firmware upgrade package of the upgraded user equipment when it is determined that an upgraded user equipment exists, comprises: When it is determined that there is no upgraded user device, the server feeds back version information of the first firmware upgrade package stored in the server itself through the MQTT protocol; When it is determined that there is an upgraded user device, the server feeds back version information of the second firmware upgrade package of the upgraded user device through the MQTT protocol.

4. The OTA firmware upgrade method according to claim 3, characterized in that: When the firmware upgrade package is the first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a first firmware upgrade package acquisition request to the server so that the server feeds back the first firmware upgrade package, including: When the firmware upgrade package is a first firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a first firmware upgrade package acquisition request to the server, so that after receiving the first firmware upgrade package acquisition request, the server fragments the first firmware upgrade package to obtain the fragmented first firmware upgrade package, and feeds back the fragmented first firmware upgrade package; receiving the fragmented first firmware upgrade package sent by the server, performing fragment verification on the fragmented first firmware upgrade package and combining the fragments to obtain a combined first firmware upgrade package; The combined first firmware upgrade package is subjected to firmware information verification to obtain a verified first firmware upgrade package.

5. The OTA firmware upgrade method according to claim 4, characterized in that: The step of sending a second firmware upgrade package acquisition request to an upgraded user device so that the upgraded user device feeds back the second firmware upgrade package when the firmware upgrade package is a second firmware upgrade package and determining, according to the version information of the firmware upgrade package, that the version of the firmware upgrade package is higher than the version of the currently stored firmware, includes: When the firmware upgrade package is a second firmware upgrade package and it is determined according to the version information of the firmware upgrade package that the version of the firmware upgrade package is higher than the version of the currently stored firmware, sending a second firmware upgrade package acquisition request to the upgraded user equipment, so that after receiving the second firmware upgrade package acquisition request, the upgraded user equipment fragments the second firmware upgrade package to obtain the fragmented second firmware upgrade package, and feeds back the fragmented second firmware upgrade package; receiving a fragmented second firmware upgrade package sent by an upgraded user device, performing fragment verification on the fragmented second firmware upgrade package and combining the fragments to obtain a combined second firmware upgrade package; The combined second firmware upgrade package is subjected to firmware information verification to obtain a verified second firmware upgrade package.

6. An OTA firmware upgrade method according to claim 5, characterized in that: Also includes: The firmware upgrade progress is sent to the console, so that the console displays the firmware upgrade progress status in real time when receiving the firmware upgrade progress.

7. An OTA firmware upgrade system, characterized in that: include: User equipment and a server; wherein the user equipment includes: a target user equipment and other user equipments except the target user equipment; The target user equipment is used to send a firmware upgrade package information query request to the server, The server is used to query the upgrade status of other user devices in the same local area network as the target user device after receiving the firmware upgrade package information query request, and feedback the version information of the first firmware upgrade package stored in the server itself when it is determined that there is no upgraded user device, and feedback the version information of the second firmware upgrade package of the upgraded user device when it is determined that there is an upgraded user device; The target user equipment is used to receive version information of the firmware upgrade package sent by the server; The target user equipment is used to send a first firmware upgrade package acquisition request to the server when the firmware upgrade package is the first firmware upgrade package and, according to the version information of the firmware upgrade package, determines that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the server feeds back the first firmware upgrade package; The target user equipment is used to send a second firmware upgrade package acquisition request to the upgraded user equipment when the firmware upgrade package is the second firmware upgrade package and, according to the version information of the firmware upgrade package, it is determined that the version of the firmware upgrade package is higher than the version of the currently stored firmware, so that the upgraded user equipment feeds back the second firmware upgrade package; The target user equipment is used to perform firmware upgrade according to a firmware upgrade package; wherein the firmware upgrade package includes: a first firmware upgrade package or a second firmware upgrade package.

8. An OTA firmware upgrade system according to claim 7, characterized in that: Also includes: Console; The console is used to receive the firmware upgrade progress sent by the target user equipment and display the firmware upgrade progress status in real time.

9. An OTA firmware upgrade terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, an OTA firmware upgrade method as described in any one of claims 1 to 6 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute an OTA firmware upgrade method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Terminal device firmware upgrading method and system

    CN103379142A

  • IOT product firmware updating method and system

    CN107040404A

  • Server for OTA upgrading and embedded device upgrading method and device

    CN110633092A

  • OTA upgrading method and system of network terminal equipment

    CN115955471A

  • Distributed upgrading method and device, computer equipment and storage medium

    CN118784471A