CN113778484A - Method, device and system for upgrading equipment firmware, electronic equipment and storage medium - Google Patents
Method, device and system for upgrading equipment firmware, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113778484A CN113778484A CN202111033951.5A CN202111033951A CN113778484A CN 113778484 A CN113778484 A CN 113778484A CN 202111033951 A CN202111033951 A CN 202111033951A CN 113778484 A CN113778484 A CN 113778484A
- Authority
- CN
- China
- Prior art keywords
- firmware
- upgraded
- upgrading
- equipment
- group owner
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 79
- 238000004891 communication Methods 0.000 claims description 21
- 230000005540 biological transmission Effects 0.000 claims description 14
- 230000006870 function Effects 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 9
- 230000002093 peripheral effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
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)
Abstract
The application discloses a method, a device and a system for upgrading equipment firmware, electronic equipment and a storage medium, and belongs to the technical field of equipment upgrading. The method for upgrading the device firmware is applied to the group owner device, and comprises the following steps: acquiring an upgrade file of the firmware; selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device; broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded. By using the method, the firmware of the equipment to be upgraded can be upgraded in batches in a broadcasting mode, the efficiency of upgrading the firmware of the equipment in batches is improved, and the cluster master equipment only needs to acquire the upgrade file of the firmware from the server, so that the occupation of server resources is reduced.
Description
Technical Field
The present application relates to the field of device upgrading technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for upgrading a device firmware.
Background
Along with the development of the internet, the application of the intelligent equipment is more and more extensive, the functions of the intelligent equipment are more and more abundant along with the development of the technology, after a user purchases the intelligent equipment, in order to provide some newly developed or some functions for optimizing the product performance for the user, the upgrading of the intelligent equipment is generally carried out by downloading an upgrading file of the latest firmware by a server, when a plurality of intelligent equipment needs to be upgraded in a unified manner, a plurality of intelligent terminals need to be controlled to be connected with the server at the same time, and the upgrading efficiency is low.
Disclosure of Invention
In order to solve the technical problem of low efficiency when equipment firmware is upgraded in batches, the application provides a method, a device, a system, electronic equipment and a storage medium for upgrading the equipment firmware.
In a first aspect, the present application provides a method for upgrading device firmware, which is applied to a group owner device, and the method includes:
acquiring an upgrade file of the firmware;
selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device;
broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded;
further, the above scheme further includes that selecting at least one device to be upgraded from the at least one candidate device scanned by the group owner device includes:
monitoring a first beacon frame broadcast by surrounding devices of the group owner device;
extracting device information carried in the first beacon frame, and taking a device containing an indication identifier in the device information as the alternative device, wherein the indication identifier is used for indicating the alternative device to support a function of firmware upgrade through the group master device;
selecting at least one device to be upgraded from at least one alternative device;
further, the above scheme further includes that the monitoring a first beacon frame broadcast by the surrounding devices of the group owner device includes:
scanning, by BLE, surrounding devices of the group master device;
monitoring a first beacon frame broadcast by the surrounding devices.
Further, the above scheme further includes that the device information includes current version information of the firmware;
the selecting at least one device to be upgraded from the at least one alternative device includes:
extracting the current version information of the firmware from the equipment information of the alternative equipment;
determining the version indicated by the current version information and the alternative equipment lower than the version of the firmware upgrading file as the equipment to be upgraded;
further, the above scheme further includes that selecting at least one device to be upgraded from the at least one candidate device scanned by the group owner device includes:
displaying at least one alternative device scanned by the group owner device;
acquiring a selection instruction, and determining the alternative equipment which is indicated to be selected in the selection instruction as the equipment to be upgraded;
further, the foregoing solution further includes that before the broadcasting the upgrade file of the firmware to the at least one device to be upgraded, the method further includes:
establishing a Wi-Fi P2P connection with the equipment to be upgraded, wherein the Wi-Fi P2P connection is used for broadcasting an upgrade file of the firmware;
further, the above scheme further includes that the broadcasting the upgrade file of the firmware to the at least one device to be upgraded includes:
sending the upgrade file of the firmware to a multicast address, wherein the multicast address is an address predetermined by the group owner device and the device to be upgraded, and the multicast address is used for the device to be upgraded to acquire the upgrade file of the firmware;
further, the foregoing solution further includes that after the broadcasting the upgrade file of the firmware to the at least one device to be upgraded, the method further includes:
acquiring a second beacon frame broadcast by the equipment to be upgraded, wherein the second beacon frame carries a first numerical value, and the first numerical value is the data size of an upgrade file of the firmware received by the equipment to be upgraded;
acquiring a second numerical value, wherein the second numerical value is the data size of the upgrade file of the firmware;
calculating a transmission progress according to the first numerical value and the second numerical value;
displaying the transmission progress;
further, the above scheme further includes obtaining a third beacon frame after the first value is equal to the second value, where the third beacon frame carries indication information that the equipment to be upgraded is successfully upgraded;
and displaying prompt information of successful upgrading of the equipment to be upgraded according to the indication information.
In a second aspect, the present application provides a method for upgrading a device firmware, which is applied to a device to be upgraded, and includes:
acquiring an upgrade file of firmware broadcasted by group owner equipment;
upgrading the firmware according to the upgrading file of the firmware;
further, the above scheme further includes that the obtaining of the upgrade file of the firmware broadcasted by the group owner device includes:
monitoring a multicast address;
acquiring an upgrade file of the firmware broadcasted by the group owner device from the multicast address, wherein the multicast address is an address predetermined by the group owner device and the device to be upgraded;
further, before the obtaining the upgrade file of the firmware broadcasted by the group owner device, the method further includes:
broadcasting a first beacon frame at intervals of preset duration, wherein the first beacon frame carries equipment information and firmware information of the equipment to be upgraded;
the device information comprises an indication identifier, and the indication identifier is used for indicating that the device to be upgraded supports the function of firmware upgrading through the group master device;
the firmware information comprises current version information of the firmware;
further, before the obtaining the upgrade file of the firmware broadcasted by the group owner device from the multicast address, the method further includes:
establishing a Wi-Fi P2P connection with the group owner device, the Wi-Fi P2P connection being used for obtaining an upgrade file of the firmware;
further, the above scheme further includes that the obtaining of the upgrade file of the firmware broadcasted by the group owner device from the multicast address includes:
broadcasting a second beacon frame, wherein the second beacon frame carries a first numerical value, and the first numerical value is the data size of the upgrade file of the firmware received by the equipment to be upgraded;
acquiring a second numerical value, wherein the second numerical value is the data size of the upgrade file of the firmware;
when the first numerical value is equal to the second numerical value, confirming that the upgrading file of the firmware is obtained;
further, the above solution further includes that after the firmware is upgraded according to the upgrade file of the firmware, the method further includes:
acquiring indication information of successful firmware upgrade;
and broadcasting a third beacon frame, wherein the third beacon frame carries indication information of successful upgrade of the equipment to be upgraded.
In a third aspect, the present application provides an apparatus for upgrading device firmware, which is applied to a group owner device, and the apparatus includes:
the first acquisition module is used for acquiring an upgrade file of the firmware;
the selecting module is used for selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device according to the upgrading file of the firmware;
and the broadcasting module is used for broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded.
In a fourth aspect, the present application provides an apparatus for upgrading a device firmware, which is applied to a device to be upgraded, and includes:
the second acquisition module is used for acquiring an upgrade file of the firmware broadcasted by the group owner equipment;
and the upgrading module is used for upgrading the firmware according to the upgrading file of the firmware.
In a fifth aspect, the present application provides a system for upgrading device firmware, the system comprising: the system comprises group owner equipment and equipment to be upgraded;
the group owner equipment is used for acquiring an upgrade file of the firmware; selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device; broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded;
the equipment to be upgraded is used for acquiring an upgrade file of the firmware broadcasted by the group owner equipment; and upgrading the firmware according to the upgrading file of the firmware.
In a sixth aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for upgrading the device firmware according to any one of the embodiments of the first aspect or the second aspect when executing the program stored in the memory.
In a seventh aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, implements the steps of a method for upgrading device firmware according to any one of the embodiments of the first aspect or any one of the embodiments of the second aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the method provided by the embodiment of the application, the group owner equipment acquires the upgrade file of the firmware, selects the equipment to be upgraded from the scanned alternative equipment, and broadcasts the upgrade file of the firmware to the equipment to be upgraded so as to upgrade the firmware of the equipment to be upgraded. By using the method, the firmware of the equipment to be upgraded can be upgraded in batches in a broadcasting mode, and the efficiency of upgrading the firmware of the equipment in batches is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a system architecture diagram of a method for upgrading device firmware according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for upgrading device firmware according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 8 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 9 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
FIG. 10 is a flowchart illustrating another method for upgrading firmware of a device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an apparatus for upgrading device firmware according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of another apparatus for upgrading firmware of a device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
According to an aspect of the embodiments of the present application, a method for upgrading device firmware is provided, which may be applied to a system architecture as shown in fig. 1, where the system architecture includes at least a group owner device 101 and a device to be upgraded 102.
The group owner device 101 acquires an upgrade file of the firmware;
the group owner device 101 selects at least one device to be upgraded 102 from the scanned at least one alternative device;
the group owner device 101 broadcasts the upgrade file of the firmware to at least one device to be upgraded 102, so as to upgrade the firmware of the at least one device to be upgraded 102.
In the system architecture, the upgrading file of the firmware is acquired through the group owner device 101, the device 102 to be upgraded is selected from the scanned alternative devices, the device 102 to be upgraded is subjected to broadcast upgrading, the efficiency of upgrading the device firmware in batches is improved, and the upgrading file of the firmware is acquired from the server only through the group owner device 101, so that the occupation of server resources is obviously reduced.
It should be noted that the device to be upgraded 102 herein generally refers to a device that supports a function of upgrading firmware through a broadcast format, and the number is at least one, and may include any number greater than one.
Next, based on the system architecture, a method embodiment for upgrading device firmware is described, where the method may be applied to a group owner device and may also be applied to a device to be upgraded.
When applied to a group owner device, as shown in fig. 2, the method for upgrading the device firmware mainly includes:
In this embodiment, the group owner device obtains the upgrade file of the firmware, which may be obtained from a server storing Over-the-Air Technology (OTA) firmware, or may be obtained from other devices that have obtained the upgrade file of the firmware.
The group master device may scan through Bluetooth Low Energy (for short BLE), scan to devices supporting BLE in the surrounding devices, and select a device to be upgraded from the devices.
In one embodiment, as shown in fig. 3, selecting at least one device to be upgraded from the at least one candidate device scanned by the group owner device includes:
In this embodiment, monitoring the first beacon frame broadcast by the surrounding devices of the group owner device includes: through BLE scanning surrounding devices of a group owner device, monitoring a first beacon frame broadcast by the surrounding devices.
Through BLE scanning, the group master device scans the devices which support BLE and monitors the first beacon frame broadcast by the surrounding devices.
In this embodiment, the group owner device monitors a first beacon frame (beacon frame) broadcast by the peripheral devices through BLE, and extracts device information carried by the peripheral devices from the first beacon frame. The device information carried in the first beacon frame may be a Data area in a beacon frame Protocol Data Unit (PDU for short), the device information may be identification information supporting BLE, the identification information identifies a function of supporting firmware upgrade by the group owner device, and the group owner device extracts the device information from the Data area in the PDU of the first beacon frame and selects a device to be upgraded from the candidate devices supporting the function.
In one embodiment, selecting at least one device to be upgraded from at least one alternative device specifically includes:
In this embodiment, as shown in fig. 4, the monitored device information carried in the first beacon frame includes current version information of a firmware of the device, the group owner device extracts the current version information and compares the current version information with the version information in the acquired upgrade file, and if the monitored current version information carried in the first beacon frame is lower than the version in the upgrade file, the device broadcasting the first beacon frame is automatically determined to be a device to be upgraded, and the firmware of the device needs to be upgraded.
The equipment to be upgraded is automatically determined, so that the efficiency of upgrading the firmware in batches is improved, the user experience is improved, and the equipment firmware can be kept in the latest version at any time without the participation of a user. Of course, the selection can also be automatically determined by setting parameters to determine whether the upgrade is needed or the user is needed to confirm the upgrade again.
In one embodiment, when the user is required to confirm the upgrade, as shown in fig. 5, selecting at least one device to be upgraded from the at least one candidate device scanned by the group owner device includes:
In this embodiment, after the group owner device scans the candidate devices, the scanned candidate devices are displayed on a display interface of the group owner device, and may be displayed in a list form or may be visually displayed in an icon form. In the interface for displaying the alternative device, a selection instruction may be obtained, where the selection instruction may be a touch instruction or a voice instruction, or may be a signal input through an external device. When displayed in the form of a list, the device number or other unique identifying information contained in the first beacon frame may be displayed to indicate the alternate device.
A user can freely select all or part of the alternative equipment needing to be upgraded from the list or the icon through a touch instruction or a signal input by an external device, the alternative equipment is determined to be equipment to be upgraded, the step of confirming by the user is added, firmware upgrading can be carried out according to the requirements of the user, and the user experience can be improved while the efficiency of upgrading the firmware in batches.
After the equipment to be upgraded is determined, the group owner equipment broadcasts the upgrade files of the firmware to the equipment to be upgraded, the upgrade files can be broadcast in a one-to-many mode, the equipment to be upgraded does not need to be queued, and the efficiency of obtaining the upgrade files of the firmware by the equipment to be upgraded is greatly improved.
In an embodiment, broadcasting an upgrade file of firmware to at least one device to be upgraded, as shown in fig. 6, specifically includes:
The broadcasting of the firmware upgrade file by the group owner device may be that the upgrade file of the firmware is first sent to a predetermined multicast address, and the device to be upgraded acquires the upgrade file of the firmware from the multicast address, for example, the multicast address is set to 224.0.2.0, and the device to be upgraded continuously monitors the address, and after the group owner device sends the upgrade file of the firmware to the address, all devices monitoring the address can receive the upgrade file. The group master equipment does not need to queue and send the equipment to be upgraded one by one, and the efficiency of upgrading the firmware of the equipment is improved.
It should be noted that the multicast address set to 224.0.2.0 is only an example, and may be set to any one of 224.0.2.0 to 238.255.255.255, or another address that can implement a multicast function.
In one embodiment, after broadcasting the upgrade file of the firmware to at least one device to be upgraded to upgrade the firmware of the at least one device to be upgraded, the method further includes:
and acquiring a second beacon frame broadcast by the equipment to be upgraded, wherein the second beacon frame carries a first numerical value, the first numerical value is the data size of the upgrade file of the firmware received by the equipment to be upgraded, acquiring a second numerical value, the second numerical value is the data size of the upgrade file of the firmware, calculating a transmission progress according to the first numerical value and the second numerical value, and displaying the transmission progress.
In this embodiment, in order to facilitate the group owner device to check the transmission progress of each device to be upgraded at any time, the transmission progress of the device to be upgraded can be displayed at any time by acquiring the first numerical value contained in the second beacon frame broadcast by the device to be upgraded and comparing the first numerical value with the second numerical value in the group owner device, so that the user experience is improved, and the occurrence of abnormalities such as jamming and the like in the upgrading process can be found in time.
In one embodiment, after displaying the transmission progress, the method further includes: when the first numerical value is equal to the second numerical value, acquiring a third beacon frame, wherein the third beacon frame carries indication information of successful upgrade of the equipment to be upgraded; and displaying prompt information of successful upgrading of the equipment to be upgraded according to the indication information.
After the transmission of the upgrade file of the firmware is completed, the equipment to be upgraded starts to guide the firmware to be upgraded for upgrading, the group master equipment acquires the third beacon frame broadcast by the equipment to be upgraded after the upgrading is completed, prompt information of successful upgrading of the equipment to be upgraded is displayed on the group master equipment to prompt a user of successful upgrading, the user can visually see the upgrade result of the firmware of the equipment to be upgraded, and experience of the user in the firmware upgrading process is improved.
In one embodiment, before broadcasting the upgrade file of the firmware to at least one device to be upgraded to upgrade the firmware of the at least one device to be upgraded, the method further includes: and establishing Wi-Fi P2P connection with the equipment to be upgraded.
Wi-Fi P2P (Peer-To-Peer), also called WLAN direct, is one of Wi-Fi protocol clusters, enabling devices To easily connect To each other without requiring an intermediate wireless Access Point (Access Point). The Wi-Fi wireless communication system can be used from webpage browsing to file transmission and can be communicated with a plurality of devices at the same time, and the speed advantage of Wi-Fi can be fully played. Devices meeting this standard can be easily interconnected even from different manufacturers.
The group owner equipment and the equipment to be upgraded both support BLE and Wi-Fi P2P, the equipment to be upgraded, which needs firmware upgrading, is determined through a BLE technology, and then Wi-Fi P2P connection with a higher transmission speed is established, so that the speed of transmitting upgrading files of firmware can be increased, and the efficiency of upgrading equipment firmware in batches is improved.
In another aspect of the embodiment of the present application, the method is applied to a device to be upgraded, as shown in fig. 7, and includes:
In one embodiment, obtaining an upgrade file for firmware broadcast by a group owner device, as in fig. 8, comprises:
For example, when the multicast address is 224.0.2.0, the device to be upgraded monitors the multicast address, and after the group owner device sends the upgrade file of the firmware to the address, all devices monitoring the address can receive the upgrade file without queuing and sending the upgrade file to the device to be upgraded one by one, thereby improving the efficiency of upgrading the firmware of the device.
In this embodiment, acquiring the upgrade file of the firmware broadcasted by the group owner device from the multicast address, as shown in fig. 9, may specifically include:
In the process of acquiring the upgrade file of the firmware by the equipment to be upgraded, the size of the received upgrade file of the firmware is broadcasted at any time, so that the transmission progress can be displayed in real time at the group owner equipment, and the user experience is improved.
In one embodiment, before obtaining the upgrade file of the firmware broadcasted by the group owner device, the method further includes:
step 700, broadcasting a first beacon frame at intervals of a preset duration, where the first beacon frame carries device information and firmware information of a device to be upgraded, the device information includes an indication identifier, the indication identifier is used to indicate that the device to be upgraded supports a function of upgrading firmware through a group owner device, and the firmware information includes current version information of firmware.
The equipment to be upgraded periodically broadcasts by adding information of manufacturers, firmware versions, unique identification codes and the like into a first beacon frame of BLE.
In one embodiment, before obtaining an upgrade file of firmware broadcasted by a group owner device from a multicast address, where the multicast address is an address pre-agreed by the group owner device and a device to be upgraded, the method further includes:
and step 802, establishing Wi-Fi P2P connection with the group owner device, wherein the Wi-Fi P2P connection is used for acquiring an upgrade file of the firmware.
Wi-Fi P2P connections enable devices to easily connect to each other without requiring an intervening wireless access point. The Wi-Fi wireless communication system can be used from webpage browsing to file transmission and can be communicated with a plurality of devices at the same time, and the speed advantage of Wi-Fi can be fully played. Devices meeting this standard can be easily interconnected even from different manufacturers.
The first beacon frame, the second beacon frame, and the third beacon frame may be broadcast through information carried in a Data area of a Protocol Data Unit (PDU) of the beacon frame.
And step 703, upgrading the firmware according to the upgrade file of the firmware.
And after the equipment to be upgraded acquires the upgrade file of the firmware, the firmware is guided to be upgraded.
In one embodiment, and after the upgrade is completed, as in fig. 10, the method may further include:
And step 707, broadcasting a third beacon frame, where the third beacon frame carries indication information of successful upgrade of the device to be upgraded.
And after the firmware is upgraded successfully, the equipment to be upgraded broadcasts a third beacon frame, so that the group owner equipment obtains prompt information of successful upgrading of the equipment to be upgraded.
Based on the same concept, an embodiment of the present application further provides an apparatus for upgrading device firmware, as shown in fig. 11, which is applied to a group owner device, and includes:
a first obtaining module 1101, configured to obtain an upgrade file of the firmware;
a selecting module 1103, configured to select, according to an upgrade file of the firmware, at least one device to be upgraded from the at least one candidate device scanned by the group owner device;
the broadcasting module 1105 is configured to broadcast the upgrade file of the firmware to at least one device to be upgraded, so as to upgrade the firmware of the at least one device to be upgraded.
The device for upgrading the equipment firmware upgrades the firmware of the equipment to be upgraded in batches in a broadcasting mode, improves the efficiency of upgrading the equipment firmware in batches, and only needs the group master equipment to obtain the upgrading file of the firmware from the server, thereby reducing the occupation of server resources.
The embodiment of the present application further provides another apparatus for upgrading a device firmware, as shown in fig. 12, which is applied to a device to be upgraded, and includes:
a second obtaining module 1201, configured to obtain an upgrade file of a firmware broadcast by the group owner device;
and an upgrade module 1203 configured to upgrade the firmware according to the upgrade file of the firmware.
The device for upgrading the equipment firmware acquires the upgrading files of the firmware broadcasted by the group owner equipment from the group owner equipment without connecting a server, so that the occupation of server resources is reduced, a plurality of pieces of equipment to be upgraded can acquire the upgrading files of the firmware at the same time, and the efficiency of upgrading the equipment firmware in batches is improved.
As shown in fig. 13, an electronic device provided in the embodiment of the present application includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114,
a memory 113 for storing a computer program;
in an embodiment of the present application, when the processor 111 is configured to execute the program stored in the memory 113, the method for upgrading the device firmware provided in any one of the foregoing method embodiments is applied to a group owner device, and the method includes:
acquiring an upgrade file of the firmware;
selecting at least one device to be upgraded from at least one alternative device scanned by the group master device;
and broadcasting the upgrade file of the firmware to at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded.
Or, the method is applied to the equipment to be upgraded and comprises the following steps:
acquiring an upgrade file of firmware broadcasted by group owner equipment;
and upgrading the firmware according to the upgrading file of the firmware.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of a method for upgrading device firmware as provided in any of the foregoing method embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (20)
1. A method of upgrading device firmware for use with a group owner device, the method comprising:
acquiring an upgrade file of the firmware;
selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device;
broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded.
2. The method for upgrading device firmware according to claim 1, wherein selecting at least one device to be upgraded from the at least one alternative device scanned by the group owner device comprises:
monitoring a first beacon frame broadcast by surrounding devices of the group owner device;
extracting device information carried in the first beacon frame, and taking the peripheral device containing an indication identifier in the device information as the alternative device, wherein the indication identifier is used for indicating the alternative device to support a function of firmware upgrade through the group owner device;
and selecting at least one device to be upgraded from at least one alternative device.
3. The method of upgrading device firmware of claim 2, wherein the monitoring for the first beacon frame broadcast by the surrounding devices of the group owner device comprises:
scanning, by BLE, surrounding devices of the group master device;
monitoring a first beacon frame broadcast by the surrounding devices.
4. The method for upgrading the firmware of the equipment according to claim 2, wherein the equipment information comprises current version information of the firmware;
the selecting at least one device to be upgraded from the at least one alternative device includes:
extracting the current version information of the firmware from the equipment information of the alternative equipment;
and determining the version indicated by the current version information and the alternative equipment with the version lower than the version of the firmware upgrading file as the equipment to be upgraded.
5. The method for upgrading device firmware according to claim 1, wherein selecting at least one device to be upgraded from the at least one alternative device scanned by the group owner device comprises:
displaying at least one alternative device scanned by the group owner device;
and acquiring a selection instruction, and determining the alternative equipment which is indicated to be selected in the selection instruction as the equipment to be upgraded.
6. The method for upgrading the firmware of the device according to claim 1, wherein before broadcasting the upgrade file of the firmware to the at least one device to be upgraded, the method further comprises:
establishing Wi-Fi P2P connection with the equipment to be upgraded, wherein the Wi-Fi P2P connection is used for broadcasting the upgrade files of the firmware.
7. The method for upgrading the firmware of the equipment according to any one of claims 1 to 6, wherein the broadcasting of the upgrade file of the firmware to the at least one equipment to be upgraded comprises:
and sending the upgrade file of the firmware to a multicast address, wherein the multicast address is an address predetermined by the group owner device and the device to be upgraded, and the multicast address is used for the device to be upgraded to acquire the upgrade file of the firmware.
8. The method for upgrading device firmware according to any one of claims 1 to 6, wherein after the broadcasting of the upgrade file of the firmware to the at least one device to be upgraded, the method further comprises:
acquiring a second beacon frame broadcast by the equipment to be upgraded, wherein the second beacon frame carries a first numerical value, and the first numerical value is the data size of an upgrade file of the firmware received by the equipment to be upgraded;
acquiring a second numerical value, wherein the second numerical value is the data size of the upgrade file of the firmware;
calculating a transmission progress according to the first numerical value and the second numerical value;
and displaying the transmission progress.
9. The method of upgrading device firmware of claim 8, further comprising: after the first numerical value is equal to the second numerical value, acquiring a third beacon frame, wherein the third beacon frame carries indication information of successful upgrade of the equipment to be upgraded;
and displaying prompt information of successful upgrading of the equipment to be upgraded according to the indication information.
10. A method for upgrading equipment firmware, which is applied to equipment to be upgraded and comprises the following steps:
acquiring an upgrade file of firmware broadcasted by group owner equipment;
and upgrading the firmware according to the upgrading file of the firmware.
11. The method for upgrading the firmware of the equipment according to claim 10, wherein the obtaining of the upgrade file of the firmware broadcasted by the group owner equipment comprises:
monitoring a multicast address;
and obtaining the upgrade file of the firmware broadcasted by the group owner device from the multicast address, wherein the multicast address is an address agreed in advance by the group owner device and the device to be upgraded.
12. The method of upgrading device firmware of claim 10, wherein prior to the obtaining the upgrade file for firmware broadcast by the group owner device, the method further comprises:
broadcasting a first beacon frame at intervals of preset duration, wherein the first beacon frame carries equipment information and firmware information of the equipment to be upgraded;
the device information comprises an indication identifier, and the indication identifier is used for indicating that the device to be upgraded supports the function of firmware upgrading through the group master device;
the firmware information includes current version information of the firmware.
13. The method of upgrading device firmware of claim 11, wherein prior to the obtaining the upgrade file of the firmware broadcast by the group owner device from the multicast address, the method further comprises:
establishing a Wi-Fi P2P connection with the group owner device, the Wi-Fi P2P connection being used for obtaining an upgrade file of the firmware.
14. The method for upgrading the firmware of the device according to claim 11, wherein the obtaining the upgrade file of the firmware broadcasted by the group owner device from the multicast address comprises:
broadcasting a second beacon frame, wherein the second beacon frame carries a first numerical value, and the first numerical value is the data size of the upgrade file of the firmware received by the equipment to be upgraded;
acquiring a second numerical value, wherein the second numerical value is the data size of the upgrade file of the firmware;
and when the first numerical value is equal to the second numerical value, confirming that the upgrading file of the firmware is finished.
15. The method of upgrading device firmware of claim 10, wherein after the upgrading firmware according to the upgrade file of the firmware, the method further comprises:
acquiring indication information of successful firmware upgrade;
and broadcasting a third beacon frame, wherein the third beacon frame carries indication information of successful upgrade of the equipment to be upgraded.
16. An apparatus for upgrading device firmware, the apparatus being applied to a group owner device, the apparatus comprising:
the first acquisition module is used for acquiring an upgrade file of the firmware;
the selecting module is used for selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device according to the upgrading file of the firmware;
and the broadcasting module is used for broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded.
17. An apparatus for upgrading device firmware, applied to a device to be upgraded, the apparatus comprising:
the second acquisition module is used for acquiring an upgrade file of the firmware broadcasted by the group owner equipment;
and the upgrading module is used for upgrading the firmware according to the upgrading file of the firmware.
18. A system for upgrading device firmware, the system comprising: the system comprises group owner equipment and equipment to be upgraded;
the group owner equipment is used for acquiring an upgrade file of the firmware; selecting at least one device to be upgraded from at least one alternative device scanned by the group owner device; broadcasting the upgrade file of the firmware to the at least one device to be upgraded so as to upgrade the firmware of the at least one device to be upgraded;
the equipment to be upgraded is used for acquiring an upgrade file of the firmware broadcasted by the group owner equipment; and upgrading the firmware according to the upgrading file of the firmware.
19. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method of upgrading firmware of a device of any of claims 1 to 9 or any of claims 10 to 15 when executing a program stored in the memory.
20. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of upgrading device firmware of any of claims 1 to 9 or of any of claims 10 to 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111033951.5A CN113778484A (en) | 2021-09-03 | 2021-09-03 | Method, device and system for upgrading equipment firmware, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111033951.5A CN113778484A (en) | 2021-09-03 | 2021-09-03 | Method, device and system for upgrading equipment firmware, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113778484A true CN113778484A (en) | 2021-12-10 |
Family
ID=78841221
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111033951.5A Pending CN113778484A (en) | 2021-09-03 | 2021-09-03 | Method, device and system for upgrading equipment firmware, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113778484A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114338656A (en) * | 2022-03-14 | 2022-04-12 | 杭州炬华科技股份有限公司 | Method and system for rapidly upgrading firmware of electric energy meter and readable storage medium |
WO2024012691A1 (en) * | 2022-07-15 | 2024-01-18 | Electrolux Appliances Aktiebolag | Software update in smart household appliances |
WO2024037500A1 (en) * | 2022-08-19 | 2024-02-22 | 华为技术有限公司 | Communication method and related apparatus |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016095533A1 (en) * | 2014-12-16 | 2016-06-23 | 中兴通讯股份有限公司 | Method and device for version upgrading |
CN109445806A (en) * | 2018-12-20 | 2019-03-08 | 歌尔科技有限公司 | More device updating methods, device, system and terminal based on Ble |
CN110471678A (en) * | 2019-07-04 | 2019-11-19 | 中国电力科学研究院有限公司 | A kind of method that electric energy meter firmware uses cast communication mode to upgrade |
CN112118567A (en) * | 2019-06-19 | 2020-12-22 | 北京京东尚科信息技术有限公司 | Device upgrading method, electronic device and medium |
-
2021
- 2021-09-03 CN CN202111033951.5A patent/CN113778484A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016095533A1 (en) * | 2014-12-16 | 2016-06-23 | 中兴通讯股份有限公司 | Method and device for version upgrading |
CN105763350A (en) * | 2014-12-16 | 2016-07-13 | 中兴通讯股份有限公司 | Method of using multicast mode to upgrade version and apparatus thereof |
CN109445806A (en) * | 2018-12-20 | 2019-03-08 | 歌尔科技有限公司 | More device updating methods, device, system and terminal based on Ble |
CN112118567A (en) * | 2019-06-19 | 2020-12-22 | 北京京东尚科信息技术有限公司 | Device upgrading method, electronic device and medium |
CN110471678A (en) * | 2019-07-04 | 2019-11-19 | 中国电力科学研究院有限公司 | A kind of method that electric energy meter firmware uses cast communication mode to upgrade |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114338656A (en) * | 2022-03-14 | 2022-04-12 | 杭州炬华科技股份有限公司 | Method and system for rapidly upgrading firmware of electric energy meter and readable storage medium |
WO2024012691A1 (en) * | 2022-07-15 | 2024-01-18 | Electrolux Appliances Aktiebolag | Software update in smart household appliances |
WO2024037500A1 (en) * | 2022-08-19 | 2024-02-22 | 华为技术有限公司 | Communication method and related apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113778484A (en) | Method, device and system for upgrading equipment firmware, electronic equipment and storage medium | |
CN110972233B (en) | Distribution network state display method and device for intelligent equipment | |
CN112752324B (en) | Network distribution method, device and system of intelligent equipment, electronic equipment and storage medium | |
CN111131380B (en) | Network distribution method and system of household appliance and storage medium | |
CN103379446B (en) | Multi-terminal control method and device based on wifi | |
CN112152853A (en) | Equipment network distribution method and device, computer-readable storage medium and electronic device | |
CN113765714A (en) | Equipment network distribution method and device, storage medium and electronic equipment | |
CN112202652A (en) | Method and device for displaying information of equipment to be networked, storage medium and electronic device | |
CN107734592B (en) | core network selection method, access network entity, UE and system | |
CN110933733A (en) | Network distribution method, device, computer equipment and storage medium | |
CN112566078A (en) | Device connection method and apparatus, storage medium, and electronic apparatus | |
CN108462894B (en) | Live broadcast room broadcast processing method and device and readable storage medium | |
CN112714426A (en) | Intelligent upgrading method and device for Bluetooth equipment, electronic equipment and medium | |
CN112346751A (en) | Application program installation method and device, electronic equipment and storage medium | |
US20120047204A1 (en) | Apparatus and method for providing a device management package and a method for receiving the device management package | |
CN112241357B (en) | Method, apparatus, device and computer readable medium for gray scale testing | |
CN110908881A (en) | Method and device for sending buried point data, electronic equipment and computer readable storage medium | |
CN113746932B (en) | Network request merging method, device, electronic device and computer program product | |
CN113993122B (en) | NB-IOT terminal, communication method and communication system | |
CN114237682A (en) | OTA (over the air) upgrading method and device, electronic equipment and storage medium | |
CN112492570B (en) | Network distribution method, system, device, equipment and storage medium | |
CN112925713A (en) | Service testing method, device, system, storage medium and computer equipment | |
CN115134279A (en) | Terminal testing method and device and computer readable storage device | |
CN113613313A (en) | Communication method, device and medium for Bluetooth equipment pairing | |
CN112954692A (en) | Distribution network identifier generation method and device and terminal |
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 |