CN116107603B - Firmware upgrading method and device, storage medium and electronic equipment - Google Patents
Firmware upgrading method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN116107603B CN116107603B CN202211465766.8A CN202211465766A CN116107603B CN 116107603 B CN116107603 B CN 116107603B CN 202211465766 A CN202211465766 A CN 202211465766A CN 116107603 B CN116107603 B CN 116107603B
- Authority
- CN
- China
- Prior art keywords
- file
- upgrade
- internet
- firmware
- mobile terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 230000005540 biological transmission Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the application provides a firmware upgrading method, a firmware upgrading device, a storage medium and electronic equipment, wherein the firmware upgrading method comprises the following steps: under the condition that long connection is established with the Internet of things equipment, an acquisition instruction for acquiring the upgrade record file is sent to the Internet of things equipment; the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment; receiving an upgrade recording file sent by the Internet of things; determining a target upgrade file from at least one upgrade file based on the upgrade recording file and the upgrade package description file; and sending the target upgrade file to the Internet of things equipment so as to facilitate firmware upgrade of the Internet of things equipment based on the target upgrade file. By means of the technical scheme, the problem that upgrading fails when the memory of the Internet of things equipment is small and the upgrading packet is large can be solved.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a firmware upgrade method, apparatus, storage medium, and electronic device.
Background
With the development and progress of scientific technology, the internet of things equipment gradually goes into thousands of households. In order to solve the problem caused by the firmware system, firmware upgrading is required to be performed on the internet of things device. The memory of most of the devices of the internet of things is not too large due to many factors such as cost and design. When the upgrade package of the firmware upgrade is larger, after the upgrade package is transmitted once, the internet of things equipment fails to upgrade due to insufficient memory.
Disclosure of Invention
An object of the embodiment of the application is to provide a firmware upgrading method, a firmware upgrading device, a storage medium and electronic equipment, so as to solve the problem that upgrading fails when the memory of the internet of things equipment is small and an upgrading packet is large.
In a first aspect, an embodiment of the present application provides a firmware upgrade method, where the firmware upgrade method is used in a mobile terminal, a firmware upgrade package for performing firmware upgrade is stored in the mobile terminal, and the firmware upgrade package includes at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file; the firmware upgrading method comprises the following steps: under the condition that long connection is established with the Internet of things equipment, an acquisition instruction for acquiring the upgrade record file is sent to the Internet of things equipment; the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment; receiving an upgrade recording file sent by the Internet of things; determining a target upgrade file from at least one upgrade file based on the upgrade recording file and the upgrade package description file; and sending the target upgrade file to the Internet of things equipment so as to facilitate firmware upgrade of the Internet of things equipment based on the target upgrade file.
Therefore, by means of the technical scheme, the method and the device for upgrading the firmware of the Internet of things equipment can solve the problem that the firmware of the Internet of things equipment which can be connected with the mobile terminal for a long time is upgraded from the mobile terminal, so that the firmware can be upgraded when the memory of the equipment is insufficient, and the problems that the upgrading is failed when the memory of the Internet of things equipment is small and an upgrading packet is large and the upgrading is time-consuming due to the fact that the upgrading is failed again can be solved.
In one possible embodiment, before sending an acquisition instruction for acquiring the upgrade record file to the internet of things device, the firmware upgrade method further includes: and sending a mode entering instruction for indicating to enter a firmware upgrading mode to the Internet of things equipment so that the Internet of things equipment enters the firmware upgrading mode based on the mode entering instruction and feeds back a message of successfully entering the firmware upgrading mode to the mobile terminal.
In one possible embodiment, sending the target upgrade file to the internet of things device includes: and sending the target upgrade file to the Internet of things equipment under the condition that the size of the target upgrade file does not exceed the data size which can be received by the Internet of things equipment at a time.
In one possible embodiment, sending the target upgrade file to the internet of things device includes: dividing the target upgrade file into a plurality of first subfiles under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; and respectively sending the plurality of first subfiles to the Internet of things equipment.
In one possible embodiment, determining the target upgrade file from the at least one upgrade file based on the upgrade record file and the upgrade package description file includes: under the condition that the upgrade record file indicates that the Internet of things equipment has received partial data of the first upgrade file in the firmware upgrade package, determining the first upgrade file as a target upgrade file; sending a target upgrade file to an internet of things device, comprising: dividing the target upgrade file into a plurality of second subfiles; determining at least one second subfile to be transmitted from the plurality of second subfiles based on the upgrade recording file; the at least one second sub-file is a second sub-file corresponding to the residual data except partial data in the first upgrading file; and sending at least one second subfile to the Internet of things device.
In a second aspect, an embodiment of the present application provides a firmware upgrade method, where the firmware upgrade method is applied to an internet of things device; the firmware upgrading method comprises the following steps: receiving an acquisition instruction sent by the mobile terminal for acquiring the upgrade recording file under the condition that long connection is established with the mobile terminal; the mobile terminal comprises a mobile terminal and an upgrade recording file, wherein the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment, the mobile terminal stores the firmware upgrade package for carrying out firmware upgrade, and the firmware upgrade package comprises at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file; based on the acquisition instruction, sending an upgrade recording file to the mobile terminal; receiving a target upgrading file sent by a mobile terminal; the target upgrade file is determined from at least one upgrade file by the mobile terminal based on the upgrade record file and the upgrade package description file; and carrying out firmware upgrading based on the target upgrading file.
In one possible embodiment, before receiving the acquiring instruction for acquiring the upgrade recording file sent by the mobile terminal, the firmware upgrade method further includes: receiving a mode entering instruction sent by a mobile terminal and used for indicating to enter a firmware upgrading mode; based on the mode entering instruction, entering a firmware upgrading mode, and feeding back a message of successfully entering the firmware upgrading mode to the mobile terminal.
In one possible embodiment, receiving the target upgrade file sent by the mobile terminal includes: and receiving the target file sent by the mobile terminal under the condition that the size of the target upgrade file does not exceed the data size which can be received by the internet of things equipment at a time.
In one possible embodiment, receiving the target upgrade file sent by the mobile terminal includes: receiving a plurality of first subfiles sent by the mobile terminal under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; the plurality of first subfiles are obtained by dividing the target upgrade file.
In one possible embodiment, the target upgrade file is determined by the mobile terminal based on the first upgrade file if the upgrade recording file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package; the method for receiving the target upgrade file sent by the mobile terminal comprises the following steps: receiving at least one second subfile sent by the mobile terminal; the at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrading file in the plurality of second sub-files, and the plurality of second sub-files are obtained by dividing the target upgrading file.
In a third aspect, an embodiment of the present application provides a firmware upgrade apparatus, where the firmware upgrade apparatus is applied to a mobile terminal, a firmware upgrade package for performing firmware upgrade is stored in the mobile terminal, and the firmware upgrade package includes at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file; the firmware upgrading device comprises: the first sending module is used for sending an acquisition instruction for acquiring the upgrade record file to the Internet of things equipment under the condition that long connection is established with the Internet of things equipment; the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment; the first receiving module is used for receiving the upgrade recording file sent by the Internet of things; the determining module is used for determining a target upgrade file from at least one upgrade file based on the upgrade record file and the upgrade package description file; the first sending module is further used for sending the target upgrade file to the Internet of things equipment so that the Internet of things equipment can conduct firmware upgrade based on the target upgrade file.
In one possible embodiment, the first sending module is further configured to send, to the internet of things device, a mode entry instruction for instructing to enter the firmware upgrade mode before sending, to the internet of things device, an acquisition instruction for acquiring the upgrade record file, so that the internet of things device enters the firmware upgrade mode based on the mode entry instruction, and feedback a message to the mobile terminal that the firmware upgrade mode is successfully entered.
In one possible embodiment, the first sending module is specifically configured to send the target upgrade file to the internet of things device when the size of the target upgrade file does not exceed the data size that can be received by the internet of things device at a time.
In a possible embodiment, the first sending module is specifically configured to: dividing the target upgrade file into a plurality of first subfiles under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; and respectively sending the plurality of first subfiles to the Internet of things equipment.
In one possible embodiment, the determining module is specifically configured to determine the first upgrade file as the target upgrade file when the upgrade record file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package; the first sending module is specifically configured to: dividing the target upgrade file into a plurality of second subfiles; determining at least one second subfile to be transmitted from the plurality of second subfiles based on the upgrade recording file; the at least one second sub-file is a second sub-file corresponding to the residual data except partial data in the first upgrading file; and sending at least one second subfile to the Internet of things device.
In a fourth aspect, an embodiment of the present application provides a firmware upgrade apparatus, where the firmware upgrade apparatus is applied to an internet of things device; the firmware upgrading device comprises: the second receiving module is used for receiving an acquisition instruction sent by the mobile terminal and used for acquiring the upgrade record file under the condition that long connection is established with the mobile terminal; the mobile terminal comprises a mobile terminal and an upgrade recording file, wherein the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment, the mobile terminal stores the firmware upgrade package for carrying out firmware upgrade, and the firmware upgrade package comprises at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file; the second sending module is used for sending an upgrade recording file to the mobile terminal based on the acquisition instruction; the second receiving module is further used for receiving the target upgrade file sent by the mobile terminal; the target upgrade file is determined from at least one upgrade file by the mobile terminal based on the upgrade record file and the upgrade package description file; and the upgrading module is used for upgrading the firmware based on the target upgrading file.
In one possible embodiment, the second receiving module is further configured to: before receiving an acquisition instruction for acquiring an upgrade record file sent by a mobile terminal, receiving a mode entry instruction sent by the mobile terminal for indicating to enter a firmware upgrade mode; based on the mode entering instruction, entering a firmware upgrading mode, and feeding back a message of successfully entering the firmware upgrading mode to the mobile terminal.
In one possible embodiment, the second receiving module is specifically configured to receive the target file sent by the mobile terminal when the size of the target upgrade file does not exceed the data size that can be received by the internet of things device at a time.
In a possible embodiment, the second receiving module is specifically configured to receive, when the size of the target upgrade file exceeds the size of data that can be received by the internet of things device at a time, a plurality of first subfiles sent by the mobile terminal; the plurality of first subfiles are obtained by dividing the target upgrade file.
In one possible embodiment, the target upgrade file is determined by the mobile terminal based on the first upgrade file if the upgrade recording file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package; the second receiving module is specifically configured to: receiving at least one second subfile sent by the mobile terminal; the at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrading file in the plurality of second sub-files, and the plurality of second sub-files are obtained by dividing the target upgrading file.
In a fifth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect or any alternative implementation of the first aspect.
In a sixth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the second aspect or any alternative implementation of the second aspect.
In a seventh aspect, embodiments of the present application provide an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the method of the first aspect or any alternative implementation of the first aspect.
In an eighth aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the method of the second aspect or any alternative implementation of the second aspect.
In a ninth aspect, the present application provides a computer program product which, when run on a computer, causes the computer to perform the method of the first aspect or any possible implementation of the first aspect.
In a tenth aspect, the present application provides a computer program product which, when run on a computer, causes the computer to perform the method of the second aspect or any of the possible implementations of the second aspect.
In order to make the above objects, features and advantages of the embodiments of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a firmware upgrade system provided by an embodiment of the present application;
FIG. 2 is a flowchart of a firmware upgrade method according to an embodiment of the present application;
FIG. 3 is a block diagram illustrating a firmware upgrade apparatus according to an embodiment of the present application;
fig. 4 shows a block diagram of a firmware upgrade apparatus according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present invention will be made more apparent and fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments of the invention are shown. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the invention, are within the scope of the invention.
Some internet of things devices may have less memory when shipped from the factory due to cost savings, design, and other factors. With the continued upgrade of services associated with the internet of things device, the firmware therein may need to be updated. But at this time, the internet of things equipment is often sold to consumers, and the memory of the internet of things equipment is difficult to expand from hardware. By adopting a conventional upgrading method, when a firmware upgrading packet is required to be upgraded, the physical network equipment can independently complete the upgrade, but when the firmware upgrading packet is larger, the upgrading packet is transmitted once, the internet of things equipment fails to be upgraded because of insufficient memory, and once the upgrading fails, the equipment needs to be upgraded from scratch, and is particularly time-consuming, even falls into the upgrading failure, and the cycle of downloading the upgrade from scratch can not work normally temporarily or for a long time.
In order to solve the problems that in the prior art, the memory of the Internet of things equipment is small, the upgrading is failed when the upgrading packet is large, and the upgrading is time-consuming when the upgrading is failed again at the occurrence, the embodiment of the application provides a firmware upgrading scheme. According to the scheme, the mobile terminal is used for assisting the Internet of things equipment in completing firmware upgrading, after the mobile terminal obtains a complete firmware upgrading package, the complete firmware upgrading package is sent to the Internet of things equipment by taking an upgrading file therein as a unit, so that the Internet of things equipment can gradually update the firmware by using a complete single upgrading file, and after one upgrading file is updated, the next upgrading file is obtained from the mobile terminal for updating, and therefore updating of the whole firmware upgrading package is achieved. By adopting the mode, when the memory of the equipment end of the Internet of things is small but the firmware upgrade package is large, the equipment of the Internet of things can successfully complete the updating of the firmware system, and when the updating fails, the updating can be continued by a breakpoint continuous transmission mode, so that the updating time is shortened. It can be understood that, even if the size of the firmware upgrade package is smaller than the memory of the internet of things device, the firmware upgrade can be implemented by adopting the scheme in the embodiment of the application.
Referring to fig. 1, fig. 1 is a schematic diagram of a firmware upgrade system according to an embodiment of the present application. As shown in fig. 1, the firmware upgrade system includes an internet of things device, a mobile terminal, a server, and a developer terminal. The mobile terminal can be respectively in communication connection with the Internet of things equipment and the server, and the server is also in communication connection with the developer terminal.
It should be understood that the specific device of the internet of things device, the specific device of the mobile terminal, the specific device of the server, and the specific device of the developer terminal may all be set according to actual requirements, and the embodiment of the application is not limited thereto.
For example, the internet of things device may be an air sterilizer, a smart door lock, or the like. The Internet of things terminal supports long connection establishment with the mobile terminal.
For example, the mobile terminal may be a mobile phone, a tablet computer, or the like. In some implementations, the mobile terminal may be a terminal used by an owner of the internet of things device, a legitimate user, a maintenance person, etc.
For another example, the server may be a single server or a cluster of servers.
Referring to fig. 2, fig. 2 shows a flowchart of a firmware upgrade method provided in an embodiment of the present application. The firmware upgrading method shown in fig. 2 mainly relates to the internet of things equipment and the mobile terminal. The mobile terminal stores a firmware upgrade package for performing firmware upgrade, and the firmware upgrade package includes at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file.
For example, the firmware upgrade package stored in the mobile terminal may be from a firmware developer. The firmware developer may compress the upgrade file using the developer terminal to obtain a firmware upgrade package. The firmware upgrade package may include a plurality of upgrade files and an upgrade package description file, and the upgrade package description file may include a specific number of upgrade files and parameter information (or referred to as file information) of each upgrade file. The upgrade package description file in the firmware upgrade package may be a file sent to the internet of things device by the first mobile terminal, so that the internet of things device can determine whether a certain upgrade file has been received or not when receiving the upgrade file, what the next upgrade file to be received is. The size of each upgrade file in the at least one upgrade file may be smaller than the memory of the internet of things device.
It should be understood that the specific information included in the parameter information may be set according to actual requirements, and embodiments of the present application are not limited thereto. For example, the parameter information may include a file name of the upgrade file, a size of the upgrade file, a transmission of the upgrade file, an upgrade serial number, or the like.
The developer terminal may send the firmware upgrade package to the server, and then the mobile terminal may download the firmware upgrade package from the server to a local path of the mobile terminal, and decompress the firmware upgrade package to the local path, to obtain the decompressed firmware upgrade package. The size of the decompressed firmware upgrade package may be smaller than the memory of the mobile terminal.
The firmware upgrading method comprises the following steps:
step S210, under the condition that long connection is established with the Internet of things equipment, the mobile terminal sends an acquisition instruction for acquiring the upgrade record file to the Internet of things equipment. Correspondingly, the Internet of things equipment receives an acquisition instruction sent by the mobile terminal and used for acquiring the upgrade recording file.
It should be understood that the specific manner of long connection may be set according to actual requirements, and embodiments of the present application are not limited thereto. For example, the internet of things device may establish a long connection by establishing a bluetooth connection with the mobile terminal; for another example, the internet of things device may establish a TCP connection with the server, and the mobile terminal may also establish a TCP connection with the server, so as to achieve that the internet of things device and the mobile terminal establish a long connection.
It should also be appreciated that the upgrade record file may be used to indicate data in a firmware upgrade package that the internet of things device has received, i.e., the upgrade record file may indicate how much data in the firmware upgrade package the internet of things device has received. For example, the upgrade recording file may include a file name of a file currently to be transmitted, a file name of a file being transmitted, and/or a file name of a file that has been transmitted, and a transmitted size (e.g., percentage or amount of data, etc.).
For example, if the internet of things device has not previously received data in a certain firmware upgrade package at all, the upgrade recording file may be empty. If the internet of things equipment has previously received all data of one or more upgrade files in a certain firmware upgrade package and has completed the upgrade correspondingly, the name of the last upgrade file completed in the upgrade record file can be recorded, and the percentage of the last upgrade file completed in the upgrade record file is recorded as 100%; alternatively, the name of the upgrade file to be received next may be recorded in the upgrade recording file, and the percentage thereof is recorded as 0% correspondingly. If the internet of things equipment has previously received 40% of data of a certain upgrade file in a certain firmware upgrade package, the file name of the upgrade file can be recorded in an upgrade record file, and the percentage of the file name is recorded as 40% correspondingly; alternatively, the file name of the last upgrade file that has been completely received and completed is recorded in the upgrade recording file, and the percentage thereof is recorded as 100% correspondingly.
It is understood that in the case where the transmission and the upgrade of the plurality of upgrade files have a preset order, only the foregoing exemplary information may be included in the upgrade recording file. Whether the transmission and upgrading of the plurality of upgrading files have a preset sequence or not, other possible information can be included in the upgrading record file, for example, information including names of all the upgrading files which have been transmitted completely.
In some implementations, in a case where the internet of things device may establish a long connection with the mobile terminal, the mobile terminal may send a mode entry instruction for instructing to enter the firmware upgrade mode to the internet of things device, and wait for a reply of a result that the internet of things device enters the firmware upgrade mode. And after receiving the mode entering instruction, the Internet of things equipment can enter a firmware upgrading mode based on the mode entering instruction and feed back a message of successfully entering the firmware upgrading mode to the mobile terminal. And after replying and confirming that the Internet of things equipment enters firmware upgrading according to the result, the mobile terminal sends an acquisition instruction to the Internet of things equipment.
It should be noted that, in some possible cases, if the internet of things device does not enter the firmware upgrade mode, the internet of things device may also receive the data sent by the mobile terminal, but does not update the firmware. In other possible cases, if the internet of things device does not enter the firmware upgrade mode, it may refuse to accept the data related to the firmware upgrade package sent from the mobile terminal.
Step S220, the Internet of things equipment sends an upgrade recording file to the mobile terminal based on the acquisition instruction. Correspondingly. And the mobile terminal receives the upgrade record file sent by the Internet of things equipment.
Specifically, after the mobile terminal receives the message that the internet of things device successfully enters the firmware upgrade mode, the mobile terminal can send an acquisition instruction for acquiring the upgrade recording file to the internet of things device, and wait for the internet of things device to return a reply of the upgrade recording file. And the Internet of things equipment can send the upgrade record file to the mobile terminal.
In step S230, the mobile terminal determines a target upgrade file from at least one upgrade file based on the upgrade recording file and the upgrade package description file.
It should be understood that the specific file of the target upgrade file may be set according to actual requirements, and the embodiment of the application is not limited thereto.
Alternatively, the target upgrade file may be any one of a plurality of upgrade files.
For example, in the case that it is determined that all upgrade files in the firmware upgrade package are not transmitted to the internet of things device through the upgrade recording file, any one of the at least one upgrade file may be determined as the target upgrade file.
Optionally, the target upgrade file may be any one of upgrade files in the firmware upgrade package that are not sent to the internet of things device.
For example, in the case that it is determined that a part of the upgrade files in the firmware upgrade package are all transmitted to the internet of things device through the upgrade record file, any one of the remaining upgrade files in the firmware upgrade package that are not transmitted to the internet of things device may be determined as the target upgrade file.
Optionally, in the case that the upgrade record file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package (i.e., the first upgrade file is a file requiring breakpoint resume), the first upgrade file is determined to be the target upgrade file.
For example, in the case that the firmware upgrade package includes three upgrade files, namely, upgrade file a, upgrade file B and upgrade file C, in the case that upgrade file a has been transmitted last time, the upgrade record file received from the internet appliance at this time may be in the form that upgrade file a has been transmitted 100%, upgrade file B has been transmitted 20%, and upgrade file C has not been transmitted, so that the subsequent mobile terminal may know that upgrade file B is determined as the target upgrade file according to the upgrade record file, and then preferentially and sequentially transmit the remaining 80% of file data of upgrade file B, and after upgrade file B transmission is completed, then upgrade file C is transmitted.
Optionally, when the plurality of upgrade files have a preset transmission and upgrade order, and the upgrade record file indicates that the internet of things device has previously received the second upgrade file in the firmware upgrade package (i.e., a next file of the second upgrade file is a file that needs breakpoint resume), determining the next file of the second upgrade file as the target upgrade file.
To facilitate understanding of step S230, a description will be given below by way of specific examples.
Specifically, after the mobile terminal receives the upgrade recording file returned by the internet of things device, the mobile terminal can determine whether file information requiring breakpoint continuous transmission (for the whole firmware upgrade package) exists in the upgrade recording of the upgrade recording file. If the file information needing breakpoint resume is determined according to the upgrading record, the file needing breakpoint resume can be determined to be a target upgrading file; if it is determined that no file information requiring breakpoint continuous transmission is required according to the upgrade record, a first file to be sent can be found according to the sequence of the file information in the upgrade package description file, and the first file to be sent is determined to be a target upgrade file.
Step S240, the mobile terminal sends the target upgrade file to the Internet of things equipment. Correspondingly, the Internet of things equipment receives a target upgrade file sent by the mobile terminal.
Optionally, the target upgrade file is sent to the internet of things device under the condition that the size of the target upgrade file does not exceed the data size which can be received by the internet of things device at a time.
For example, under the condition that a first file to be sent is found according to the order of file information in the upgrade package description file, and the first file to be sent is determined to be a target upgrade file, the size of the target upgrade file can be determined not to exceed the data size which can be received by the internet of things equipment at a time, the target upgrade file can be sent to the internet of things equipment, and the whole target upgrade file which does not need to be subjected to segmentation processing can be sent to the internet of things equipment.
Optionally, under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things device at a time, dividing the target upgrade file into a plurality of first subfiles, and respectively sending the plurality of first subfiles to the internet of things device.
For example, under the condition that a first file to be sent is found according to the order of file information in the upgrade package description file, and the first file to be sent is determined to be a target upgrade file (that is, the target file is a target upgrade file which is not transmitted), the target upgrade file can be divided into a plurality of first subfiles according to the size of single receivable data of the internet of things device, the plurality of first subfiles are stored in a set, then the first subfiles in the set can be sent to the internet of things device, and the internet of things device waits for a reply of the first subfiles to be successfully received.
And after receiving the first sub-file sent by the mobile terminal, the internet of things device can judge whether the target file is transmitted according to the file size in the file information in the upgrade package description file.
If the target file is transmitted completely, updating the target file into a firmware system of the Internet of things equipment, modifying file information and transmitted size in the updated record file, and transmitting successfully received data to the mobile terminal after updating;
if the target file is not transmitted, the file information and the transmitted size in the upgrade record file can be modified, a reply of successfully receiving the first subfile is sent to the mobile terminal, and after the mobile terminal receives the reply of successfully receiving the first subfile returned by the internet of things device, whether the first subfile which is not sent exists in the set is judged. If the first sub-file which is not transmitted exists, continuing to transmit the next first sub-file in the set corresponding to the target file, and repeating the steps after receiving the reply of the first sub-file successfully received by the equipment end of the Internet of things; if the first sub-file which is not transmitted does not exist, judging whether the file which is not transmitted exists or not according to the upgrade file which is decompressed to the local. If the file which is not transmitted exists, determining the next target file from the file which is not transmitted, and repeatedly executing the related execution steps of the target upgrading file for the next target file; if there are no unsent files, it may be indicated that the upgrade package transmission is complete.
Optionally, in a case where the upgrade record file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package and the target upgrade file is the first upgrade file, the target upgrade file may be divided into a plurality of second subfiles, and at least one second subfile to be transmitted may be determined from the plurality of second subfiles based on the upgrade record file. The at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrade file, and the at least one second sub-file is sent to the internet of things device.
For example, in the case that file information requiring breakpoint resume is determined according to the upgrade record, and the file requiring breakpoint resume can be determined as the target upgrade file, the target upgrade file can be divided into a plurality of second subfiles according to the size of single receivable data of the internet of things device, the plurality of second subfiles are stored in a set, then the second subfiles requiring next transmission can be found in the set according to the size transmitted in the upgrade record file, the second subfiles requiring transmission are sent to the internet of things device, and the internet of things device waits for a reply of the second subfiles to be successfully received.
And after receiving the second sub-file sent by the mobile terminal, the internet of things device can judge whether the target file is transmitted according to the file size in the file information in the upgrade package description file.
If the target file is transmitted completely, updating the target file into a firmware system of the Internet of things equipment, modifying file information and transmitted size in the updated record file, and transmitting successfully received data to the mobile terminal after updating;
if the target file is not transmitted, the file information and the transmitted size in the upgrade record file can be modified, a reply of successfully receiving the second sub-file is sent to the mobile terminal, and after the mobile terminal receives the reply of successfully receiving the second sub-file returned by the internet of things device, whether the second sub-file which is not sent exists in the set is judged. If the second sub-file which is not transmitted exists, continuing to transmit the next second sub-file in the set corresponding to the target file, and repeating the steps after receiving the reply of the second sub-file successfully received by the equipment end of the Internet of things; if the second sub-file which is not transmitted does not exist, judging whether the file which is not transmitted exists or not according to the upgrade file which is decompressed to the local. If the unsent file exists, determining the next target file from the unsent file, and repeatedly executing the execution step of the unsent target upgrade file on the next target file; if there are no unsent files, it may be indicated that the upgrade package transmission is complete.
It should be noted that, although one object file is described above as an example, it should be understood by those skilled in the art that the number of object files may be plural, and that plural object files may be transmitted in parallel if the network environment allows, and the embodiment of the present application is not limited thereto.
Step S250, the Internet of things equipment upgrades the firmware based on the target upgrade file.
It should be understood that, based on the target upgrade file, the specific process of performing firmware upgrade may be set according to actual requirements, and the embodiment of the application is not limited thereto.
For example, the internet of things device may perform firmware upgrades according to existing methods.
It should be noted that, although the above description is made in terms of a scenario in which the memory of the internet of things device is too small, those skilled in the art will understand that the method is also applicable to other scenarios besides the above scenario.
For example, under the condition that the current running process of the internet of things equipment exceeds the preset process number, the task of firmware upgrading can be completed by the mobile terminal and the internet of things equipment, so that the task of firmware upgrading of the internet of things equipment can be shared by the mobile terminal.
In summary, according to the embodiment of the application, when the memory of the equipment end of the Internet of things is small but the firmware upgrade package is large, the equipment of the Internet of things can successfully complete the updating of the firmware system, and when the updating fails, the updating can be continued in a breakpoint continuous transmission mode, so that the updating time is shortened.
It should be understood that the firmware upgrade method described above is only exemplary, and those skilled in the art may make various modifications according to the method described above, and the solutions after the modifications are also within the scope of protection of the present application.
Referring to fig. 3, fig. 3 shows a block diagram of a firmware upgrade apparatus 300 according to an embodiment of the present application. It should be understood that, the firmware upgrade apparatus 300 is capable of performing the steps related to the mobile terminal in the above-described method embodiments, and specific functions of the firmware upgrade apparatus 300 may be referred to in the above-related description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy. The firmware upgrade apparatus 300 includes at least one software function module that can be stored in a memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the firmware upgrade apparatus 300. Specifically, the firmware upgrade apparatus 300 is applied to a mobile terminal, in which a firmware upgrade package for performing firmware upgrade is stored, and the firmware upgrade package includes at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file; the firmware upgrade apparatus 300 includes:
A first sending module 310, configured to send an obtaining instruction for obtaining an upgrade record file to an internet of things device when a long connection is established with the internet of things device; the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment;
the first receiving module 320 is configured to receive an upgrade record file sent by the internet of things;
a determining module 330, configured to determine a target upgrade file from at least one upgrade file based on the upgrade record file and the upgrade package description file;
the first sending module 310 is further configured to send the target upgrade file to the internet of things device, so that the internet of things device performs firmware upgrade based on the target upgrade file.
In a possible embodiment, the first sending module 310 is further configured to send, to the internet of things device, a mode entry instruction for instructing to enter the firmware upgrade mode before sending, to the internet of things device, an acquisition instruction for acquiring the upgrade record file, so that the internet of things device enters the firmware upgrade mode based on the mode entry instruction, and feedback a message to the mobile terminal that the firmware upgrade mode is successfully entered.
In one possible embodiment, the first sending module 310 is specifically configured to send the target upgrade file to the internet of things device if the size of the target upgrade file does not exceed the data size that can be received by the internet of things device at a time.
In one possible embodiment, the first sending module 310 is specifically configured to: dividing the target upgrade file into a plurality of first subfiles under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; and respectively sending the plurality of first subfiles to the Internet of things equipment.
In one possible embodiment, the determining module 330 is specifically configured to determine the first upgrade file as the target upgrade file if the upgrade record file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package;
the first sending module 310 is specifically configured to: dividing the target upgrade file into a plurality of second subfiles; determining at least one second subfile to be transmitted from the plurality of second subfiles based on the upgrade recording file; the at least one second sub-file is a second sub-file corresponding to the residual data except partial data in the first upgrading file; and sending at least one second subfile to the Internet of things device.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding procedure in the foregoing method for the specific working procedure of the apparatus described above, and this will not be repeated here.
Referring to fig. 4, fig. 4 is a block diagram illustrating a firmware upgrade apparatus 400 according to an embodiment of the present application. It should be understood that, the firmware upgrade apparatus 400 is capable of performing the steps related to the internet of things device in the above method embodiment, and specific functions of the firmware upgrade apparatus 400 may be referred to the above related description, and detailed descriptions are omitted herein as appropriate to avoid repetition. The firmware upgrade apparatus 400 includes at least one software function module that can be stored in a memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the firmware upgrade apparatus 400. Specifically, the firmware upgrade apparatus 400 is applied to an internet of things device; the firmware upgrade apparatus 400 includes:
a second receiving module 410, configured to receive an acquisition instruction sent by the mobile terminal for acquiring the upgrade recording file when a long connection is established with the mobile terminal; the mobile terminal comprises a mobile terminal and an upgrade recording file, wherein the upgrade recording file is used for indicating data in a firmware upgrade package received by the Internet of things equipment, the mobile terminal stores the firmware upgrade package for carrying out firmware upgrade, and the firmware upgrade package comprises at least one upgrade file and an upgrade package description file for recording parameter information of the upgrade file;
A second sending module 420, configured to send an upgrade recording file to the mobile terminal based on the acquisition instruction;
the second receiving module 410 is further configured to receive a target upgrade file sent by the mobile terminal; the target upgrade file is determined from at least one upgrade file by the mobile terminal based on the upgrade record file and the upgrade package description file;
the upgrade module 430 is configured to upgrade the firmware based on the target upgrade file.
In one possible embodiment, the second receiving module 410 is further configured to: before receiving an acquisition instruction for acquiring an upgrade record file sent by a mobile terminal, receiving a mode entry instruction sent by the mobile terminal for indicating to enter a firmware upgrade mode; based on the mode entering instruction, entering a firmware upgrading mode, and feeding back a message of successfully entering the firmware upgrading mode to the mobile terminal.
In a possible embodiment, the second receiving module 410 is specifically configured to receive the target file sent by the mobile terminal when the size of the target upgrade file does not exceed the data size that can be received by the internet of things device at a time.
In a possible embodiment, the second receiving module 410 is specifically configured to receive a plurality of first subfiles sent by the mobile terminal when the size of the target upgrade file exceeds the data size that can be received by the internet of things device at a time; the plurality of first subfiles are obtained by dividing the target upgrade file.
In one possible embodiment, the target upgrade file is determined by the mobile terminal based on the first upgrade file if the upgrade recording file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package;
the second receiving module 410 is specifically configured to: receiving at least one second subfile sent by the mobile terminal; the at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrading file in the plurality of second sub-files, and the plurality of second sub-files are obtained by dividing the target upgrading file.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding procedure in the foregoing method for the specific working procedure of the apparatus described above, and this will not be repeated here.
The present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the embodiments.
The present application also provides a computer program product which, when run on a computer, causes the computer to perform the method of the method embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding procedure in the foregoing method for the specific working procedure of the system described above, and this will not be repeated here.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes. It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (12)
1. The firmware upgrading method is characterized in that the firmware upgrading method is applied to a mobile terminal, a firmware upgrading packet for carrying out firmware upgrading is stored in the mobile terminal, and the firmware upgrading packet comprises at least one upgrading file and an upgrading packet description file for recording parameter information of the upgrading file; the firmware upgrading method comprises the following steps:
Under the condition that long connection is established with the Internet of things equipment, sending an acquisition instruction for acquiring an upgrade record file to the Internet of things equipment; the upgrade record file is used for indicating data in the firmware upgrade package received by the Internet of things equipment;
receiving an upgrade record file sent by the Internet of things equipment;
determining a target upgrade file from the at least one upgrade file based on the upgrade recording file and the upgrade package description file;
the target upgrading file is sent to the Internet of things equipment, so that the Internet of things equipment can conduct firmware upgrading based on the target upgrading file;
the sending the target upgrade file to the internet of things device includes:
dividing the target upgrade file into a plurality of first subfiles under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time;
respectively sending the plurality of first subfiles to the internet of things equipment;
the upgrade package describes the file size in the file information in the file, and can be used by the internet of things device to judge whether the transmission of the target upgrade file is completed after the first subfile is received; after the internet of things device completes firmware updating based on the target upgrade file, file information and transmitted size in the upgrade recording file in the internet of things device are modified, so that the internet of things device can acquire another upgrade file in the firmware upgrade package from the mobile terminal based on the long connection.
2. The firmware upgrade method according to claim 1, wherein before said sending an acquisition instruction for acquiring an upgrade recording file to the internet of things device, the firmware upgrade method further comprises:
and sending a mode entering instruction for indicating to enter a firmware upgrading mode to the Internet of things equipment so that the Internet of things equipment enters the firmware upgrading mode based on the mode entering instruction and feeds back a message of successfully entering the firmware upgrading mode to the mobile terminal.
3. The firmware upgrade method of claim 1, wherein the sending the target upgrade file to the internet of things device comprises:
and sending the target upgrade file to the Internet of things equipment under the condition that the size of the target upgrade file does not exceed the data size which can be received by the Internet of things equipment at a time.
4. The firmware upgrade method of claim 1, wherein the determining a target upgrade file from the at least one upgrade file based on the upgrade recording file and the upgrade package description file comprises:
determining the first upgrade file as a target upgrade file under the condition that the upgrade record file indicates that the Internet of things equipment has received partial data of the first upgrade file in the firmware upgrade package;
The sending the target upgrade file to the internet of things device includes:
dividing the target upgrade file into a plurality of second subfiles;
determining at least one second subfile to be transmitted from the plurality of second subfiles based on the upgrade record file; the at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrade file;
and sending the at least one second subfile to the internet of things device.
5. The firmware upgrading method is characterized by being applied to the Internet of things equipment; the firmware upgrading method comprises the following steps:
receiving an acquisition instruction sent by a mobile terminal for acquiring an upgrade record file under the condition that long connection is established with the mobile terminal; the mobile terminal comprises an upgrade recording file, a mobile terminal and a mobile terminal, wherein the upgrade recording file is used for indicating data in a firmware upgrade packet received by the Internet of things equipment, the mobile terminal stores the firmware upgrade packet for carrying out firmware upgrade, and the firmware upgrade packet comprises at least one upgrade file and an upgrade packet description file for recording parameter information of the upgrade file;
Based on the acquisition instruction, sending the upgrade recording file to the mobile terminal;
receiving a target upgrading file sent by the mobile terminal; the target upgrade file is determined from the at least one upgrade file by the mobile terminal based on the upgrade recording file and the upgrade package description file;
based on the target upgrade file, carrying out firmware upgrade;
the receiving the target upgrade file sent by the mobile terminal comprises the following steps:
receiving a plurality of first subfiles sent by the mobile terminal under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; the plurality of first subfiles are obtained by dividing the target upgrade file;
after receiving the first sub-file sent by the mobile terminal, judging whether the transmission of the target file is finished according to the file size in the file information in the upgrade package description file;
after the firmware update is completed based on the target upgrade file, file information and the transmitted size in the upgrade recording file are modified so that the internet of things device can acquire another upgrade file in the firmware upgrade package from the mobile terminal based on the long connection.
6. The firmware upgrade method according to claim 5, wherein before the receiving the acquisition instruction for acquiring the upgrade recording file transmitted by the mobile terminal, the firmware upgrade method further comprises:
receiving a mode entering instruction sent by the mobile terminal and used for indicating to enter a firmware upgrading mode;
and entering a firmware upgrading mode based on the mode entering instruction, and feeding back a message of successfully entering the firmware upgrading mode to the mobile terminal.
7. The firmware upgrade method of claim 5, wherein the receiving the target upgrade file transmitted by the mobile terminal comprises:
and receiving the target file sent by the mobile terminal under the condition that the size of the target upgrade file does not exceed the data size which can be received by the internet of things equipment at a time.
8. The firmware upgrade method of claim 5, wherein the target upgrade file is determined by the mobile terminal based on a first upgrade file in the case where the upgrade recording file indicates that the internet of things device has received part of the data of the first upgrade file in the firmware upgrade package;
The receiving the target upgrade file sent by the mobile terminal includes:
receiving at least one second subfile sent by the mobile terminal; the at least one second sub-file is a second sub-file corresponding to the remaining data except the partial data in the first upgrading file in a plurality of second sub-files, and the plurality of second sub-files are obtained by dividing the target upgrading file.
9. The firmware upgrading device is characterized in that the firmware upgrading device is applied to a mobile terminal, a firmware upgrading packet for carrying out firmware upgrading is stored in the mobile terminal, and the firmware upgrading packet comprises at least one upgrading file and an upgrading packet description file for recording parameter information of the upgrading file; the firmware upgrade apparatus includes:
the device comprises a first sending module, a second sending module and a third sending module, wherein the first sending module is used for sending an obtaining instruction for obtaining an upgrade record file to the Internet of things equipment under the condition that long connection is established between the first sending module and the Internet of things equipment; the upgrade record file is used for indicating data in the firmware upgrade package received by the Internet of things equipment;
the first receiving module is used for receiving the upgrade recording file sent by the Internet of things;
The determining module is used for determining a target upgrade file from the at least one upgrade file based on the upgrade record file and the upgrade package description file;
the first sending module is further configured to send the target upgrade file to the internet of things device, so that the internet of things device performs firmware upgrade based on the target upgrade file;
the first sending module is further configured to: dividing the target upgrade file into a plurality of first subfiles under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; respectively sending the plurality of first subfiles to the internet of things equipment;
the file size in the file information in the upgrade package description file can be used by the internet of things device to judge whether the transmission of the target upgrade file is completed after the first subfile is received; after the internet of things device completes firmware updating based on the target upgrade file, file information and transmitted size in the upgrade recording file in the internet of things device are modified, so that the internet of things device can acquire another upgrade file in the firmware upgrade package from the mobile terminal based on the long connection.
10. The firmware upgrading device is characterized by being applied to the Internet of things equipment; the firmware upgrade apparatus includes:
the second receiving module is used for receiving an acquisition instruction sent by the mobile terminal and used for acquiring the upgrade record file under the condition that long connection is established with the mobile terminal; the mobile terminal comprises an upgrade recording file, a mobile terminal and a mobile terminal, wherein the upgrade recording file is used for indicating data in a firmware upgrade packet received by the Internet of things equipment, the mobile terminal stores the firmware upgrade packet for carrying out firmware upgrade, and the firmware upgrade packet comprises at least one upgrade file and an upgrade packet description file for recording parameter information of the upgrade file;
the second sending module is used for sending the upgrade recording file to the mobile terminal based on the acquisition instruction;
the second receiving module is further used for receiving a target upgrade file sent by the mobile terminal; the target upgrade file is determined from the at least one upgrade file by the mobile terminal based on the upgrade recording file and the upgrade package description file;
the upgrading module is used for upgrading the firmware based on the target upgrading file;
The second receiving module is further configured to: receiving a plurality of first subfiles sent by the mobile terminal under the condition that the size of the target upgrade file exceeds the data size which can be received by the internet of things equipment at a time; the plurality of first subfiles are obtained by dividing the target upgrading file, and after the first subfiles sent by the mobile terminal are received, whether the target file is transmitted is judged according to the file size in file information in the upgrading package description file;
the firmware upgrade apparatus is further configured to: after the firmware update is completed based on the target upgrade file, file information and the transmitted size in the upgrade recording file are modified so that the internet of things device can acquire another upgrade file in the firmware upgrade package from the mobile terminal based on the long connection.
11. A storage medium having stored thereon a computer program which, when executed by a processor, performs a firmware upgrade method as claimed in any one of claims 1-8.
12. An electronic device comprising a processor, a memory and a computer program stored on the memory, wherein the processor executes the computer program to implement the firmware upgrade method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211465766.8A CN116107603B (en) | 2022-11-22 | 2022-11-22 | Firmware upgrading method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211465766.8A CN116107603B (en) | 2022-11-22 | 2022-11-22 | Firmware upgrading method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116107603A CN116107603A (en) | 2023-05-12 |
CN116107603B true CN116107603B (en) | 2023-12-19 |
Family
ID=86260526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211465766.8A Active CN116107603B (en) | 2022-11-22 | 2022-11-22 | Firmware upgrading method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116107603B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932778A (en) * | 2012-10-29 | 2013-02-13 | 东莞宇龙通信科技有限公司 | Method and system for wirelessly upgrading mobile phone terminal |
CN105700903A (en) * | 2014-11-28 | 2016-06-22 | 中兴通讯股份有限公司 | User terminal upgrading method and user terminal |
CN111212121A (en) * | 2019-12-24 | 2020-05-29 | 浙江大学 | Aerial firmware upgrading method and system for Internet of things equipment |
CN111819540A (en) * | 2019-02-02 | 2020-10-23 | 深圳市大疆创新科技有限公司 | Firmware upgrading method, radar system, terminal equipment and firmware upgrading system |
CN112306514A (en) * | 2019-07-24 | 2021-02-02 | 深圳市有方科技股份有限公司 | Firmware upgrading method based on narrowband Internet of things, terminal equipment and computer readable storage medium |
CN113778490A (en) * | 2021-09-16 | 2021-12-10 | 深圳市易平方网络科技有限公司 | Software upgrading processing method and device based on intelligent terminal and intelligent terminal |
CN114884935A (en) * | 2022-04-26 | 2022-08-09 | 深圳绿米联创科技有限公司 | Data upgrading method and device, electronic equipment and storage medium |
-
2022
- 2022-11-22 CN CN202211465766.8A patent/CN116107603B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102932778A (en) * | 2012-10-29 | 2013-02-13 | 东莞宇龙通信科技有限公司 | Method and system for wirelessly upgrading mobile phone terminal |
CN105700903A (en) * | 2014-11-28 | 2016-06-22 | 中兴通讯股份有限公司 | User terminal upgrading method and user terminal |
CN111819540A (en) * | 2019-02-02 | 2020-10-23 | 深圳市大疆创新科技有限公司 | Firmware upgrading method, radar system, terminal equipment and firmware upgrading system |
CN112306514A (en) * | 2019-07-24 | 2021-02-02 | 深圳市有方科技股份有限公司 | Firmware upgrading method based on narrowband Internet of things, terminal equipment and computer readable storage medium |
CN111212121A (en) * | 2019-12-24 | 2020-05-29 | 浙江大学 | Aerial firmware upgrading method and system for Internet of things equipment |
CN113778490A (en) * | 2021-09-16 | 2021-12-10 | 深圳市易平方网络科技有限公司 | Software upgrading processing method and device based on intelligent terminal and intelligent terminal |
CN114884935A (en) * | 2022-04-26 | 2022-08-09 | 深圳绿米联创科技有限公司 | Data upgrading method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116107603A (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107547239B (en) | Configuration object updating method and device | |
CN111381858B (en) | Application program upgrading method, server and terminal equipment | |
CN112000355B (en) | Method and device for firmware upgrading and household appliance | |
CN107193607B (en) | Method and apparatus for updating code file, storage medium, processor, and terminal | |
CN105389177A (en) | Software version confirmation method, device and system | |
CN109857423B (en) | Program version updating method and device, server and readable storage medium | |
CN110535776B (en) | Gateway current limiting method, device, gateway, system and storage medium | |
CN110543324B (en) | Plug-in increment updating method and device for application program | |
CN103036706A (en) | Local processing method of application upgrading abnormity | |
CN111683114A (en) | Method and device for upgrading equipment program, terminal equipment and storage medium | |
CN114785685A (en) | Software differential upgrading method and device, electronic equipment and readable storage medium | |
CN111433739A (en) | Program upgrading method and embedded device | |
CN116069341A (en) | Automatic deployment method, equipment and storage medium for application program | |
CN110045969B (en) | Application program installation method, server, system, device and storage medium | |
CN111857772A (en) | Method and equipment for remote transmission and dynamic loading of terminal edge application program | |
CN101146111B (en) | A file download method and device | |
CN114756257B (en) | Data updating method, device, communication module and readable storage medium | |
CN116107603B (en) | Firmware upgrading method and device, storage medium and electronic equipment | |
CN116074308A (en) | Method, system, equipment and readable storage medium for downloading vehicle-end upgrade package | |
CN115729590A (en) | Service deployment method, device, equipment and computer readable storage medium | |
CN115934130A (en) | ECU (electronic control Unit) upgrading method, device, equipment and medium | |
CN115543429A (en) | Project environment building method, electronic equipment and computer readable storage medium | |
CN112965735B (en) | Model updating method, device, equipment and computer readable medium | |
CN110825406A (en) | Software upgrading method and related equipment | |
CN114546842A (en) | Interface test method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |