Methods and systems for firmware upgrades of multi-module Matter devices
By establishing a mapping between version number and module version information in Matter devices and using a second server to obtain firmware information for multi-module devices, the complexity of firmware upgrades for multi-module devices under the Matter specification is solved, and efficient multi-module firmware upgrades are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2026-04-03
AI Technical Summary
The existing Matter specification can only support firmware upgrades for single-module devices, which cannot effectively solve the firmware upgrade problem for multi-module Matter devices, resulting in a complex and lengthy upgrade process that consumes a lot of storage space.
By establishing a mapping between the firmware version number of the Matter device and the version information of multiple modules, and using a second server to store this mapping relationship, the OTA description file is downloaded to obtain the latest version number. Based on this version number, the firmware information and download method of the specific module are requested from the second server to complete the firmware upgrade of the multi-module device.
While adhering to the Matter specification, efficient firmware upgrades for multi-module Matter devices were achieved, reducing storage space usage and upgrade time, and simplifying the upgrade process.
Smart Images

Figure CN116566820B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Matter specification technology, and in particular to a method and system for firmware upgrade of multi-module Matter devices. Background Technology
[0002] The Matter specification describes the requirements for firmware upgrades on Matter-class devices, defining two roles: Role 1 is the OTA (Over The Air) Requestor, node type 0x0012. The Matter specification requires it to implement both the OTA Software Update Provider cluster client role and the OTA Software Update Requestor cluster server role. Role 2 is the OTA Provider, node type 0x0014. The Matter specification requires it to implement both the OTA Software Update Provider cluster server role and the OTA Software Update Requestor cluster client role. The specification also describes the following requirements for the entire firmware upgrade capability:
[0003] 1. Implement a set of logic to notify the OTA Requestor which OTA Providers are currently available.
[0004] 2. Implement a set of logic that allows the OTA Requestor to obtain available firmware image information.
[0005] 3. Provide an OTA Requestor that can pull images via a local proxy, which can also be used when there is no network.
[0006] 4. Implement a mechanism for mutual notification between OTA Requestor and OTA Provider.
[0007] 5. Supports logic for delayed installation based on management rules.
[0008] 6. Implement the logic of obtaining user authorization before the OTA Requestor pulls the image.
[0009] The Matter specification also provides DCL (Distributed Compliance Legder), a distributed storage center that can be used to store firmware image information from different device vendors around the world. The firmware information in DCL is shown in Table 1.
[0010]
[0011]
[0012] As we can see from the information in the table, the Matter specification defines only one type of device firmware information, such as the version information SoftwareVersion and the download address OTAUrl. This limits a Matter device to having only one module. However, in reality, common Matter devices have at least two modules, such as an MCU module and a communication module.
[0013] In particular, for scenarios where the OTA Requestor and OTA Provider use different protocols (e.g., the OTA Requestor uses the Tuya protocol, while the OTA Provider uses the Xiaomi protocol), the OTA Requestor, when performing firmware upgrades via the OTA Provider, must strictly adhere to the Matter specification. However, the current Matter specification only supports firmware upgrades for single-module Matter devices. Packaging the firmware of multiple modules of a Matter device not only consumes limited storage space on the device but also takes a considerable amount of time, making the upgrade process complex and lengthy. Therefore, how to achieve firmware upgrades for Matter devices with multiple modules while complying with the current Matter specification is a current technical challenge. Summary of the Invention
[0014] To enable firmware upgrades for Matter devices with multiple modules while complying with current Matter specifications, this application provides a firmware upgrade scheme for multi-module Matter devices. In this scheme, a mapping is established between the firmware version number of the Matter device and the version information of its multiple modules, stored on a second server. During the upgrade process, the download address OTAUrl provided by DCL does not download the actual firmware, but rather an OTA description file. This file is parsed to obtain the latest firmware upgrade version number. Using this latest firmware upgrade version number, the second server is requested to provide the firmware information of the modules requiring upgrades and the download method, thereby completing the firmware upgrade of the multi-module Matter device.
[0015] According to a first aspect of this application, a method for firmware upgrade of a multi-module Matter device is provided, applied to a Matter device, characterized in that it includes:
[0016] The terminal device sends a firmware upgrade request to the first server, the firmware upgrade request including the Matter device identifier and the current version number of the Matter device;
[0017] The terminal device receives an OTA description file sent by the terminal device, the OTA description file being sent to the Matter device after the terminal device receives the latest version number of the Matter device from the first server and detects that the latest version number is higher than the current version number;
[0018] Parse the OTA description file to obtain the latest version number;
[0019] An upgrade request is sent to the second server according to the latest version number and the Matter device identifier. The second server stores the mapping relationship between the version number of the Matter device and the version information of multiple modules, as well as the download address of the upgrade firmware for each module.
[0020] Receive the firmware upgrade download address provided by the second server, download the firmware information of the module to be upgraded, and update the current version number to the latest version number after the firmware upgrade is completed.
[0021] According to a second aspect of this application, a method for firmware upgrade of a multi-module Matter device is provided, applied to a terminal device, characterized in that it includes:
[0022] Receive a request for firmware upgrade information from a Matter device, the request including the Matter device identifier and the current version number of the Matter device;
[0023] Request the first server to detect the firmware upgrade information corresponding to the Matter device identifier;
[0024] Receive upgrade address information of the Matter device from the first server;
[0025] Download the OTA description file based on the address information;
[0026] The latest version number of the Matter device is obtained according to the OTA description file;
[0027] After comparing the latest version number with the current version number of the Matter device, it is determined whether the Matter device needs to be upgraded; and
[0028] If it is determined that the Matter device needs to be upgraded, the OTA description file is sent to the Matter device so that the Matter device can obtain firmware upgrade information for multiple modules associated with the Matter device from the second server according to the OTA description file.
[0029] According to a third aspect of this application, a method for firmware upgrade of a multi-module Matter device is provided, characterized in that it is applied to a second server, the second server storing a mapping relationship between the version number of the Matter device and the version information of multiple modules, and the download address of the upgrade firmware for each module, the method comprising:
[0030] Receive the latest version number from the Matter device and the Matter device identifier;
[0031] Determine the latest version information for each module of the Matter device corresponding to the latest version number;
[0032] The module to be upgraded for the Matter device is determined based on the latest version information of the module and the current version information of the module corresponding to the Matter device identifier; and
[0033] The firmware upgrade download address of the module to be upgraded is sent to the Matter device so that the Matter device can complete the firmware upgrade.
[0034] According to a fourth aspect of this application, a system for firmware upgrade of a multi-module Matter device is provided, characterized in that it includes a Matter device, a terminal device, a first server, and a second server, wherein:
[0035] The Matter device is used to send a request to the terminal device to detect firmware upgrade information. The request includes the Matter device identifier and the current version number of the Matter device.
[0036] After receiving the request, the terminal device requests the first server to detect the firmware upgrade information corresponding to the Matter device identifier;
[0037] The first server sends the upgrade address information of the Matter device to the terminal device;
[0038] The terminal device receives upgrade address information of the Matter device from the first server, downloads an OTA description file according to the upgrade address information, obtains the latest version number corresponding to the Matter device identifier according to the OTA description file, and determines whether the Matter device needs to be upgraded after comparing the latest version number with the current version number of the Matter device. If it is determined that the Matter device needs to be upgraded, the OTA description file is sent to the Matter device.
[0039] The Matter device parses the OTA description file to obtain the latest version number. The second server stores the mapping relationship between the version number of the Matter device and the version information of multiple modules, as well as the download address of the upgrade firmware for each module. Based on the latest version number and the Matter device identifier, an upgrade request is sent to the second server.
[0040] The second server receives the latest version number and the Matter device identifier from the Matter device, determines the latest version information of the module of the Matter device corresponding to the latest version number, determines the module of the Matter device to be upgraded based on the latest version information of the module and the current version information of the module corresponding to the Matter device identifier, and sends the upgrade firmware download address of the module to be upgraded to the Matter device so that the Matter device can complete the firmware upgrade.
[0041] The Matter device receives the upgrade firmware download address provided by the second server, downloads the firmware information of the module to be upgraded, and updates the current version number to the latest version number after the firmware upgrade is completed.
[0042] According to a fifth aspect of this application, an electronic device is provided, comprising:
[0043] Processor; and
[0044] A memory storing computer instructions that, when executed by the processor, cause the processor to perform the methods described in the first to third aspects.
[0045] According to a sixth aspect of this application, a non-transitory computer storage medium is provided, storing a computer program that, when executed by a plurality of processors, causes the processors to perform the methods described in the first to third aspects.
[0046] According to the method and system for firmware upgrade of multi-module Matter devices provided in this application, during the upgrade process, the download address OTAUrl provided by the first server does not download the actual firmware, but rather an OTA description file. The latest firmware upgrade version number is obtained by parsing this file. A mapping is established between the Matter device's firmware version number and the version information of the multiple modules within the Matter device, and this mapping is stored on a second server. The Matter device requests the firmware information of the modules requiring upgrade and the download method from the second server using the latest firmware upgrade version number, thereby completing the firmware upgrade of the multi-module Matter device. In this way, firmware upgrades for Matter devices with multiple modules are achieved while adhering to the Matter specification. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings, without exceeding the scope of protection claimed by this application.
[0048] Figure 1 This is a schematic diagram of a system for firmware upgrade of a multi-module Matter device according to an embodiment of this application.
[0049] Figure 2 This is a flowchart of a method for upgrading the firmware of a multi-module Matter device implemented by a Matter device according to an embodiment of this application.
[0050] Figure 3 This is a flowchart of a method for upgrading the firmware of a multi-module Matter device implemented by a terminal device according to an embodiment of this application.
[0051] Figure 4 This is a flowchart of a method for firmware upgrade of a multi-module Matter device implemented by a second server according to an embodiment of this application.
[0052] Figure 5 This is a structural diagram of an electronic device provided in this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] Figure 1 This is a schematic diagram of a system for firmware upgrade of a multi-module Matter device according to an embodiment of this application. Figure 1 As shown, the system includes Matter devices, terminal devices, a first server, and a second server. The Matter device, in the Matter specification, is an OTA Requestor; in some specific embodiments, it can be a smart home device, such as a smart door lock or a table lamp. The terminal device, in the Matter specification, is an OTA Provider; in some specific embodiments, it can be an application app, a speaker, a mobile phone, or any terminal with a screen. In one specific embodiment, the Matter device can use the Tuya protocol, while the terminal device uses a third-party protocol other than Tuya, such as the Xiaomi protocol. In some specific embodiments, the first server can be a Matter server, such as DCL. In some specific embodiments, the second server can be a server belonging to the manufacturer of the Matter device, such as Tuya Cloud or Xiaomi Cloud.
[0055] According to some embodiments, when the second server confirms that the Matter device has a product firmware upgrade, such as a version upgrade of a module in the Matter device, it will push the latest version number of the upgraded Matter device to the first server to inform the first server that the Matter device has a firmware update.
[0056] According to some embodiments, when the Matter device can periodically or as needed send a request to the terminal device to detect firmware upgrade information, the terminal device obtains firmware upgrade-related information about the Matter device from the first server based on this request. The first server will send the download address OTAUrl of the upgraded firmware (as shown in Table 1) to the terminal device.
[0057] In existing technology, the terminal device directly downloads the actual firmware information of the Matter device from this download address and sends it back to the Matter device. However, this approach relies on the Matter device having only one module, meaning it can only meet the upgrade needs of a single-module Matter device and cannot support firmware upgrades for devices with multiple modules.
[0058] In this application, a mapping is established between the version number of a Matter device and the version information of its multiple modules; that is, one version number can be mapped to the version information of multiple modules. For example, a Matter device has an MCU module and a Bluetooth module, with a version number of 0x0000. The version information of the MCU module and the Bluetooth module are v1.0.0 and v9.9.0, respectively. The version number can be used to determine the version numbers of the MCU module and the Bluetooth module in the Matter device.
[0059] According to some embodiments, the version number of the Matter device is updated based on changes in the version information of its modules. These changes may include the addition or deletion of modules, as well as version upgrades. The version number of the Matter device is updated for any one or more of the following: the addition of a module, the deletion of a module, or the upgrade of a module version. For example, if the Matter device only includes a WiFi module and the WiFi module's version information is v1.0.0, the version number of the Matter device is 0x0000. If an MCU module is added to the Matter device, and its version information is v9.9.0, the version number of the Matter device is updated to 0x0001. When the WiFi module's version information is upgraded to v1.0.1, the version number of the Matter device is updated to 0x0002. When the MCU module's version information is upgraded to v9.9.1, the version number of the Matter device is updated to 0x0003, and so on.
[0060] According to some embodiments, when technicians upgrade or make changes to the modules of a Matter device through the firmware management platform, they will send the module version information and the corresponding updated Matter device version number to the platform server. The platform server will then inform the first server of the module version information and the corresponding updated Matter device version number, so that the first server can promptly know and save the latest version number.
[0061] The second server stores the mapping relationship between the version number of each Matter device and the version information of its multiple modules.
[0062] In this application, the terminal device downloads an OTA description file, not actual firmware information, through the download address OTAUrl provided by the first server. This OTA description file contains the latest version number of the Matter device. According to one specific embodiment, the latest version number of the Matter device can be located in the Header field of the Matter device OTA firmware description file. Through this OTA description file, the latest version number of the Matter device can be obtained from the first server. The terminal device compares the current version number of the Matter device with the latest version number to confirm whether the latest version number is updated. According to one embodiment, the previous version number can be compared with the latest version number. If the latest version number is larger, it is confirmed that the latest version number is updated; otherwise, the latest version number is not updated, and no upgrade is needed. The terminal device does not send the OTA description file to the Matter device. However, if it is confirmed that the firmware version indicated by the latest version number is updated, the OTA description file is sent to the Matter device. The Matter device obtains the latest version number based on the OTA description file and sends the latest version number and the Matter device identifier to the second server to request firmware upgrade information. The Matter device identifier includes a UUID (Universally Unique Identifier) field or other fields that distinguish the Matter device from other devices, such as a MAC address or a pre-set serial number.
[0063] According to some embodiments, the second server stores a mapping relationship between the version number of the Matter device and the version information of multiple modules. The second server obtains the corresponding module version information by using the current version number and the latest version number of the Matter device, thereby determining whether a module of the Matter device needs to be upgraded, and which modules(s) require upgrades. According to some embodiments, the second server also stores the download address of the upgrade firmware for each module. If it is determined whether a module of the Matter device needs to be upgraded, a path for the Matter device to obtain the firmware upgrade is provided, and the Matter device obtains the actual firmware through this path to perform the firmware upgrade.
[0064] According to the aforementioned system for firmware upgrades of multi-module Matter devices, during the upgrade process, the terminal device requests firmware upgrade information from the first server. The first server then sends the download address (OTAUrl) of the upgraded firmware to the terminal device, ensuring that the upgrade process complies with the Matter specification. The firmware downloaded via the OTAUrl is not the actual firmware, but rather an OTA description file. The latest firmware upgrade version number is obtained by parsing this file. To enable firmware upgrades for multiple-module Matter devices, a mapping is first established between the Matter device's version number and the version information of the multiple modules within the Matter device, and this mapping is stored on a second server. Then, the Matter device requests the firmware information of the modules requiring upgrades and the download method from the second server using the latest firmware upgrade version number, thus completing the firmware upgrade for the multi-module Matter device. In this way, firmware upgrades for multi-module Matter devices are achieved while adhering to the Matter specification.
[0065] Based on the above-mentioned system for upgrading the firmware of multi-module Matter devices, the roles of Matter devices, terminal devices, and the second server in the firmware upgrade process will be described below.
[0066] exist Figure 2 This is a flowchart illustrating a method for upgrading the firmware of a multi-module Matter device implemented by a Matter device according to an embodiment of this application. Figure 2 As shown, the method includes the following steps:
[0067] Step S201: Send a firmware upgrade request to the first server through the terminal device;
[0068] Step S202: Receive the OTA description file sent by the terminal device;
[0069] Step S203: Parse the OTA description file to obtain the latest version number.
[0070] In some specific embodiments, the Matter device can periodically receive requests to the terminal device to detect firmware upgrade information as needed. These firmware upgrade requests include the Matter device identifier and the current version number of the Matter device. Based on this request, the terminal device obtains the OTA description file corresponding to the Matter device from the download address OTAUrl provided by the first server. Since the terminal device still obtains information from the download address OTAUrl provided by the first server, the above process still conforms to the Matter specification. The terminal device obtains the OTA description file, not the actual firmware, from the download address OTAUrl provided by the first server. By parsing the OTA description file, the latest version number of the Matter device in the first server can be obtained.
[0071] In some specific embodiments, the terminal device compares the latest version number corresponding to the Matter device identifier with the current version number of the Matter device to determine whether a firmware upgrade is needed. In one specific embodiment, if the latest version number is greater than the current version number of the Matter device, a firmware upgrade is needed; otherwise, no firmware upgrade is needed. If a firmware upgrade is determined to be required, the terminal device sends the OTA description file to the Matter device.
[0072] In some embodiments, the Matter device parses the OTA description file to obtain the latest version number.
[0073] Step S204: Send an upgrade request to the second server according to the latest version number and the Matter device identifier.
[0074] According to some embodiments, after obtaining the latest version number, the Matter device sends the latest version number and the Matter device identifier to a second server, requesting the second server to confirm whether the Matter device's modules need to be upgraded, and which modules(s) need to be upgraded.
[0075] In some embodiments, the Matter device sends the latest version number and the Matter device identifier to a second server. The second server, based on the latest version number and the current version number of the Matter device corresponding to the Matter device identifier, confirms the version information of the modules corresponding to the latest version number and the current version number, and determines which modules(s) need to be upgraded. In another embodiment, the Matter device sends the latest version number and the current module version information of the Matter device to a second server. The second server, based on the latest version number, confirms the version information of the modules corresponding to the latest version number, and, based on the current module version information of the Matter device, determines which modules(s) need to be upgraded.
[0076] According to some embodiments, the Matter device can send its latest version number, its identifier, and the current version information of all modules to a second server. The second server then identifies which modules(s) of the Matter device require an upgrade. The second server locates the latest version information of a given module based on the latest version number, the identifier, and the mapping between the Matter device's version number and the version information of multiple modules. Then, it determines which modules require firmware upgrades based on the current and latest version information of all modules. After confirmation, the second server sends the firmware upgrade download address for the modules requiring upgrades to the Matter device, enabling the Matter device to download the firmware according to the download address.
[0077] According to some embodiments, the Matter device can send its latest version number, its identifier, and the current version information of any module to a second server, allowing the second server to confirm whether that module needs an upgrade. The second server then uses the latest version number, the identifier, and the mapping between the Matter device's version number and the version information of multiple modules to find the latest version information of that module. Next, it checks whether a firmware upgrade is needed for that module based on both the current and latest version information. After confirmation, the second server sends the upgrade firmware download address to the Matter device, enabling the Matter device to download the firmware. The Matter device can then send the current version information of the next module to the second server, allowing the second server to confirm whether that module needs an upgrade, continuing this process until all modules of the Matter device have been traversed.
[0078] Thus, step S204 may include: sending the latest version number of the Matter device, the Matter device identifier, and the current version information of each module associated with the Matter device version number to the second server respectively; so that the second server can determine whether a firmware upgrade is needed for each module based on the current version information and the latest version information of each module.
[0079] Typically, Matter devices have relatively low processing power. Upgrading modules one by one can keep up with the processing power of the Matter device. Moreover, upgrading modules one by one requires less transmission bandwidth and is less prone to transmission errors compared to upgrading multiple modules at the same time.
[0080] Step S205: Receive the upgrade firmware download address provided by the second server, download the firmware information of the module to be upgraded, and update the current version number to the latest version number after the firmware upgrade is completed.
[0081] According to some embodiments, the second server stores a mapping relationship between the version number of the Matter device and the version information of multiple modules. Based on the version information of the module corresponding to the latest version number and the current version information of the modules on the Matter device, the second server determines which modules(s) need to be upgraded and then sends an instruction message to the Matter device, indicating the modules that need to be upgraded. The second server also stores the upgrade firmware download address for each module. The Matter device downloads the firmware information of the modules that need to be upgraded based on the upgrade firmware download address provided by the second server.
[0082] In some implementations, after determining the modules that need upgrading in the Matter device, the second server informs the Matter device of the module upgrade firmware download address. The Matter device then downloads the firmware information of the module to be upgraded according to this address and completes the upgrade. After the upgrade is complete, the Matter device updates its current version number to the latest version number. In some embodiments, after a successful upgrade, the Matter device stores the latest version number in memory, for example, by burning it into its FLASH (flash memory).
[0083] According to some embodiments, after the upgrade is complete, the Matter device will also update the firmware version information of the module being upgraded. Thus, Figure 2 The method may further include updating the version information of the upgraded module based on the firmware information of the downloaded module. According to some embodiments, after a successful upgrade, the Matter device stores the module version information corresponding to the latest version number in memory, for example, by burning it into its FLASH memory.
[0084] Figure 3 This is a flowchart illustrating a method for upgrading the firmware of a multi-module Matter device implemented by a terminal device according to an embodiment of this application. Figure 3 As shown, the method includes the following steps.
[0085] Step S301: Receive a request for firmware upgrade information from the Matter device, the request including the Matter device identifier and the current version number of the Matter device;
[0086] Step S302: Request the first server to detect the firmware upgrade information corresponding to the Matter device identifier;
[0087] Step S303: Receive upgrade address information of the Matter device from the first server;
[0088] Step S304: Download the OTA description file according to the address information;
[0089] Step S305: Obtain the latest version number of the Matter device according to the OTA description file.
[0090] In some specific embodiments, the Matter device can periodically receive requests to the terminal device to detect firmware upgrade information as needed. Based on these requests, the terminal device obtains the OTA description file corresponding to the Matter device identifier from the download address OTAUrl provided by the first server. Since the terminal device still obtains information from the download address OTAUrl provided by the first server, the above process still conforms to the Matter specification. The terminal device obtains the OTA description file, not the actual firmware, from the download address OTAUrl provided by the first server. By parsing the OTA description file, the latest version number of the Matter device in the first server can be obtained.
[0091] Step S306: After comparing the latest version number with the current version number of the Matter device, determine whether the Matter device needs to be upgraded;
[0092] Step S307: If it is determined that the Matter device needs to be upgraded, the OTA description file is sent to the Matter device so that the Matter device can obtain firmware upgrade information of multiple modules associated with the Matter device from the second server according to the OTA description file.
[0093] In some specific embodiments, the terminal device compares the latest version number with the current version number of the Matter device to determine whether a firmware upgrade is needed for the Matter device. In one specific embodiment, if the latest version number is greater than the current version number of the Matter device, a firmware upgrade is needed; otherwise, no firmware upgrade is needed. If a firmware upgrade is determined to be needed, the terminal device sends the OTA description file to the Matter device.
[0094] According to some embodiments, after obtaining the latest version number, the Matter device sends the latest version number and the Matter device identifier to a second server, requesting the second server to confirm whether the Matter device's modules need to be upgraded, and which modules(s) need to be upgraded.
[0095] In some embodiments, the Matter device sends the latest version number and the Matter device identifier to a second server. The second server, based on the latest version number and the current version number of the Matter device corresponding to the Matter device identifier, confirms the version information of the modules corresponding to the latest version number and the current version number, and determines which modules(s) need to be upgraded. In another embodiment, the Matter device sends the latest version number and the current module version information of the Matter device to a second server. The second server, based on the latest version number, confirms the version information of the modules corresponding to the latest version number, and, based on the current module version information of the Matter device, determines which modules(s) need to be upgraded.
[0096] In some implementations, after determining the modules that need upgrading in the Matter device, the second server informs the Matter device of the module upgrade firmware download address. The Matter device then downloads the firmware information of the module to be upgraded according to this address and completes the upgrade. After the upgrade is complete, the Matter device updates its current version number to the latest version number. In some embodiments, after a successful upgrade, the Matter device stores the latest version number in memory, for example, by burning it into its FLASH (flash memory).
[0097] According to some specific embodiments, after a successful upgrade, the Matter device will also send a response to the terminal device indicating that the firmware upgrade was successful.
[0098] so Figure 3 The method shown also includes receiving a response from the Matter device indicating a successful firmware upgrade.
[0099] Figure 4This is a flowchart illustrating a method for firmware upgrade of a multi-module Matter device implemented by a second server according to an embodiment of this application. The second server stores a mapping relationship between the version number of the Matter device and version information of multiple modules, as well as the download address of the upgrade firmware for each module. Figure 4 As shown, the method includes the following steps.
[0100] Step S401: Receive the latest version number and the Matter device identifier from the Matter device;
[0101] Step S402: Determine the latest version information of each module of the Matter device corresponding to the latest version number;
[0102] Step S403: Determine the module to be upgraded for the Matter device based on the latest version information of the module and the current version information of the module corresponding to the Matter device identifier; and
[0103] Step S404: Send the firmware upgrade address of the module to be upgraded to the Matter device so that the Matter device can complete the firmware upgrade.
[0104] In some embodiments, the Matter device sends the latest version number and the Matter device identifier to a second server. The second server determines the version information of the modules corresponding to the latest version number and the current version number based on the latest version number and the Matter device identifier, and determines which modules(s) need to be upgraded. In another embodiment, the Matter device sends the latest version number and the current module version information of the Matter device to a second server. The second server determines the version information of the modules corresponding to the latest version number, and determines which modules(s) need to be upgraded based on the current module version information of the Matter device.
[0105] According to some embodiments, the Matter device can send its latest version number, its identifier, and the current version information of all modules to a second server. The second server then identifies which modules(s) of the Matter device require an upgrade. The second server locates the latest version information of a given module based on the latest version number, the identifier, and the mapping between the Matter device's version number and the version information of multiple modules. Then, it determines which modules require firmware upgrades based on the current and latest version information of all modules. After confirmation, the second server sends the firmware upgrade download address for the modules requiring upgrades to the Matter device, enabling the Matter device to download the firmware according to the download address.
[0106] According to some embodiments, the Matter device can send its latest version number, its identifier, and the current version information of any module to a second server, allowing the second server to confirm whether that module needs an upgrade. The second server then uses the latest version number, the identifier, and the mapping between the Matter device's version number and the version information of multiple modules to find the latest version information of that module. Next, it checks whether a firmware upgrade is needed for that module based on its current and latest version information. After confirmation, the second server sends the upgrade firmware download address to the Matter device, enabling the Matter device to download the firmware. The Matter device can then send the current version information of the next module to the second server, allowing the second server to confirm whether that module needs an upgrade, and so on, until all modules of the Matter device have been traversed. Typically, the processing power of a Matter device is relatively low; upgrading modules one by one does not exceed its processing capacity. Furthermore, upgrading modules one by one requires less bandwidth and is less prone to transmission errors compared to upgrading multiple modules simultaneously.
[0107] Thus, step S404 may include:
[0108] Sub-step S4041: Receive the latest version number of the Matter device, the Matter device identifier, and the current version information of any module associated with the version number of the Matter device sent by the Matter device;
[0109] Sub-step S4042: Find the latest version information of the module based on the latest version number of the Matter device, the Matter device identifier, and the mapping relationship;
[0110] Sub-step S4043: Based on the current version information and the latest version information of the module, determine whether the module needs to be upgraded with firmware. If it is confirmed that a firmware upgrade is needed, send the upgrade firmware download address of the module to the Matter device, so that the Matter device downloads the firmware of the module according to the upgrade firmware download address.
[0111] According to some embodiments, the second server determines which module(s) need to be upgraded based on the version information of the module corresponding to the latest version number and the current version information of the module of the Matter device, and then sends an instruction message to the Matter device indicating the module(s) that need to be upgraded. The Matter device requests to download the firmware of the module(s) that need to be upgraded based on the instruction message.
[0112] In some implementations, after determining which modules the Matter device needs upgrading, the second server informs the Matter device of the upgrade firmware download address. The Matter device then downloads the firmware information for the module to be upgraded from this address and completes the upgrade. After the upgrade is complete, the Matter device updates its current version number to the latest version number.
[0113] According to some specific embodiments, if the second server determines that the Matter device has no modules to be upgraded based on the latest version information of the modules and the current version information of the modules of the Matter device, it sends an instruction that no upgrade is required to the Matter device.
[0114] According to the method and system for firmware upgrade of multi-module Matter devices provided in this application, during the upgrade process, the download address OTAUrl provided by the first server does not download the actual firmware, but rather an OTA description file. The latest firmware upgrade version number is obtained by parsing this file. A mapping is established between the Matter device's version number and the version information of the multiple modules within the Matter device, and this mapping is stored on a second server. The Matter device requests the firmware information of the modules requiring upgrade and the download method from the second server using the latest firmware upgrade version number, thereby completing the firmware upgrade of the multi-module Matter device. In this way, firmware upgrades for Matter devices with multiple modules are achieved while adhering to the Matter specification.
[0115] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0116] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0118] See Figure 5 , Figure 5 An electronic device is provided, including a processor and a memory. The memory stores computer instructions, which, when executed by the processor, cause the processor to perform the computer instructions to achieve the following: Figures 2 to 4 The method and its detailed scheme are shown.
[0119] It should be understood that the above-described device embodiments are merely illustrative, and the device disclosed in this invention can be implemented in other ways. For example, the division of units / modules described in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, integrated into another system, or some features may be ignored or not executed.
[0120] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of the present invention can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0121] If the integrated unit / module is implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor or chip can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the on-chip cache, off-chip memory, and storage can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), etc.
[0122] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer electronic device (which may be a personal computer, server, or network electronic device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0123] This application embodiment also provides a non-transitory computer storage medium storing a computer program, which, when executed by multiple processors, causes the processors to perform actions such as... Figures 2 to 4 The method and its detailed scheme are shown.
[0124] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. Furthermore, any changes or modifications made by those skilled in the art based on the ideas of this application, and on the specific implementation methods and application scope of this application, are all within the scope of protection of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0125] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. Furthermore, any changes or modifications made by those skilled in the art based on the ideas of this application, and on the specific implementation methods and application scope of this application, are all within the scope of protection of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for firmware upgrade of a multi-module Matter device, applied to a Matter device, characterized in that, include: The terminal device sends a firmware upgrade request to the first server, the firmware upgrade request including the Matter device identifier and the current version number of the Matter device; The terminal device receives an OTA description file sent by the terminal device. The OTA description file is sent to the Matter device after the terminal device receives the latest version number of the Matter device from the first server and detects that the latest version number is higher than the current version number. The latest version number is updated according to changes in the version information of the modules of the Matter device. The latest version number of the Matter device is updated for any one or more of the addition, deletion, and upgrade of modules of the Matter device. Parse the OTA description file to obtain the latest version number; An upgrade request is sent to the second server according to the latest version number and the Matter device identifier; wherein, the second server stores the mapping relationship between the version number of the Matter device and the version information of multiple modules, as well as the download address of the upgrade firmware for each module; Receive the upgrade firmware download address provided by the second server, download the firmware information of the module to be upgraded, and update the current version number to the latest version number after the firmware upgrade is completed; The step of sending an upgrade request to the second server based on the latest version number and the Matter device identifier includes: sending the latest version number of the Matter device, the Matter device identifier, and the current version information of each module associated with the version number of the Matter device to the second server respectively; so that the second server can determine whether the module needs to be upgraded based on the current version information of each module and the latest version information of the module.
2. A method for firmware upgrade of a multi-module Matter device, applied to a terminal device, characterized in that, include: Receive a request for firmware upgrade information from a Matter device, the request including the Matter device identifier and the current version number of the Matter device; Request the first server to detect the firmware upgrade information corresponding to the Matter device identifier; Receive upgrade address information of the Matter device from the first server; Download the OTA description file based on the address information; The latest version number of the Matter device is obtained according to the OTA description file; wherein, the latest version number is updated according to the changes in the version information of the modules of the Matter device, and the latest version number of the Matter device is updated for any one or more of the addition, deletion and upgrade of modules of the Matter device. After comparing the latest version number with the current version number of the Matter device, it is determined whether the Matter device needs to be upgraded; If it is determined that the Matter device needs to be upgraded, the OTA description file is sent to the Matter device so that the Matter device can obtain firmware upgrade information for multiple modules associated with the Matter device from the second server according to the OTA description file.
3. The method as described in claim 2, characterized in that, The first server is a Matter server, and the second server is a server belonging to the manufacturer of the Matter device.
4. The method as described in claim 3, characterized in that, The method is applied to a second server, which stores a mapping relationship between the version number of the Matter device and the version information of multiple modules, as well as the download address of the upgrade firmware for each module. The method includes: Receive the latest version number and the Matter device identifier from the Matter device; wherein the latest version number is updated according to the changes in the version information of the modules of the Matter device, and the latest version number of the Matter device is updated for any one or more of the addition, deletion and upgrade of modules of the Matter device; Determine the latest version information for each module of the Matter device corresponding to the latest version number; The module to be upgraded for the Matter device is determined based on the latest version information of the module and the current version information of the module corresponding to the Matter device identifier; The firmware upgrade download address of the module to be upgraded is sent to the Matter device so that the Matter device can complete the firmware upgrade.
5. The method as described in claim 4, characterized in that, Sending the upgrade firmware download address of the module to be upgraded to the Matter device includes: Receive the latest version number of the Matter device, the Matter device identifier, and the current version information of any module associated with the version number of the Matter device from the Matter device; The latest version information of the module is found based on the latest version number of the Matter device, the Matter device identifier, and the mapping relationship; Based on the current version information and the latest version information of the module, determine whether a firmware upgrade is needed for the module. If a firmware upgrade is needed, send the upgrade firmware download address of the module to the Matter device, so that the Matter device can download the firmware of the module according to the upgrade firmware download address.
6. The method as described in claim 4 or 5, characterized in that, Also includes: If, based on the latest version information and the current version information of the module, it is determined that the Matter device has no module to be upgraded, an instruction indicating that no upgrade is required is sent to the Matter device.
7. A system for firmware upgrade of a multi-module Matter device, characterized in that, Includes Matter devices, terminal devices, a first server, and a second server, wherein: The Matter device is used to send a request to the terminal device to detect firmware upgrade information. The request includes the Matter device identifier and the current version number of the Matter device. After receiving the request, the terminal device requests the first server to detect the firmware upgrade information corresponding to the Matter device identifier; The first server sends the upgrade address information of the Matter device to the terminal device; The terminal device receives upgrade address information of the Matter device from the first server, downloads an OTA description file based on the upgrade address information, obtains the latest version number corresponding to the Matter device identifier based on the OTA description file, compares the latest version number with the current version number of the Matter device, determines whether the Matter device needs to be upgraded, and if it is determined that the Matter device needs to be upgraded, sends the OTA description file to the Matter device; wherein, the latest version number is updated according to changes in the version information of the modules of the Matter device, and is updated for any one or more of the addition, deletion, and upgrade of modules of the Matter device. The Matter device parses the OTA description file to obtain the latest version number. The second server stores the mapping relationship between the version number of the Matter device and the version information of multiple modules, as well as the download address of the upgrade firmware for each module. Based on the latest version number and the Matter device identifier, an upgrade request is sent to the second server. The second server receives the latest version number and the Matter device identifier from the Matter device, determines the latest version information of the module of the Matter device corresponding to the latest version number, determines the module of the Matter device to be upgraded based on the latest version information of the module and the current version information of the module corresponding to the Matter device identifier, and sends the upgrade firmware download address of the module to be upgraded to the Matter device so that the Matter device can complete the firmware upgrade. The Matter device receives the upgrade firmware download address provided by the second server, downloads the firmware information of the module to be upgraded, and updates the current version number to the latest version number after the firmware upgrade is completed.
8. A computer-readable storage medium, characterized in that, The computer-readable medium stores a computer program. When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Equipment firmware upgrading method and device
CN106557339A
Equipment firmware upgrading method and system
CN110311801A