Firmware upgrading method and device of electronic equipment, equipment and storage medium
By establishing a connection with electronic devices under the same LAN, firmware upgrades are performed based on operating status information, and the problem of remote firmware upgrades increases hardware costs is solved, and convenient device management and user experience improvement is achieved.
Patent Information
- Application Number
- CN202411627937.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-01
AI Technical Summary
In the prior art, remote firmware upgrades increase the hardware cost of the equipment and it is difficult to achieve convenient product upgrades.
By sending networking requests to electronic devices on the same LAN, establishing connections, and firmware upgrades are carried out based on operating status information, interconnection and unified management between devices are realized.
It reduces the hardware cost of electronic devices, realizes convenient firmware upgrades and version management of devices, and improves user experience.
Smart Images

Figure CN119739409A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device management, and in particular to a firmware upgrade method for an electronic device, a firmware upgrade device for an electronic device, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Art
[0002] With the continuous improvement of IoT technology, the types and applications of IoT devices are becoming more and more diverse. After the devices are produced and sold, in order to promptly solve the device problems encountered by device users, it is necessary to implement a relatively convenient product upgrade method to meet the needs of device users.
[0003] For the firmware that needs to be updated and upgraded in the device, it is usually implemented by remote upgrade. However, the remote upgrade method has high requirements on the device and requires the device to have the ability to access the remote server to download the firmware. Correspondingly, the hardware cost of the device will also increase. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a firmware upgrade method for an electronic device, a firmware upgrade device for an electronic device, a corresponding electronic device, and a corresponding computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] An embodiment of the present invention discloses a method for upgrading the firmware of an electronic device, involving a control terminal, wherein the control terminal and each electronic device are in the same local area network, and the control terminal uses a preset first communication protocol for network communication. The method includes:
[0006] The control terminal sends a networking request to each electronic device;
[0007] Receiving response messages returned by each electronic device in response to the networking request, and adding the target electronic device connected to the control terminal to the preset network based on the response message; wherein the target electronic device using the preset first communication protocol is connected to the control terminal, and the target electronic device using the preset second communication protocol is connected to the control terminal via a bridge;
[0008] Obtaining the operating status information of the target electronic device in the preset network;
[0009] The firmware of the target electronic device is upgraded according to the operating status information.
[0010] Optionally, adding the target electronic device connected to the control terminal to a preset network based on the response message includes:
[0011] If it is determined based on the response message that the first electronic device is successfully connected to the control terminal, the first electronic device is used as the target electronic device, and the target electronic device is added to the preset network.
[0012] Optionally, the adding the target electronic device connected to the control terminal to a preset network based on the response message further includes:
[0013] If it is determined based on the response message that the second electronic device fails to establish a connection with the control terminal, the networking request is resent to the second electronic device according to a preset number of times, and a response message returned by the second electronic device in response to the networking request is received.
[0014] Optionally, after adding the target electronic device to a preset network, the method further includes:
[0015] Obtaining device information and firmware download information of the target electronic device in the preset network;
[0016] The device information and firmware download information are displayed through the interface.
[0017] Optionally, the method further includes:
[0018] After the target electronic device enters the running state, the running state information of the target electronic device is recorded.
[0019] Optionally, the running status information is used to indicate the running time of the target electronic device; and upgrading the firmware of the target electronic device according to the running status information includes:
[0020] The firmware of the target electronic device is manually updated and / or automatically updated according to the operating time of the target electronic device.
[0021] Optionally, the firmware download information includes a firmware update link; and manually updating the firmware of the target electronic device according to the running time of the target electronic device includes:
[0022] In the case where it is determined according to the running time that the target electronic device is running, responding to an upgrade instruction for any of the target electronic devices, obtaining a firmware update link of the latest version;
[0023] Downloading firmware information based on the latest version of the firmware update link, and transmitting the firmware information to the target electronic device;
[0024] When the firmware information is verified to be successful, the firmware information is burned into the target electronic device, so that the firmware of the target electronic device is updated.
[0025] Optionally, before responding to the upgrade instruction of any of the target electronic devices, the method further includes:
[0026] Scan and obtain multiple target electronic devices for which firmware versions are to be upgraded;
[0027] The multiple target electronic devices are displayed through an interface to instruct the user to manually select the target electronic device to be upgraded.
[0028] Optionally, the firmware download information includes a firmware update link; and automatically updating the firmware of the target electronic device according to the running time of the target electronic device includes:
[0029] generating a time update policy according to the running time, wherein the time update policy is used to indicate an update time of the target electronic device;
[0030] At the update time of the target electronic device, obtaining a firmware update link of the latest version;
[0031] Downloading firmware information based on the latest version of the firmware update link, and transmitting the firmware information to the target electronic device;
[0032] When the firmware information is verified to be successful, the firmware information is burned into the target electronic device, so that the firmware of the target electronic device is updated.
[0033] The embodiment of the present invention further discloses a firmware upgrade device for an electronic device, which involves a control terminal. The control terminal and each electronic device are in the same local area network. The control terminal uses a preset first communication protocol for network communication. The device includes:
[0034] A network request sending module, used to send a network request to each electronic device;
[0035] A networking module, used to receive response messages returned by each electronic device in response to the networking request, and add the target electronic device connected to the control terminal to the preset network based on the response message; wherein the target electronic device using the preset first communication protocol is connected to the control terminal, and the target electronic device using the preset second communication protocol is connected to the control terminal via a bridge;
[0036] An operation status information acquisition module, used to acquire the operation status information of the target electronic device in the preset network;
[0037] A firmware upgrade module is used to upgrade the firmware of the target electronic device according to the operating status information.
[0038] Optionally, the networking module includes:
[0039] The networking submodule is used to use the first electronic device as the target electronic device and add the target electronic device to the preset network when it is determined based on the response message that the first electronic device is successfully connected to the control terminal.
[0040] Optionally, the networking submodule is also used to resend the networking request to the second electronic device according to a preset number threshold when it is determined based on the response message that the second electronic device fails to establish a connection with the control terminal, and receive a response message returned by the second electronic device in response to the networking request.
[0041] Optionally, after adding the target electronic device to a preset network, the device further includes:
[0042] The information display module is used to obtain the device information and firmware download information of the target electronic device in the preset network; and display the device information and firmware download information through an interface.
[0043] Optionally, the device further comprises:
[0044] The status information collection module is used to record the operating status information of the target electronic device after the target electronic device enters the operating state.
[0045] Optionally, the running status information is used to indicate the running time of the target electronic device; and the firmware upgrade module includes:
[0046] The firmware upgrade submodule is used to manually update and / or automatically update the firmware of the target electronic device according to the operating time of the target electronic device.
[0047] Optionally, the firmware download information includes a firmware update link; and the firmware upgrade submodule includes:
[0048] A manual update unit is used to respond to an upgrade instruction for any of the target electronic devices to obtain a latest version of a firmware update link when the target electronic device is determined to be running according to the running time; download firmware information based on the latest version of the firmware update link and transmit the firmware information to the target electronic device; and burn the firmware information to the target electronic device when the firmware information is verified to be passed, so that the firmware of the target electronic device is updated.
[0049] In some embodiments of the present invention, the firmware upgrade submodule may further include the following units:
[0050] The device specifying unit is used to scan and obtain multiple target electronic devices for which firmware versions are to be upgraded; and to display the multiple target electronic devices through an interface to instruct a user to manually select the target electronic devices to be upgraded.
[0051] In some embodiments of the present invention, the firmware download information includes a firmware update link; the firmware upgrade submodule may include the following units:
[0052] An automatic update unit is used to generate a time update strategy according to the running time, wherein the time update strategy is used to indicate the update time of the target electronic device; at the update time of the target electronic device, obtain a firmware update link of the latest version; download firmware information based on the firmware update link of the latest version, and transmit the firmware information to the target electronic device; if the firmware information is verified, burn the firmware information to the target electronic device to complete the firmware update of the target electronic device.
[0053] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, any of the firmware upgrade methods of the electronic device is implemented.
[0054] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any of the firmware upgrade methods for the electronic device is implemented.
[0055] The embodiments of the present invention include the following advantages:
[0056] In an embodiment of the present invention, a control terminal in the same local area network sends a networking request to each electronic device, and receives a response message returned by each electronic device in response to the networking request, and based on the response message, the target electronic device connected to the control terminal is added to the preset network, wherein the target electronic device using the same communication protocol as the control terminal can be connected to the control terminal, and the target electronic device using a different communication protocol from the control terminal can be connected to the control terminal via a bridge, thereby realizing the interconnection between the various electronic devices based on the networking operation of the control terminal; after the networking is completed, the control terminal can obtain an updated version of the firmware based on the operating status information of the target electronic device in the network, and complete the firmware upgrade of the target electronic device, that is, it can manage the firmware version of each device, timely connect to the network to obtain the latest firmware of the device, and realize the firmware upgrade management of the devices in the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1It is a flowchart of a method for upgrading the firmware of an electronic device according to an embodiment of the present invention;
[0058] Figure 2 is a flowchart of another embodiment of a method for upgrading the firmware of an electronic device of the present invention;
[0059] Figure 3 It is a schematic diagram of the networking process provided by an embodiment of the present invention;
[0060] Figure 4 is a schematic diagram of a network provided by an embodiment of the present invention;
[0061] Figure 5 It is a flowchart of a firmware upgrade provided by an embodiment of the present invention;
[0062] Figure 6 It is a structural block diagram of an embodiment of a firmware upgrade device for an electronic device of the present invention. DETAILED DESCRIPTION
[0063] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0064] In order to solve device problems encountered by device users in a timely manner, it is necessary to upgrade the firmware of the electronic device to meet the needs of the device users.
[0065] The embodiment of the present invention provides a multi-device interconnection and cross-platform communication framework, sends a networking request to each electronic device based on the control terminal in the same local area network, realizes the interconnection between each electronic device based on the networking operation of the control terminal, effectively manages the devices in a unified manner, manages the firmware version of each device, and obtains the latest firmware of the device in a timely manner, thereby realizing the firmware upgrade management of the devices in the network. Further, the control terminal can manage the firmware upgrade of the electronic device according to the running status information of the target electronic device in the network, so that the updated version of the firmware can be obtained at an appropriate time according to the running status information used to indicate the running time of the device, and the firmware of the target electronic device is burned to complete the firmware upgrade of the target electronic device. Compared with the traditional OTA (Over-The-Air, which refers to the technology of software update or data transmission through a wireless network) firmware upgrade method, the firmware upgrade mechanism provided in the embodiment of the present invention can effectively reduce the hardware cost of the electronic device, and better manage the version upgrade of the electronic device and improve the user experience.
[0066] Reference Figure 1 , shows a flowchart of a firmware upgrade method for an electronic device according to an embodiment of the present invention, which may specifically include the following steps:
[0067] Step 101, the control terminal sends a networking request to each electronic device;
[0068] The multi-device interconnection and cross-platform communication framework provided by the embodiment of the present invention can be implemented by networking based on the control terminal. Specifically, the control terminal can send a networking request to each electronic device in the same local area network to add multiple electronic devices to the preset network to achieve interconnection between multiple devices.
[0069] Among them, multiple electronic devices in the same local area network can be devices of different manufacturers and different communication protocols, so as to realize cross-platform communication between different devices based on the networking operation performed by the control terminal. In different application scenarios, the control terminal and the multiple electronic devices connected to the control terminal can be different. Taking home smart home devices as an example, the control terminal can be a home central control system, a mobile phone APP, etc.; multiple electronic devices can refer to multiple smart home devices, such as smart monitoring, smart door locks, smart lamps and smart speakers, etc., which are not limited by the embodiments of the present invention.
[0070] Step 102, receiving a response message returned by each electronic device in response to the networking request, and adding the target electronic device connected to the control terminal to the preset network based on the response message;
[0071] The networking request sent by the control terminal can be used to instruct each electronic device to respond to the networking request to establish a connection, and then add the target electronic device to be connected to the preset network to achieve interconnection between multiple devices.
[0072] In some embodiments of the present invention, the control terminal may receive response messages returned by various electronic devices in response to networking requests, and based on the response messages indicating that a connection has been successfully established with the control terminal, add the corresponding target electronic devices to the preset network.
[0073] Among them, assuming that the control terminal adopts a preset first communication protocol for network communication, when each electronic device establishes a connection with the control terminal, if the communication protocol adopted by a certain electronic device is the same as the communication protocol adopted by the control terminal, that is, the preset first communication protocol is adopted for network communication, then the target electronic device adopting the preset first communication protocol can be connected to the control terminal; if the communication protocol adopted by a certain electronic device is different from the communication protocol adopted by the control terminal, for example, the preset second communication protocol is adopted for network communication, the target electronic device adopting the preset second communication protocol cannot be directly connected to the control terminal, and at this time the connection between the aforementioned target electronic device and the control terminal can be achieved via a bridge adopting the preset first communication protocol.
[0074] Exemplarily, assuming that the preset first communication protocol adopted by the control terminal is the Matter protocol, then the preset second communication protocol may be a non-Matter protocol, that is, a communication protocol other than the Matter protocol. Matter is a new smart home connection standard that aims to simplify the development process of manufacturers and improve consumer compatibility. It can be mainly based on existing technologies such as Wi-Fi, Thread and Bluetooth BLE (Bluetooth Low Energy), and uses IP (Internet Protocol) as its communication layer, which means that devices using Matter can communicate on a local network or the Internet, and can be controlled by multiple ecosystems. It should be noted that the communication protocol adopted may also be other protocols, which is not limited in the embodiments of the present invention.
[0075] Step 103, obtaining the operating status information of the target electronic device in the preset network;
[0076] After adding the target electronic device to the preset network, the control terminal can manage the firmware version of each target electronic device in the network, obtain the latest firmware of the device in time, and transfer the firmware file to the corresponding device through the Matter protocol at the appropriate time to achieve version upgrade.
[0077] Specifically, in order to ensure the timeliness of acquiring the latest firmware of the device, the control terminal can manage and implement the firmware upgrade of the target electronic device based on the operating status information of the target electronic device in the preset network.
[0078] Step 104: Upgrade the firmware of the target electronic device according to the operation status information.
[0079] In some embodiments of the present invention, the operating status information can generally be used to indicate the operating time of the target electronic device, and then the firmware file is transmitted to the corresponding device through the Matter protocol at an appropriate time to achieve version upgrade.
[0080] In an embodiment of the present invention, a control terminal in the same local area network sends a networking request to each electronic device, and receives a response message returned by each electronic device in response to the networking request, and based on the response message, the target electronic device connected to the control terminal is added to the preset network, wherein the target electronic device using the same communication protocol as the control terminal can be connected to the control terminal, and the target electronic device using a different communication protocol from the control terminal can be connected to the control terminal via a bridge, thereby realizing the interconnection between the various electronic devices based on the networking operation of the control terminal; after the networking is completed, the control terminal can obtain an updated version of the firmware based on the operating status information of the target electronic device in the network, and complete the firmware upgrade of the target electronic device, that is, it can manage the firmware version of each device, timely connect to the network to obtain the latest firmware of the device, and realize the firmware upgrade management of the devices in the network.
[0081] Reference Figure 2 , shows a flowchart of another embodiment of a method for upgrading the firmware of an electronic device of the present invention, which may specifically include the following steps:
[0082] Step 201, the control terminal sends a networking request to each electronic device, and based on the response message, adds the target electronic device connected to the control terminal to the preset network;
[0083] The multi-device interconnection and cross-platform communication framework provided by the embodiment of the present invention can be implemented by networking based on the control terminal. Specifically, the control terminal can send a networking request to each electronic device in the same local area network to add multiple electronic devices to the preset network to achieve interconnection between multiple devices.
[0084] The networking request sent by the control terminal can be used to instruct each electronic device to respond to the networking request to establish a connection, and then add the target electronic device to be connected to the preset network to achieve interconnection between multiple devices.
[0085] In some embodiments of the present invention, the control terminal may receive response messages returned by each electronic device in response to a networking request, and based on the response message indicating that a connection has been successfully established with the control terminal, the corresponding target electronic device may be added to the preset network. That is, if it is determined based on the response message that the first electronic device is successfully connected to the control terminal, the first electronic device may be used as the target electronic device and the target electronic device may be added to the preset network.
[0086] In a preferred embodiment, if it is determined based on the response message that the second electronic device fails to establish a connection with the control terminal, a networking request can be resent to the second electronic device according to a preset number of times, and a response message returned by the second electronic device in response to the networking request can be received.
[0087] Among them, assuming that the control terminal adopts a preset first communication protocol for network communication, when each electronic device establishes a connection with the control terminal, if the communication protocol adopted by a certain electronic device is the same as the communication protocol adopted by the control terminal, that is, the preset first communication protocol is adopted for network communication, then the target electronic device adopting the preset first communication protocol can be connected to the control terminal; if the communication protocol adopted by a certain electronic device is different from the communication protocol adopted by the control terminal, for example, the preset second communication protocol is adopted for network communication, the target electronic device adopting the preset second communication protocol cannot be directly connected to the control terminal, and at this time the connection between the aforementioned target electronic device and the control terminal can be achieved via a bridge adopting the preset first communication protocol.
[0088] Optionally, the networking of the control terminal involves hardware and network environment requirements, and the control terminal and each electronic device joining the networking are required to be in the same local area network.
[0089] Exemplarily, assuming that the preset first communication protocol adopted by the control terminal is the Matter protocol, then the preset second communication protocol may be a non-Matter protocol, that is, a communication protocol other than the Matter protocol.
[0090] Specifically, refer to Figure 3 , showing a schematic diagram of the networking process provided by an embodiment of the present invention, assuming that a Matter device is used as a multi-device ecological control terminal for interaction, for example, a smart home central control system with multi-device management function is used as the control terminal; each electronic device can take multiple home smart devices as an example, such as smart monitoring, smart door locks, smart lamps and smart speakers, etc. At this time, the aforementioned multiple home smart devices in the same local area network as the central control system can be used as sub-devices of the central control system to respond to and execute instructions.
[0091] In the process of networking, the central control system and the sub-devices of the central control system as the control terminal can first perform initialization operations, including basic settings and startup of the devices, and then Figure 3As shown, the control terminal can issue a networking request so that the sub-device responds to the networking request and establishes a connection. Specifically, the networking process can use a secure session establishment mechanism based on a shared password (Password-Authenticated Session Establishment, PASE for short) or a certificate (Certificate-Authenticated Session Establishment, CASE for short) to complete security authentication. The control terminal can receive response information fed back by each sub-device, and determine whether the sub-device has successfully passed the security authentication and established a connection based on the response message. In one case, if it is determined according to the response information that a sub-device has successfully passed the security authentication and established a connection, the sub-device that has passed the security authentication and established a connection can be added to the preset network; in another case, if it is determined according to the response message that a sub-device has failed in security authentication or connection establishment, then an attempt can be made to establish a connection with the sub-device again according to a preset number of thresholds. The preset number of thresholds can be 3 times, that is, 3 repeated access request attempts can be made.
[0092] Among them, after performing the initialization operation, the sub-device can generate a unique device identification code. The generated device identification code, also known as the device identifier (Device Identifier), can be mainly used for identity verification and security authentication when the sub-device first joins the Matter network to ensure the legitimacy of the device.
[0093] It should be noted that the networking process follows the standard networking specified by the Matter protocol. Since the first networking process of Matter is prone to pairing failure, a pairing attempt mechanism can be added on the basis of the above, so as to improve the mechanism based on the above-mentioned problem of multiple pairings. Specifically, it can be manifested as adding multiple pairing attempts under the original fail-safe timer (fai-safetimer) mechanism when networking for the first time. For example, when the pairing of the sub-device fails, the control terminal can automatically initiate multiple re-pairing requests without manual intervention by the user, and can effectively handle some temporary errors, such as signal interference or time synchronization problems, and improve the fault tolerance of the device adding process. Optionally, an exponential backoff strategy can also be set, that is, the waiting time after failure is extended to prevent frequent retries from affecting the normal operation of the device.
[0094] In this example, when the control terminal uses the Matter protocol for network communication, a multi-device interconnection and cross-platform communication framework can be implemented based on the Matter ecosystem.
[0095] Matter Ecosystem (Fabric) can be networked in a variety of ways. Taking the Matter-WiFi network structure as an example, the network can be Figure 4 As shown, a Matter device can be used as a multi-device ecological control terminal for interaction, for example, a smart home central control system with multi-device management function can be used as a control terminal; each electronic device can take multiple home smart devices as an example, such as smart monitoring, smart door locks, smart lamps and smart speakers, etc. At this time, the aforementioned multiple home smart devices in the same local area network as the central control system can act as sub-devices of the central control system to respond to and execute commands.
[0096] When sub-devices respond to networking requests to connect to the regional LAN, non-Matter devices (i.e., target electronic devices that use non-Matter protocols) can join the Matter network through Matter bridge devices. Bridge devices convert and relay data between different protocols, thereby allowing non-Matter protocol devices to communicate with the Matter ecosystem; Matter devices (i.e., target electronic devices that use the Matter protocol) can directly establish a connection with the control terminal and join the Matter network.
[0097] It should be noted that, due to the differences in Matter networking methods, the networking structure implemented in the embodiments of the present invention can also build a Matter ecosystem based on the Matter-Thread network structure, or build a Matter ecosystem based on the Matter-Cross network structure, and the embodiments of the present invention are not limited to this.
[0098] Step 202, obtaining device information and firmware download information of a target electronic device in a preset network, and displaying the device information and firmware download information through an interface;
[0099] In actual applications, the sub-devices that establish the connection can be added to the established Matter ecosystem and can match the control node (Node ID). After the establishment of the Matter ecosystem is completed, the above-mentioned matching nodes and sub-devices can also be connected at the user layer to realize networking.
[0100] In some embodiments of the present invention, after the target electronic device for establishing a connection is added to the preset network, at the user level, the control terminal can integrate the information of the paired devices, that is, it can obtain the device information and firmware download information of the target electronic device in the preset network, integrate it and display it in the interface, so as to provide the user with feedback on the specific electronic devices and related information of the electronic devices that can be uniformly managed by the control terminal.
[0101] Exemplarily, the device information may include the current device number, device status and other information, and the firmware download information may include a firmware update link, version information, etc., wherein the firmware update link may refer to firmware URL (Uniform Resource Locator) information, and the firmware URL information generally refers to a uniform resource locator used to download or update device firmware. It should be noted that the embodiments of the present invention do not limit the specific device information and firmware download information.
[0102] Step 203, after the target electronic device enters the running state, record the running state information of the target electronic device;
[0103] like Figure 3 As shown, each sub-device can enter the running state. At this time, the central control system as the control terminal can record the running state information of the sub-device in real time to generate a time update strategy for subsequent automatic update of the device firmware.
[0104] Step 204: Upgrade the firmware of the target electronic device according to the operation status information.
[0105] In some embodiments of the present invention, the operating status information can generally be used to indicate the operating time of the target electronic device, and then the firmware file is transmitted to the corresponding device through the Matter protocol at an appropriate time to achieve version upgrade.
[0106] Optionally, the firmware of the target electronic device may be manually updated and / or automatically updated according to the operating time of the target electronic device.
[0107] In the manual update scheme, it can be specifically manifested as responding to an upgrade instruction for any target electronic device, obtaining the latest version of the firmware update link, and then downloading the firmware information based on the latest version of the firmware update link, transmitting the firmware information to the target electronic device, and burning the firmware information to the target electronic device when the firmware information is verified to be passed, so that the firmware of the target electronic device is updated.
[0108] For example, Figure 5As shown, for the manual update process, the user can specify the target electronic device that needs to be upgraded through the central control system. After receiving the upgrade instruction, the central control system can perform the operation of configuring the update URL. At this time, based on the latest firmware version link obtained, the current version information of the firmware of the target electronic device can be compared with the obtained version information. If the device manufacturer has not pushed an updated version of the firmware, the user can be prompted that the current version is the latest version and the current update process is terminated; when an updated version of the firmware is obtained, the firmware information can be downloaded based on the latest firmware update link, such as downloading the bin burning firmware of the MCU (Microcontroller Unit), and after the download is completed, the firmware information can be transmitted to the sub-device. At this time, the sub-device can perform file verification on the firmware information. If the file verification fails, the aforementioned downloaded firmware information can be temporarily stored in the central control system. At this time, the aforementioned temporarily stored firmware information can be transmitted to the sub-device again; if the file verification passes, uboot (Universal Boot Loader is a widely used open source boot loader for embedded systems. It is responsible for initializing the hardware before the operating system starts, and restarting to complete the firmware burning. At this time, the interface can prompt the user that the firmware version of the current target electronic device has been updated, ending the update process. It should be noted that manual updates are real-time. During manual updates, if the device is in working state, the central control system will require the device to end work and then enter the firmware burning mode.
[0109] Among them, the firmware update link contained in the firmware download information can be divided into a platform firmware download total link and a firmware version link. The platform firmware download total link is usually unique, which is unchanged and provided by the device manufacturer at the factory; the firmware version link is under the above-mentioned total link, which is variable. Each firmware version corresponds to a link. When the device manufacturer launches a new firmware version, a new latest link is added. The embodiment of the present invention can obtain the latest firmware version link by updating the URL of the central control system serving as the control terminal.
[0110] For the file verification process, it can be manifested as the central control system performing hash calculation on the relevant files to generate a first hash value before sending the firmware information downloaded based on the firmware update link; when the central control system transmits files to the sub-device, it can transmit the data to the sub-device at the same time. After receiving the file, the sub-device can also perform hash calculation on the received firmware-related files, and a second hash value can be obtained at this time. If the first hash value is consistent with the second hash value, it means that the files related to the firmware information are not damaged during the transmission process, thereby ensuring the integrity of the transmitted files.
[0111] In a preferred embodiment of the present invention, before responding to an upgrade instruction for any target electronic device, the central control system as a control terminal can also scan multiple target electronic devices for which firmware versions are to be upgraded, and display the scanned multiple target electronic devices through an interface to instruct the user to manually select the target electronic devices to be upgraded. Exemplarily, the user uses the one-key scanning function provided by the central control system to query whether there is a device that needs to be upgraded, so that the user can specify it among the multiple target electronic devices that need to be upgraded.
[0112] In the automatic update scheme, it can be specifically manifested as generating a time update strategy according to the running time, and the time update strategy is used to indicate the update time of the target electronic device. At the update time of the target electronic device, the latest version of the firmware update link can be obtained, and then the firmware information can be downloaded based on the latest version of the firmware update link, and the firmware information can be transmitted to the target electronic device. When the firmware information is verified, the firmware information can be burned to the target electronic device to complete the update of the firmware of the target electronic device.
[0113] For example, Figure 5 As shown, for the automatic update process, version management can be performed according to the time update strategy. The time can be the system default or based on the user's self-configuration, so as to obtain the version information and update operation at a scheduled time. The central control system can perform the configuration update URL operation at the default time based on the aforementioned time update strategy, obtain the latest firmware version link at a scheduled time, and compare the current version information of the firmware of the target electronic device with the obtained version information. If the device manufacturer does not push the updated version of the firmware, the current update process is terminated; when the updated version of the firmware is obtained, the firmware information can be downloaded based on the latest firmware update link, such as downloading the bin burning firmware of the MCU, and after the download is completed, the update time can be determined according to the corresponding sub-device operation status record. When the specified time is reached, the central control system transmits the firmware information to the sub-device, and the sub-device can perform file verification on the firmware information. If the file verification fails, the aforementioned downloaded firmware information can be temporarily stored in the central control system, and the aforementioned temporarily stored firmware information can be transmitted to the sub-device again; if the file verification passes, the uboot startup can be set for the sub-device, and the firmware burning is completed by restarting, and the update process is terminated. Optionally, after completing the above process, the central control system can synchronously update the device version information for interface display and user query.
[0114] Among them, the dormant period of the device can usually be used to burn the firmware to improve the stability of the device and avoid affecting user use. Exemplarily, the sub-device can enter the firmware burning mode during the dormant period, and can restart the device after the firmware is burned to complete the firmware version update process.
[0115] It should be noted that restarting after burning is a necessary process for updating the embedded device, and the embodiment of the present invention does not limit this.
[0116] In an embodiment of the present invention, by providing a multi-device interconnection and cross-platform communication framework, a control terminal in the same local area network sends a networking request to each electronic device, and the networking operation of the control terminal is used to realize the interconnection between the various electronic devices, so as to effectively manage the devices in a unified manner, manage the firmware version of each device, and obtain the latest firmware of the device in a timely manner through the network, so as to realize the firmware upgrade management of the devices in the network. Furthermore, the control terminal can manage the firmware upgrade of the electronic device according to the operating status information of the target electronic device in the network, so that the updated version of the firmware can be obtained at the appropriate time according to the operating status information used to indicate the operating time of the device, and the firmware of the target electronic device can be burned to complete the firmware upgrade of the target electronic device. Compared with the traditional OTA firmware upgrade method, the firmware upgrade mechanism provided in the embodiment of the present invention can effectively reduce the hardware cost of electronic devices, and better manage the version upgrade of electronic devices and improve the user experience.
[0117] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0118] Reference Figure 6 , shows a structural block diagram of an embodiment of a firmware upgrade device for an electronic device of the present invention, involving a control terminal, the control terminal and each electronic device are in the same local area network, the control terminal uses a preset first communication protocol for network communication, and specifically may include the following modules:
[0119] A network request sending module 601 is used to send a network request to each electronic device;
[0120] The networking module 602 is used to receive the response message returned by each electronic device in response to the networking request, and add the target electronic device connected to the control terminal to the preset network based on the response message; wherein the target electronic device using the preset first communication protocol is connected to the control terminal, and the target electronic device using the preset second communication protocol is connected to the control terminal via a bridge;
[0121] The operation status information acquisition module 603 is used to acquire the operation status information of the target electronic device in the preset network;
[0122] The firmware upgrade module 604 is used to upgrade the firmware of the target electronic device according to the operating status information.
[0123] In some embodiments of the present invention, the networking module 602 may include the following submodules:
[0124] The networking submodule is used to use the first electronic device as the target electronic device and add the target electronic device to the preset network when it is determined based on the response message that the first electronic device is successfully connected to the control terminal.
[0125] In some embodiments of the present invention, the networking submodule is also used to resend the networking request to the second electronic device according to a preset number threshold when it is determined based on the response message that the second electronic device fails to establish a connection with the control terminal, and receive a response message returned by the second electronic device in response to the networking request.
[0126] In some embodiments of the present invention, after adding the target electronic device to the preset network, the apparatus provided by the embodiment of the present invention may further include the following modules:
[0127] The information display module is used to obtain the device information and firmware download information of the target electronic device in the preset network; and display the device information and firmware download information through an interface.
[0128] In some embodiments of the present invention, the apparatus provided by the embodiments of the present invention may further include the following modules:
[0129] The status information collection module is used to record the operating status information of the target electronic device after the target electronic device enters the operating state.
[0130] In some embodiments of the present invention, the operating status information is used to indicate the operating time of the target electronic device; the firmware upgrade module 604 may include the following submodules:
[0131] The firmware upgrade submodule is used to manually update and / or automatically update the firmware of the target electronic device according to the operating time of the target electronic device.
[0132] In some embodiments of the present invention, the firmware download information includes a firmware update link; the firmware upgrade submodule may include the following units:
[0133] A manual update unit is used to respond to an upgrade instruction for any of the target electronic devices to obtain a latest version of a firmware update link when the target electronic device is determined to be running according to the running time; download firmware information based on the latest version of the firmware update link and transmit the firmware information to the target electronic device; and burn the firmware information to the target electronic device when the firmware information is verified to be passed, so that the firmware of the target electronic device is updated.
[0134] In some embodiments of the present invention, the firmware upgrade submodule may further include the following units:
[0135] The device specifying unit is used to scan and obtain multiple target electronic devices for which firmware versions are to be upgraded; and to display the multiple target electronic devices through an interface to instruct a user to manually select the target electronic devices to be upgraded.
[0136] In some embodiments of the present invention, the firmware download information includes a firmware update link; the firmware upgrade submodule may include the following units:
[0137] An automatic update unit is used to generate a time update strategy according to the running time, wherein the time update strategy is used to indicate the update time of the target electronic device; at the update time of the target electronic device, obtain a firmware update link of the latest version; download firmware information based on the firmware update link of the latest version, and transmit the firmware information to the target electronic device; if the firmware information is verified, burn the firmware information to the target electronic device to complete the firmware update of the target electronic device.
[0138] In an embodiment of the present invention, a firmware upgrade device for an electronic device provided by an embodiment of the present invention sends a networking request to each electronic device through a control terminal in the same local area network, and receives a response message returned by each electronic device in response to the networking request, and adds a target electronic device connected to the control terminal to a preset network based on the response message, wherein a target electronic device using the same communication protocol as the control terminal can be connected to the control terminal, and a target electronic device using a different communication protocol from the control terminal can be connected to the control terminal via a bridge, thereby realizing interconnection between various electronic devices based on the networking operation of the control terminal; after the networking is completed, the control terminal can obtain an updated version of the firmware based on the operating status information of the target electronic device in the networking, and complete the firmware upgrade of the target electronic device, that is, it can manage the firmware version of each device, timely connect to the network to obtain the latest firmware of the device, and realize firmware upgrade management of the devices in the network.
[0139] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0140] An embodiment of the present invention further provides an electronic device, including:
[0141] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of the firmware upgrade method embodiment of the above-mentioned electronic device is implemented, and the embodiment of the present invention is not described in detail here.
[0142] In an embodiment of the present invention, the electronic device provided by the embodiment of the present invention can execute a networking request to each electronic device through a control terminal in the same local area network, and receive a response message returned by each electronic device in response to the networking request, and add the target electronic device connected to the control terminal to the preset network based on the response message, wherein the target electronic device using the same communication protocol as the control terminal can be connected to the control terminal, and the target electronic device using a different communication protocol from the control terminal can be connected to the control terminal via a bridge, thereby realizing the interconnection between the various electronic devices based on the networking operation of the control terminal; after the networking is completed, the control terminal can obtain an updated version of the firmware according to the operating status information of the target electronic device in the networking, and complete the firmware upgrade of the target electronic device, that is, it can manage the firmware version of each device, timely connect to the Internet to obtain the latest firmware of the device, and realize the firmware upgrade management of the devices in the network.
[0143] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the firmware upgrade method embodiment of the above-mentioned electronic device are implemented. The embodiment of the present invention is not described in detail here.
[0144] In an embodiment of the present invention, the computer-readable storage medium provided by the embodiment of the present invention can execute the sending of networking requests to various electronic devices through a control terminal in the same local area network, and receive response messages returned by various electronic devices in response to the networking requests, and add the target electronic device connected to the control terminal to the preset network based on the response message, wherein the target electronic device using the same communication protocol as the control terminal can be connected to the control terminal, and the target electronic device using a different communication protocol from the control terminal can be connected to the control terminal via a bridge, thereby realizing the interconnection between various electronic devices based on the networking operation of the control terminal; after the networking is completed, the control terminal can obtain an updated version of the firmware according to the operating status information of the target electronic device in the networking, and complete the firmware upgrade of the target electronic device, that is, it can manage the firmware version of each device, timely connect to the Internet to obtain the latest firmware of the device, and realize the firmware upgrade management of the devices in the network.
[0145] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0146] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0147] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0148] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0149] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0150] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0151] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0152] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0153] The above describes in detail a firmware upgrade method for an electronic device, a firmware upgrade device for an electronic device, a corresponding electronic device, and a corresponding computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for upgrading the firmware of an electronic device, characterized in that: A control terminal is involved, the control terminal and each electronic device are in the same local area network, the control terminal uses a preset first communication protocol for network communication, and the method includes: The control terminal sends a networking request to each electronic device; Receiving response messages returned by each electronic device in response to the networking request, and adding the target electronic device connected to the control terminal to the preset network based on the response message; wherein the target electronic device using the preset first communication protocol is connected to the control terminal, and the target electronic device using the preset second communication protocol is connected to the control terminal via a bridge; Obtaining the operating status information of the target electronic device in the preset network; The firmware of the target electronic device is upgraded according to the operating status information.
2. The method according to claim 1, characterized in that: The step of adding the target electronic device connected to the control terminal to a preset network based on the response message includes: If it is determined based on the response message that the first electronic device is successfully connected to the control terminal, the first electronic device is used as the target electronic device, and the target electronic device is added to the preset network.
3. The method according to claim 1 or 2, characterized in that: The step of adding the target electronic device connected to the control terminal to the preset network based on the response message further includes: If it is determined based on the response message that the second electronic device fails to establish a connection with the control terminal, the networking request is resent to the second electronic device according to a preset number of times, and a response message returned by the second electronic device in response to the networking request is received.
4. The method according to claim 1 or 2, characterized in that: After adding the target electronic device to the preset network, the method further includes: Obtaining device information and firmware download information of the target electronic device in the preset network; The device information and firmware download information are displayed through the interface.
5. The method according to claim 4, characterized in that The method further comprises: After the target electronic device enters the running state, the running state information of the target electronic device is recorded.
6. The method according to claim 5, characterized in that The operation status information is used to indicate the operation time of the target electronic device; The step of upgrading the firmware of the target electronic device according to the operating status information includes: The firmware of the target electronic device is manually updated and / or automatically updated according to the operating time of the target electronic device.
7. The method according to claim 6, characterized in that The firmware download information includes a firmware update link; manually updating the firmware of the target electronic device according to the running time of the target electronic device includes: In the case where it is determined according to the running time that the target electronic device is running, responding to an upgrade instruction for any of the target electronic devices, obtaining a firmware update link of the latest version; Downloading firmware information based on the latest version of the firmware update link, and transmitting the firmware information to the target electronic device; When the firmware information is verified to be successful, the firmware information is burned into the target electronic device, so that the firmware of the target electronic device is updated.
8. The method according to claim 7, characterized in that Before responding to the upgrade instruction of any of the target electronic devices, the method further includes: Scan and obtain multiple target electronic devices for which firmware versions are to be upgraded; The multiple target electronic devices are displayed through an interface to instruct the user to manually select the target electronic device to be upgraded.
9. The method according to claim 6, characterized in that The firmware download information includes a firmware update link; automatically updating the firmware of the target electronic device according to the running time of the target electronic device, including: generating a time update policy according to the running time, wherein the time update policy is used to indicate an update time of the target electronic device; At the update time of the target electronic device, obtaining a firmware update link of the latest version; Downloading firmware information based on the latest version of the firmware update link, and transmitting the firmware information to the target electronic device; When the firmware information is verified to be successful, the firmware information is burned into the target electronic device, so that the firmware of the target electronic device is updated.
10. A firmware upgrade device for an electronic device, characterized in that: A control terminal is involved, the control terminal and each electronic device are in the same local area network, the control terminal uses a preset first communication protocol for network communication, and the device includes: A network request sending module, used to send a network request to each electronic device; A networking module, used to receive response messages returned by each electronic device in response to the networking request, and add the target electronic device connected to the control terminal to the preset network based on the response message; wherein the target electronic device using the preset first communication protocol is connected to the control terminal, and the target electronic device using the preset second communication protocol is connected to the control terminal via a bridge; An operation status information acquisition module, used to acquire the operation status information of the target electronic device in the preset network; A firmware upgrade module is used to upgrade the firmware of the target electronic device according to the operating status information.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for upgrading the firmware of the electronic device according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for upgrading the firmware of the electronic device according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Terminal upgrading management method and device
CN110324193A
Method and device for realizing AI cloud linkage between devices, and storage medium
CN115941372A