Firmware upgrading method and device, equipment, server and storage medium

By establishing multiple channels, sharding and transmitting multiple data shards between the terminal device and the server, the problem of unstable communication connection during firmware upgrade is solved, and the efficiency and stability of firmware upgrade is improved.

CN119806575APending Publication Date: 2025-04-11QUECTEL WIRELESS SOLUTIONS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411829223.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During the firmware upgrade process of terminal devices, due to unstable communication connections, the firmware upgrade efficiency is inefficient.

Method used

By establishing multiple channels between the terminal device and the server, sharding and transmitting multiple data shards, the data transmission efficiency and firmware upgrade efficiency are improved.

Benefits of technology

It improves the efficiency of data transmission and firmware upgrade efficiency, and undertakes transmission tasks through other channels when channel connection is abnormal, improving the stability and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806575A_ABST
    Figure CN119806575A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware upgrading method and device, equipment, a server and a storage medium. The firmware upgrading method comprises the steps that the terminal equipment receives m data fragments from a first server on n first channels between the terminal equipment and the first server; the terminal equipment obtains a firmware data packet according to the m data fragments; wherein the firmware data packet is used for upgrading target firmware in the terminal equipment. According to the embodiment of the invention, the plurality of data fragments are transmitted through the plurality of channels, so that the data transmission efficiency can be improved, and the firmware upgrading efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a firmware upgrade method, device, equipment, server and storage medium. Background Art

[0002] The firmware upgrade of terminal devices is an indispensable part of device maintenance. It can improve the performance and compatibility of terminal devices and enable them to achieve better operation status. During the firmware upgrade, the terminal device needs to obtain a new firmware data packet, and then upgrade the firmware in the terminal device to a new firmware version according to the new firmware data packet. However, during the firmware upgrade process of the terminal device, the efficiency of the firmware upgrade may be affected by unstable communication connections. Summary of the invention

[0003] The embodiments of the present application provide a firmware upgrade method, apparatus, device, server, and storage medium, which can improve the efficiency of data transmission by transmitting multiple data slices through multiple channels, so as to further improve the efficiency of firmware upgrade.

[0004] On the one hand, an embodiment of the present application provides a firmware upgrade method, which is applied to a terminal device, and the method includes:

[0005] On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0006] A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0007] In some embodiments of the present application, the above firmware upgrade method further includes:

[0008] On n first channels, m data transmission topics are sent to the first server; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

[0009] In some embodiments of the present application, sending m data transmission topics to the first server on n first channels includes:

[0010] On the first of the first channels, s1 data transmission topics are sent to the first server; wherein s1 is a positive integer;

[0011] On the tth first channel, s is received from the first server tAfter the data is split, on the t+1th first channel, s is sent to the first server. t+1 The data transmission topics until s is sent to the first server on the nth first channel. n The data transmission topics; wherein t is a positive integer less than n; s t is a positive integer, and the s1 to s n The sum is equal to the m.

[0012] In some embodiments of the present application, the s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

[0013] In some embodiments of the present application, sending m data transmission topics to the first server on n first channels includes:

[0014] The data transmission topics are sent to the first server simultaneously on n first channels; wherein the sum of the numbers of the data transmission topics transmitted on the n first channels is equal to m.

[0015] In some embodiments of the present application, receiving m data slices from the first server on n first channels between the terminal device and the first server includes:

[0016] On the tth first channel, receiving s from the first server t The data fragments; wherein, t is a positive integer less than n; s t is a positive integer;

[0017] Upon receiving s t After the data is split, on the t+1th first channel, receiving s from the first server t+1 The data fragments are received until s is received from the first server on the nth first channel. n The data fragments; wherein, the s1 to the s n The sum is equal to the m; the s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

[0018] In some embodiments of the present application, the priority ranking of the m data slices is consistent with the ranking of the degree of influence of the m data slices on the device operating status of the terminal device; or, the priority ranking of the m data slices is consistent with the ranking of the degree of influence of the m data slices on the firmware upgrade process of the target firmware.

[0019] In some embodiments of the present application, the method further includes:

[0020] On the tth first channel, if s is received t The data fragments are transmitted on the tth first channel, and then the fragment confirmation information is sent to the first server; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the s transmitted on the tth first channel. t the data fragments; the t is a positive integer less than the n; the s t Is a positive integer.

[0021] In some embodiments of the present application, the method further includes:

[0022] sending connection indication information to the first server on a second channel between the terminal device and the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels;

[0023] Sending error log information to the first server on a third channel between the terminal device and the first server; wherein the error log information is used to indicate that an error occurs in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

[0024] On the other hand, an embodiment of the present application provides a firmware upgrade method, applied to a first server, the method comprising:

[0025] On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0026] In some embodiments of the present application, the method further includes:

[0027] On n first channels, m data transmission topics are received from the terminal device; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

[0028] In some embodiments of the present application, the method further includes:

[0029] receiving the fragment confirmation information from the terminal device on n first channels; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the fragment confirmation information transmitted on the tth first channel. t the data fragments; the t is a positive integer less than the n; the s t is a positive integer;

[0030] In response to not receiving the fragment confirmation information on the tth first channel within a first preset time period, sending s to the terminal device on the tth first channel t The data shards.

[0031] In some embodiments of the present application, the method further includes:

[0032] receiving connection indication information from the terminal device on a second channel between the terminal device and the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels;

[0033] On a third channel between the terminal device and the first server, error log information is received from the terminal device; wherein the error log information is used to indicate that an error occurs in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

[0034] On the other hand, an embodiment of the present application provides a firmware upgrade device, the device comprising:

[0035] A first receiving module, configured to receive m data slices from the first server on n first channels between the terminal device and the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0036] A data packet acquisition module is used to acquire a firmware data packet according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0037] On the other hand, an embodiment of the present application provides a firmware upgrade device, the device comprising:

[0038] The second sending module is used to send m data slices to the terminal device on n first channels between the terminal device and the first server; wherein, one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0039] On the other hand, an embodiment of the present application provides a terminal device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the following steps:

[0040] On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0041] A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0042] On the other hand, an embodiment of the present application provides a first server, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor performs the following steps:

[0043] On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0044] On the other hand, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of any one of the firmware upgrade methods provided in the embodiments of the present application.

[0045] The firmware upgrade method provided in the embodiment of the present application divides the firmware data packet required for the firmware upgrade into multiple data slices, and the terminal device receives the multiple data slices from the first server through multiple channels, and then obtains the firmware data packet according to the multiple data slices to further realize the firmware upgrade. The embodiment of the present application transmits multiple data slices through multiple channels, which can improve the efficiency of data transmission, so as to further improve the efficiency of the firmware upgrade. In addition, multiple channels are established between the terminal device and the first server, and when a channel is abnormally connected, the transmission task can be undertaken through other channels, which can improve the stability and reliability of data transmission, so as to further improve the stability and reliability of the firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 It is a schematic diagram of the architecture of a firmware upgrade system provided in an embodiment of the present application;

[0048] Figure 2 It is a flowchart of a firmware upgrade method provided in an embodiment of the present application;

[0049] Figure 3 is a schematic diagram of a communication connection provided by an embodiment of the present application;

[0050] Figure 4 It is a flowchart of another firmware upgrade method provided in an embodiment of the present application;

[0051] Figure 5 It is a structural schematic diagram of a firmware upgrade device provided in an embodiment of the present application;

[0052] Figure 6 It is a structural schematic diagram of another firmware upgrade device provided in an embodiment of the present application;

[0053] Figure 7 It is a structural diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0055] In the following description, specific embodiments of the present invention will be described with reference to steps and symbols performed by one or more computers, unless otherwise specified. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and computer execution referred to herein includes operations by a computer processing unit of electronic signals representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which does not represent a limitation, and those skilled in the art will understand that the various steps and operations described below can also be implemented in hardware.

[0056] The term "module" or "unit" used herein can be regarded as a software object executed on the computing system. The different components, modules, engines and services described herein can be regarded as implementation objects on the computing system. The apparatus and method described herein are preferably implemented in software, but can also be implemented in hardware, all within the scope of protection of the present invention.

[0057] Those skilled in the art will appreciate that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when an element is "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0058] Please refer to Figure 1 , which shows a schematic diagram of the architecture of a firmware upgrade system provided by an embodiment of the present application. The firmware upgrade system may include: a terminal device 10 and a first server 20.

[0059] The terminal device 10 may be any type of smart device, which may be a mobile terminal or a relatively fixed terminal. For example, the terminal device 10 may be a mobile phone, a computer, a game console, an e-reader, a wearable device, a smart home device, a vehicle, an Internet of Things device, etc.

[0060] The first server 20 communicates and interacts with the terminal device 10 to implement the firmware upgrade of the terminal device 10. For example, the first server 20 can provide the terminal device 10 with a data packet required for the firmware upgrade, or provide the address of the data packet required for the firmware upgrade. For another example, the first server 20 can retry or resume the firmware upgrade process of the terminal device 10 according to an error that occurs during the firmware upgrade process of the terminal device 10.

[0061] Alternatively, if Figure 1 As shown, the firmware upgrade system may further include a second server 30. The second server 30 communicates and interacts with the first server 20 to provide background management for the firmware upgrade of the terminal device 10. For example, the second server 30 may display the progress and status of the firmware upgrade, initiate the firmware upgrade, upload the data packets required for the firmware upgrade, and the like.

[0062] like Figure 1 As shown, the first server 20 and the second server 30 can both be components of the developer center console. The firmware developer can upload the data packets required for the firmware upgrade, view the progress and status of the firmware upgrade, etc. through the second server 30, and can also manage the transmission method of the data packets required for the firmware upgrade through the first server 20.

[0063] In one example, the firmware upgrade method provided in the embodiment of the present application is implemented through OTA (Over-the-Air) technology, and the terminal device 10 and the first server 20 communicate based on the MQTT (Message Queuing Telemetry Transport) protocol; based on this, the first server 20 can be implemented as an MQTT Broker (MQTT proxy server), and the second server 30 can be implemented as an OTA server. Of course, the devices in the firmware upgrade system can also communicate based on other communication protocols, such as HTTP (HyperText Transfer Protocol), LwM2M (Lightweight M2M, Lightweight M2M (Machine-to-Machine, Device to Device)) protocol, etc., and the embodiment of the present application does not limit this.

[0064] Please refer to Figure 2, which shows a flowchart of a firmware upgrade method provided by an embodiment of the present application. The firmware upgrade method can be applied to Figure 1 In the firmware upgrade system shown in FIG. 1 , for example, the firmware upgrade method may be performed by Figure 1 The firmware upgrade system shown in the figure is executed by the terminal device. Figure 2 As shown, the firmware upgrade method includes the following steps (steps 110 to 120):

[0065] Step 110: The terminal device receives m data slices from the first server on n first channels between the terminal device and the first server;

[0066] Step 120: The terminal device obtains a firmware data packet according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0067] The embodiment of the present application establishes multiple channels (i.e., communication channels) between the terminal device and the first server, and the multiple channels include n first channels, where n is a positive integer. Among them, the first channel can be a channel dedicated to transmitting data fragments, or a channel for transmitting data fragments and other data (such as log information, etc.). The multiple channels between the terminal device and the first server can also include other channels other than the first channel, such as the second channel and the third channel. Please refer to the following embodiments for the introduction and description, which will not be repeated here.

[0068] The firmware data packet required for the target firmware upgrade is divided into m data slices, where m is a positive integer. For example, the first server divides the firmware data packet into m data slices, or the second server divides the firmware data packet into m data slices. Among them, a first channel is used to transmit one or more data slices. In an embodiment of the present application, the data slices transmitted in two different first channels may be the same or different. Taking a first channel as an example in which a data slice is transmitted, and the data slices transmitted in any two different first channels are different, the above n is equal to m. Of course, in the case where the number of data slices transmitted by a first channel is multiple, or the data slices transmitted in two different first channels are the same, the above n may not be equal to m, such as n may be less than m or n may be greater than m, and the embodiment of the present application does not limit this.

[0069] After receiving the m data slices, the terminal device can obtain a firmware data packet based on the m data slices. For example, the terminal device can first perform a legitimacy check on the m data slices, and if the legitimacy check is successful, assemble the m data slices into a firmware data packet. Among them, the legitimacy check includes but is not limited to an integrity check and a correctness check. Among them, the integrity check can be implemented through CRC (Cyclic Redundancy Check), hash check, etc.; the correctness check can be implemented through data format check, data packet sequence number check, firmware version check, encryption / decryption check, etc. During the legitimacy check process, if there are one or more data slices that fail the legitimacy check, the terminal device can send a first error message to the first server, so that the first server retransmits the one or more data slices, or causes the first server to retransmit all data slices.

[0070] In summary, the firmware upgrade method provided in the embodiment of the present application divides the firmware data packet required for the firmware upgrade into multiple data slices, and the terminal device receives the multiple data slices from the first server through multiple channels, and then obtains the firmware data packet according to the multiple data slices to further realize the firmware upgrade. The embodiment of the present application transmits multiple data slices through multiple channels, which can improve the efficiency of data transmission, so as to further improve the efficiency of firmware upgrade. In addition, multiple channels are established between the terminal device and the first server, and when a channel is abnormally connected, the transmission task can be undertaken through other channels, which can improve the stability and reliability of data transmission, so as to further improve the stability and reliability of firmware upgrade.

[0071] In one example, the firmware upgrade method may further include the following steps (step 130):

[0072] Step 130: The terminal device sends connection indication information to the first server on the second channel between the terminal device and the first server.

[0073] The connection indication information is used to determine whether the communication connection based on the first channel is abnormal. For example, the connection indication information can be information that the terminal device needs to send to the first server regularly in the heartbeat mechanism, such as a heartbeat packet. In an embodiment of the present application, the connection indication information is transmitted through a second channel, and the second channel and any one of the first channels are two different channels. Based on this, the transmission of the connection indication information and the transmission of the data fragments can be isolated from each other to avoid conflicts or mutual influences between the two.

[0074] In one example, the firmware upgrade method may further include the following steps (step 140):

[0075] Step 140: The terminal device sends error log information to the first server on the third channel between the terminal device and the first server.

[0076] Among them, the error log information is used to indicate that an error occurred in the terminal device during the firmware upgrade process of the target firmware. Optionally, the error log information may also include the time when the error occurred, the cause of the error, etc. In an embodiment of the present application, the error log information is transmitted through a third channel, and the third channel and any one of the first channels are two different channels. Based on this, the transmission of the error log information and the transmission of the data slices can be isolated from each other to avoid conflicts or mutual influences between the two. Optionally, the third channel and the second channel can be the same channel, or the third channel and the second channel can be two different channels.

[0077] For example, Figure 3 As shown, three types of channels are established between the terminal device and the first server, namely, the first channel, the second channel and the third channel; wherein the first channel can be used to transmit data fragments, the second channel can be used to transmit connection indication information, and the third channel can be used to transmit error log information.

[0078] To summarize, the firmware upgrade method provided in the embodiment of the present application establishes multiple types of channels between the terminal device and the first server, and each type of channel transmits different types of data to achieve isolation between different types of data transmission. For example, the transmission of data segmentation is isolated from the transmission of error log information, connection indication information, etc., to avoid conflicts or mutual influences between different types of data transmission, which helps to improve the stability and reliability of data segment transmission, thereby improving the stability and reliability of firmware upgrades.

[0079] In one example, the firmware upgrade method may further include the following steps (step 100):

[0080] Step 100: The terminal device sends m data transmission topics to the first server on n first channels.

[0081] Among them, a data transmission topic is used to indicate the transmission of a data slice, and a first channel is also used to transmit one or more data transmission topics. In an embodiment of the present application, for a first channel, if a terminal device sends a data transmission topic to a first server on the first channel, the first server sends the data slice indicated by the data transmission topic to the terminal device on the first channel; if the terminal device sends multiple data transmission topics to the first server on the first channel, the first server sends the data slices indicated by the multiple data transmission topics to the terminal device on the first channel.

[0082] Optionally, the terminal device may send m data transmission topics to the first server at the same time, and the first server may return the data slices (m data slices) indicated by the m data transmission topics to the terminal device in sequence, or may return the data slices (m data slices) indicated by the m data transmission topics to the terminal device at the same time. Optionally, the terminal device may send m data transmission topics to the first server in sequence, and continue to send the next order of data transmission topics after receiving each data slice from the first server. Optionally, the terminal device may send m data transmission topics to the first server at the same time, and the first server may also return the data slices (m data slices) indicated by the m data transmission topics to the terminal device at the same time. The terminal device may receive the data slices (m data slices) indicated by the m data transmission topics at the same time or in sequence.

[0083] In an example, taking the example of a terminal device sending a data transmission topic to the first server in sequence, the above step 100 may include the following steps (steps 1011 to 1012):

[0084] Step 1011: On the first first channel, the terminal device sends s1 data transmission topics to the first server; where s1 is a positive integer;

[0085] Step 1012: The terminal device receives s from the first server on the tth first channel. t After data sharding, on the t+1th first channel, s is sent to the first server. t+1 data transmission topics until s is sent to the first server on the nth first channel n data transmission topics; where t is a positive integer less than n; s t is a positive integer, and s1 to s n The sum is equal to m.

[0086] The terminal device may sort the n first channels, for example, according to the identification serial numbers of the n first channels. Starting from the first channel of the n first channels, the terminal device sends s1 data transmission topics to the first server on the first first channel, and then the terminal device receives s1 data slices (data slices indicated by the s1 data transmission topics) from the first server on the first first channel; in response to receiving s1 data slices on the first first channel, the terminal device sends s2 data transmission topics to the first server on the second first channel, and then the terminal device receives s2 data slices (data slices indicated by the s2 data transmission topics) from the first server on the second first channel... The terminal device receives s1 data slices on the tth first channel. t After data sharding, send s to the first server on the t+1th first channel.t+1 data transmission topics... and so on, until the terminal device sends s to the first server on the nth first channel. n The terminal device then receives the s data transmission topic from the first server on the nth first channel. n Data shards (s n data shards indicated by the data transfer topics).

[0087] In one example, taking the case where the terminal device simultaneously sends a data transmission topic to the first server, the above step 100 may include the following steps (step 1021):

[0088] Step 1021: The terminal device sends data transmission topics to the first server on n first channels simultaneously; wherein the sum of the numbers of data transmission topics transmitted on the n first channels is equal to m.

[0089] In this example, after the terminal device sends m data transmission topics, it can receive m data fragments at the same time or sequentially.

[0090] In an example, taking the example that the terminal device simultaneously sends a data transmission topic to the first server, but sequentially receives data slices from the first server, the above step 110 may include the following steps (steps 111 to 112):

[0091] Step 111: The terminal device receives s from the first server on the tth first channel. t data shards; where t is a positive integer less than n; s t is a positive integer;

[0092] Step 112: The terminal device receives s t After data sharding, on the t+1th first channel, s is received from the first server. t+1 data shards until s is received from the first server on the nth first channel n data shards; among them, s1 to s n The sum is equal to m.

[0093] The terminal device may sort the n first channels, for example, according to the identification serial numbers of the n first channels. Starting from the first channel of the n first channels, the terminal device receives s1 data slices from the first server on the first first channel; in response to receiving s1 data slices on the first first channel, the terminal device receives s2 data slices from the first server on the second first channel... After receiving s t After data shards, s is received from the first server on the t+1th first channel.t+1 data shards until receiving s from the first server on the nth first channel n data shards.

[0094] Optionally, in the embodiment of the present application, the s transmitted on the tth first channel t The priority of the data fragment is higher than that of the s transmitted on the t+1th first channel. t+1 That is to say, when the terminal device transmits m data transmission topics to the first server in sequence, the data transmission topics corresponding to the data slices with higher priorities can be sorted according to the priorities of the data slices, and the data transmission topics corresponding to the data slices with lower priorities can be transmitted first; when the terminal device receives the m data slices from the first server in sequence, the data slices can also be sorted according to the priorities of the data slices, and the data slices with higher priorities can be received first, and the data slices with lower priorities can be received.

[0095] Optionally, the priority ranking of the m data slices is consistent with the ranking of the influence of the m data slices on the device operating status of the terminal device, that is, the greater the influence of the data slice on the device operating status, the higher the priority of the data slice; or, the priority ranking of the m data slices is consistent with the ranking of the influence of the m data slices on the firmware upgrade process of the target firmware, that is, the greater the influence of the data slice on the firmware upgrade process, the higher the priority of the data slice.

[0096] In summary, in the firmware upgrade method provided in the embodiment of the present application, the terminal device can send data transmission topics to the first server and receive data fragments from the first server in a variety of ways, thereby improving the flexibility of data transmission.

[0097] In one example, after the above step 110, the following step (step 150) may also be included:

[0098] Step 150: The terminal device receives s on the tth first channel. t If there are data fragments, fragment confirmation information is sent to the first server.

[0099] The fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the s transmitted on the tth first channel. t data shards; t is a positive integer less than n; s t Is a positive integer.

[0100] The first server may set a preset confirmation time for the slice confirmation information of the data slice, for example, the duration of the preset confirmation time is a preset duration (such as 1 second or 2 seconds, etc.), and the time when the first server sends the data slice is taken as the starting time. After the first server sends one or more data slices to the terminal device on any first channel, if the first server does not receive the slice confirmation information from the terminal device on the first channel within the preset confirmation time, it is considered that the data slice transmission on the first channel has failed, and the first server may retransmit the data slice on the first channel.

[0101] Optionally, the preset confirmation time may be a non-fixed confirmation time, which may be determined according to the number of times the first server has not received the fragment confirmation information. For example, for a certain first channel, on the first channel, if the first server has not received the fragment confirmation information within the preset confirmation time, the first server retransmits the data fragment to the terminal device, and then the first server sets a shorter preset confirmation time, and uses the new preset confirmation time as the basis for whether to retransmit.

[0102] To sum up, the firmware upgrade method provided in the embodiment of the present application transmits multiple data slices through multiple data channels, and the terminal device confirms and responds to the reception results of the multiple data slices through slice confirmation information, so that the first server can clearly understand the transmission status of the data slices and take retransmission measures when necessary to ensure that the data slices are received by the terminal device.

[0103] It should be understood that the steps performed by the first server in the above-mentioned embodiment can be implemented as a firmware upgrade method on the first server side. Figure 4 , which shows a flowchart of a firmware upgrade method provided by an embodiment of the present application. The firmware upgrade method can be applied to Figure 1 In the firmware upgrade system shown in FIG. 1 , for example, the firmware upgrade method may be performed by Figure 1 The first server in the firmware upgrade system shown in FIG. Figure 4 As shown, the firmware upgrade method includes the following steps (step 410):

[0104] Step 410: The first server sends m data slices to the terminal device on n first channels between the terminal device and the first server.

[0105] Among them, a first channel is used to transmit one or more data slices; m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0106] In one example, the firmware upgrade method may further include the following steps (step 420):

[0107] Step 420: The first server receives m data transmission topics from the terminal device on n first channels, wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

[0108] In an example, the firmware upgrade method may further include the following steps:

[0109] Step 430: The first server receives the fragment confirmation information from the terminal device on the n first channels; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the fragment transmitted on the tth first channel. t data shards; t is a positive integer less than n; s t is a positive integer;

[0110] Step 440: In response to not receiving the fragment confirmation information on the tth first channel within the first preset time period, sending s to the terminal device on the tth first channel. t data shards.

[0111] In an example, the firmware upgrade method may further include the following steps:

[0112] Step 450: The first server receives connection indication information from the terminal device on the second channel between the terminal device and the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; the second channel and any one of the first channels are two different channels;

[0113] Step 460: The first server receives error log information from the terminal device on the third channel between the terminal device and the first server; wherein the error log information is used to indicate that an error occurs in the terminal device during the firmware upgrade process of the target firmware; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

[0114] In summary, the firmware upgrade method provided in the embodiment of the present application divides the firmware data packet required for the firmware upgrade into multiple data slices, and the first server sends the multiple data slices to the terminal device through multiple channels, so that the terminal device obtains the firmware data packet according to the multiple data slices, so as to further realize the firmware upgrade. The embodiment of the present application transmits multiple data slices through multiple channels, which can improve the efficiency of data transmission, so as to further improve the efficiency of the firmware upgrade. In addition, multiple channels are established between the terminal device and the first server, and when a channel is abnormally connected, the transmission task can be undertaken through other channels, which can improve the stability and reliability of data transmission, so as to further improve the stability and reliability of the firmware upgrade.

[0115] Below, an example is used to introduce and illustrate the firmware upgrade method provided in an embodiment of the present application.

[0116] like Figure 3 As shown, multiple channels can be established between the terminal device and the first server. When the terminal device communicates with the first server through multiple channels, it can specify the address and port number of the first server. Before establishing the channel, the terminal device can use TLS (Transport Layer Security) or other security protocols to encrypt and authenticate the communication connection to ensure the security and reliability of data transmission. On each channel, the terminal device can set different QoS (Quality of Service) levels to control the quality and reliability of information transmission. The terminal device can use different data transmission topics to distinguish different data fragments to ensure the orderliness and reliability of data transmission. The terminal device can also control the order of receiving data fragments through different transmission strategies to ensure the integrity and correctness of the data.

[0117] like Figure 3 As shown, the channels between the terminal device and the first server include the first channel, the second channel and the third channel. Among them, the first channel is the main channel, which is used to transmit the data required for the firmware upgrade, such as data fragmentation, etc.; the second channel is used to transmit device status information and heartbeat packets, and the second channel can maintain a long-term connection to maintain the stability of the communication connection; the third channel is used to transmit log information, etc. By establishing multiple channels, the firmware upgrade and device status information can be processed separately, improving the efficiency and stability of the firmware upgrade, and at the same time, log information can be easily collected for developers to debug and optimize.

[0118] In the embodiment of the present application, multiple first channels can be established between the first server and a single terminal device to transmit multiple data slices, such as Figure 3 In actual application, multiple first channels may be established between the first server and multiple terminal devices. For example, a first channel may be established between the first server and each terminal device to transmit the data slices required by each terminal device.

[0119] Taking a single terminal device as an example, when multiple first channels are established between the terminal device and the first server, in order to avoid all data fragments being sent to the same first channel, a load balancing algorithm can be added to evenly distribute the data fragments to each first channel. Optionally, the load balancing algorithm includes but is not limited to: a polling algorithm, a random algorithm, a weighted polling algorithm, a weighted random algorithm, etc.

[0120] After the terminal device reassembles multiple data fragments into a firmware data packet, it can verify the device status after the firmware upgrade. For example, after the firmware upgrade is completed, the terminal device needs to perform a self-check on the upgraded terminal device to check whether the upgraded terminal device meets the upgrade requirements and specifications; or, the terminal device can compare and check the device status before and after the upgrade to ensure that the upgraded device functions and performance meet the requirements; or, the terminal device can compare and check the device data before and after the upgrade to ensure the integrity and correctness of the upgraded device data.

[0121] One point that needs to be explained is that the embodiment of the present application does not limit the execution order of the above-mentioned steps. The above embodiment labels the steps for the convenience of description, but this does not constitute a limitation on the embodiment of the present application. In practical applications, the execution order of the steps of the firmware upgrade method in the embodiment of the present application can be implemented and belongs to the protection scope of the present application.

[0122] In order to better implement the firmware upgrade method provided in the embodiment of the present application, the embodiment of the present application also provides a firmware upgrade device based on the above firmware upgrade method. The meanings of the terms are the same as those in the above firmware upgrade method, and the specific implementation details can refer to the description in the method embodiment.

[0123] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application. The firmware upgrade device has the function of implementing the method example on the terminal device side described above. The function can be implemented by hardware or by hardware executing corresponding software. The firmware upgrade device can be the terminal device described above or can be set in the terminal device. Figure 5 As shown, the firmware upgrade device 500 may include: a first receiving module 510 and a data packet acquiring module 520 .

[0124] A first receiving module 510 is configured to receive m data slices from the first server on n first channels between the terminal device and the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0125] The data packet acquisition module 520 is used to acquire a firmware data packet according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0126] In one example, the firmware upgrade device 500 further includes a first sending module ( Figure 5 ), for:

[0127] On n first channels, m data transmission topics are sent to the first server; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

[0128] In one example, the firmware upgrade device 500 further includes a first sending module ( Figure 5 not shown);

[0129] The first sending module ( Figure 5 ), for: sending s1 data transmission topics to the first server on the first first channel; wherein s1 is a positive integer;

[0130] The first receiving module 510 is further configured to: receive s from the first server on the tth first channel t After the data is split, on the t+1th first channel, s is sent to the first server. t+1 The data transmission topics until s is sent to the first server on the nth first channel. n The data transmission topics; wherein t is a positive integer less than n; s t is a positive integer, and the s1 to s n The sum is equal to the m.

[0131] In one example, the s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

[0132] In one example, the firmware upgrade device 500 further includes a first sending module ( Figure 5 ), for:

[0133] The data transmission topics are sent to the first server simultaneously on n first channels; wherein the sum of the numbers of the data transmission topics transmitted on the n first channels is equal to m.

[0134] In an example, the first receiving module 510 is further configured to:

[0135] On the tth first channel, receiving s from the first server t The data fragments; wherein, t is a positive integer less than n; s t is a positive integer;

[0136] Upon receiving s tAfter the data is split, on the t+1th first channel, receiving s from the first server t+1 The data fragments are received until s is received from the first server on the nth first channel. n The data fragments; wherein, the s1 to the s n The sum is equal to the m; the s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

[0137] In one example, the priority ranking of the m data slices is consistent with the ranking of the degree of influence of the m data slices on the device operating status of the terminal device; or, the priority ranking of the m data slices is consistent with the ranking of the degree of influence of the m data slices on the firmware upgrade process of the target firmware.

[0138] In one example, the firmware upgrade device 500 further includes a first sending module ( Figure 5 ), for:

[0139] On the tth first channel, if s is received t The data fragments are transmitted on the tth first channel, and then the fragment confirmation information is sent to the first server; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the s transmitted on the tth first channel. t the data fragments; the t is a positive integer less than the n; the s t Is a positive integer.

[0140] In one example, the firmware upgrade device 500 further includes a first sending module ( Figure 5 ), for:

[0141] sending connection indication information to the first server on a second channel between the terminal device and the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels;

[0142] Sending error log information to the first server on a third channel between the terminal device and the first server; wherein the error log information is used to indicate that an error occurs in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

[0143] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a firmware upgrade device provided in an embodiment of the present application. The firmware upgrade device has the function of implementing the method example on the first server side described above. The function can be implemented by hardware or by hardware executing corresponding software. The firmware upgrade device can be the first server described above, or it can be set in the first server. Figure 6 As shown, the firmware upgrade device 600 may include: a second sending module 610.

[0144] The second sending module 610 is used to send m data slices to the terminal device on n first channels between the terminal device and the first server; wherein, one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0145] In one example, the firmware upgrade device 600 further includes a second receiving module ( Figure 6 ), for:

[0146] On n first channels, m data transmission topics are received from the terminal device; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

[0147] In one example, the firmware upgrade device 600 further includes a second receiving module ( Figure 6 not shown);

[0148] a second receiving module, configured to: receive the fragment confirmation information from the terminal device on n first channels; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the fragment confirmation information transmitted on the tth first channel; t the data fragments; the t is a positive integer less than the n; the s t is a positive integer;

[0149] The second sending module 610 is configured to: in response to not receiving the fragment confirmation information on the tth first channel within a first preset time period, send s to the terminal device on the tth first channel. t The data shards.

[0150] In one example, the firmware upgrade device 600 further includes a second receiving module ( Figure 6 not shown);

[0151] a second receiving module, configured to: receive connection indication information from the terminal device on a second channel between the terminal device and the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels;

[0152] The second receiving module is also used to: receive error log information from the terminal device on a third channel between the terminal device and the first server; wherein the error log information is used to indicate that an error occurred in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

[0153] Figure 7 It is a schematic diagram of the structure of the communication device of an embodiment of the present application. Figure 7 A dashed line in a box indicates that the unit or module is optional. Figure 7 The communication device 700 in the embodiment may be used to implement the method described in the above method embodiment. The communication device 700 may be a chip, a terminal device or a first server.

[0154] The communication device 700 may include one or more processors 710. The processor 710 may support the communication device 700 to implement the method described in the foregoing method embodiment. The processor 710 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor 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 gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0155] The communication device 700 may further include one or more memories 720. Computer programs are stored in the memories 720. The memories 720 may be independent of the processor 710 or may be integrated in the processor 710.

[0156] The communication device 700 may further include a transceiver 730. The processor 710 may communicate with other devices or chips through the transceiver 730. For example, the processor 710 may transmit and receive data with other devices or chips through the transceiver 730.

[0157] The computer program in the memory 720 can be executed by the processor 710, so that the processor 710 performs the following steps:

[0158] On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0159] A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0160] Alternatively, the computer program in the memory 720 may be executed by the processor 710, so that the processor 710 performs the following steps:

[0161] On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0162] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0163] To this end, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. The computer program is loaded by a processor to execute the steps in any one of the firmware upgrade methods provided in the embodiments of the present application.

[0164] For example, the computer program may be loaded by a processor and the following steps may be performed:

[0165] On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer;

[0166] A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

[0167] For another example, the computer program may be loaded by the processor and the following steps may be executed:

[0168] On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

[0169] The specific implementation of the above operations / steps can be found in the previous embodiments and will not be repeated here.

[0170] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0171] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the firmware upgrade methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the firmware upgrade methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0172] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the terminal device or the first server reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the terminal device or the first server executes the method provided in various optional implementations in the above embodiments.

[0173] The above is a detailed introduction to a firmware upgrade method, device, equipment, server and storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A firmware upgrade method, characterized in that: Applied to a terminal device, the method comprises: On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer; A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

2. The firmware upgrade method according to claim 1, characterized in that: The method further comprises: On n first channels, m data transmission topics are sent to the first server; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

3. The firmware upgrade method according to claim 2, characterized in that: The sending m data transmission topics to the first server on the n first channels comprises: On the first of the first channels, s1 data transmission topics are sent to the first server; wherein s1 is a positive integer; On the tth first channel, s is received from the first server t After the data is split, on the t+1th first channel, s is sent to the first server. t+1 The data transmission topics until s is sent to the first server on the nth first channel. n The data transmission topics; wherein t is a positive integer less than n; s t is a positive integer, and the s1 to s n The sum is equal to the m.

4. The firmware upgrade method according to claim 3, characterized in that: The s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

5. The firmware upgrade method according to claim 2, characterized in that: The sending m data transmission topics to the first server on the n first channels comprises: The data transmission topics are sent to the first server simultaneously on n first channels; wherein the sum of the numbers of the data transmission topics transmitted on the n first channels is equal to m.

6. The firmware upgrade method according to claim 5, characterized in that: Receiving m data slices from the first server on n first channels between the terminal device and the first server includes: On the tth first channel, receiving s from the first server t The data fragments; wherein, t is a positive integer less than n; s t is a positive integer; Upon receiving s t After the data is split, on the t+1th first channel, receiving s from the first server t+1 The data fragments are received until s is received from the first server on the nth first channel. n The data fragments; wherein, the s1 to the s n The sum is equal to the m; the s transmitted on the tth first channel t The priority of the data fragment is higher than the priority of the s data fragment transmitted on the t+1th first channel. t+1 The priority of each data segment.

7. The firmware upgrade method according to claim 4 or 6, characterized in that: The priority ranking of the m data slices is consistent with the ranking of the influence of the m data slices on the device operation status of the terminal device; or, The priority ranking of the m data slices is consistent with the ranking of the influence of the m data slices on the firmware upgrade process of the target firmware.

8. The firmware upgrade method according to claim 1, characterized in that: The method further comprises: On the tth first channel, if s is received t The data fragments are transmitted on the tth first channel, and then the fragment confirmation information is sent to the first server; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the s transmitted on the tth first channel. t the data fragments; the t is a positive integer less than the n; the s t Is a positive integer.

9. The firmware upgrade method according to claim 1, characterized in that: The method further comprises: On a second channel between the terminal device and the first server, connection indication information is sent to the first server; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels.

10. The firmware upgrade method according to claim 9, characterized in that: The method further comprises: Sending error log information to the first server on a third channel between the terminal device and the first server; wherein the error log information is used to indicate that an error occurs in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

11. A firmware upgrade method, characterized in that: Applied to a first server, the method comprises: On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

12. The firmware upgrade method according to claim 11, characterized in that: The method further comprises: On n first channels, m data transmission topics are received from the terminal device; wherein one data transmission topic is used to indicate the transmission of one data segment, and one first channel is also used to transmit one or more data transmission topics.

13. The firmware upgrade method according to claim 11, characterized in that: The method further comprises: receiving the fragment confirmation information from the terminal device on n first channels; wherein the fragment confirmation information transmitted on the tth first channel is used to indicate that the terminal device has received the fragment confirmation information transmitted on the tth first channel. t the data fragments; the t is a positive integer less than the n; the s t is a positive integer; In response to not receiving the fragment confirmation information on the tth first channel within a first preset time period, sending s to the terminal device on the tth first channel t The data shards.

14. The firmware upgrade method according to claim 11, characterized in that: The method further comprises: On a second channel between the terminal device and the first server, connection indication information is received from the terminal device; wherein the connection indication information is used to determine whether the communication connection based on the first channel is abnormal; and the second channel and any one of the first channels are two different channels.

15. The firmware upgrade method according to claim 14, characterized in that: The method further comprises: On a third channel between the terminal device and the first server, error log information is received from the terminal device; wherein the error log information is used to indicate that an error occurs in the firmware upgrade process of the target firmware of the terminal device; the third channel and any one of the first channels are two different channels; the third channel and the second channel are the same channel, or the third channel and the second channel are two different channels.

16. A firmware upgrade device, characterized in that: The device comprises: A first receiving module, configured to receive m data slices from the first server on n first channels between the terminal device and the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer; A data packet acquisition module is used to acquire a firmware data packet according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

17. A firmware upgrade device, characterized in that: The device comprises: The second sending module is used to send m data slices to the terminal device on n first channels between the terminal device and the first server; wherein, one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

18. A terminal device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: On n first channels between the terminal device and the first server, m data slices are received from the first server; wherein one first channel is used to transmit one or more data slices; n is a positive integer, and m is a positive integer; A firmware data packet is obtained according to the m data slices; wherein the firmware data packet is used to upgrade the target firmware in the terminal device.

19. A first server, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: On n first channels between the terminal device and the first server, m data slices are sent to the terminal device; wherein one first channel is used to transmit one or more data slices; the m data slices are used to obtain firmware data packets, and the firmware data packets are used to upgrade the target firmware in the terminal device; n is a positive integer, and m is a positive integer.

20. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the firmware upgrade method described in any one of claims 1 to 10, or to execute the steps in the firmware upgrade method described in any one of claims 11 to 15.