Protocol adaptation method for smart home system
By collecting and processing firmware information of smart home devices through the controller, and using protocol adaptation strategies and handshake protocols for security verification, a reusable firmware download package is created, which solves the problem of complex and time-consuming firmware updates for smart home devices and achieves efficient and secure firmware updates.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-03-24
AI Technical Summary
In existing technologies, firmware updates for smart home devices are complex and time-consuming, making it difficult to link devices together.
The controller collects firmware information from smart home devices, processes it to obtain target firmware information, and downloads the firmware to be distributed from the cloud platform based on this information for updates. It uses pre-configured protocol adaptation strategies and handshake protocols for security verification, removes duplicate firmware version numbers, and creates a reusable firmware download package for distribution.
It improves the efficiency and security of firmware updates, simplifies the update process, and reduces bandwidth usage and processing time.
Smart Images

Figure CN116866102B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart home technology, and more specifically to a protocol adaptation method for a smart home system. Background Technology
[0002] Smart home (home automation) is a system that uses a residence as a platform to integrate facilities related to home life through comprehensive wiring technology, network communication technology, security technology, automatic control technology, and audio-visual technology. It builds an efficient management system for residential facilities and daily household affairs, improves home security, convenience, comfort, and aesthetics, and achieves an environmentally friendly and energy-saving living environment.
[0003] In existing technologies, with the increasing number of smart home devices, manufacturers typically add relevant adaptation protocols by updating the firmware of deployed smart home devices to achieve interconnectivity between them. For example, Chinese patent CN201911081030.9 discloses a firmware update method for smart home devices. This method involves an initial interaction between a smartphone and the device via near-field communication to bind the user and the device and generate a corresponding authentication code. Subsequently, the smartphone obtains the new firmware and sends it to the device. The device verifies the correctness and legality of the firmware based on the authentication code and then performs firmware flashing.
[0004] However, in actual implementation, the inventors found that as smart home devices continue to expand in home scenarios, the number of firmware updates to be released for compatibility also increases. The aforementioned technical solution, requiring updates to each device individually, results in a relatively complex and time-consuming update process. Summary of the Invention
[0005] To address the aforementioned problems in existing technologies, a protocol adaptation method for smart home systems is provided.
[0006] The specific technical solution is as follows:
[0007] A protocol adaptation method for a smart home system, applicable to a controller connected to multiple smart home devices and a cloud platform, for controlling the smart home devices, the protocol adaptation method comprising:
[0008] Step S1: After receiving the adaptation instruction sent by the cloud platform, collect firmware information from the smart home device;
[0009] Step S2: Process the firmware information and the adaptation instructions to obtain the target firmware information of the firmware to be delivered;
[0010] Step S3: Download the firmware to be distributed from the cloud platform according to the target firmware information, and update the smart home device based on the firmware to be distributed.
[0011] On the other hand, step S1 includes:
[0012] Step S11: Receive the adaptation instruction and determine the smart home device to be adapted according to the adaptation instruction;
[0013] Step S12: Interact with each of the smart home devices to collect the firmware information.
[0014] On the other hand, before performing step S11, the following is also included:
[0015] Step A11: The controller is pre-configured with a protocol adaptation policy corresponding to the smart home device, and the controller sends an adaptation request to the cloud platform in accordance with the protocol adaptation policy;
[0016] Step A12: The cloud platform sends the adaptation instruction according to the adaptation request.
[0017] On the other hand, step S11 includes:
[0018] Step S111: Before receiving the adaptation instruction, verify the cloud platform in advance according to the handshake protocol;
[0019] Step S112: After the verification is successful, receive the adaptation instruction;
[0020] Step S113: Extract the transmission key from the adaptation instruction;
[0021] In step S3, the firmware to be sent is an encrypted file, and the controller decrypts the encrypted file based on the transmission key.
[0022] On the other hand, step S2 includes:
[0023] Step S21: Extract the current firmware version number of the smart home device according to the firmware information, and extract the target firmware version number corresponding to the firmware to be distributed from the adaptation instruction.
[0024] Step S22: Compare the current firmware version number with the target firmware version number to obtain the firmware version number to be downloaded;
[0025] Step S23: Generate the target firmware information based on the firmware version number to be downloaded.
[0026] On the other hand, step S23 includes: comparing the firmware version number to be downloaded to remove duplicate firmware version numbers to be downloaded, and adding the filtered firmware version number to be downloaded to the target firmware information.
[0027] On the other hand, step S3 includes:
[0028] Step S31: Determine multiple firmware files to be distributed in the cloud platform according to the target firmware information;
[0029] Step S32: Compare and filter all the firmware to be distributed to obtain reusable parts, so as to create a firmware download package to be distributed;
[0030] Step S33: Obtain the firmware download package to be distributed, and generate the firmware to be distributed based on the firmware download package to be distributed;
[0031] Step S34: Update the smart home device according to the firmware to be issued.
[0032] On the other hand, step S32 includes:
[0033] Step S321: Parse the firmware to be distributed to obtain multiple firmware segments;
[0034] Step S322: Filter the firmware segments according to the segment attribute information of the firmware segments to obtain the reused part;
[0035] Step S323: Remove the reused portion from all the firmware to be sent to obtain multiple deduplicated firmware;
[0036] Step S324: Add the reused portion and the deduplicated firmware to the firmware download package to be distributed in sequence;
[0037] In step S33, after obtaining the firmware download package to be distributed, the reused part and the deduplicated firmware are reassembled to obtain the firmware to be distributed.
[0038] The above technical solution has the following advantages or beneficial effects:
[0039] To address the complexity of existing protocol adaptation methods, this solution uses a local controller to collect, aggregate, and process firmware information from smart home devices to obtain multiple sets of firmware information that actually need to be downloaded. Based on this firmware information, the firmware to be downloaded is obtained and then distributed to the corresponding smart home devices, effectively improving processing efficiency. Attached Figure Description
[0040] Embodiments of the invention will be described more fully with reference to the accompanying drawings. However, the drawings are for illustration and explanation only and do not constitute a limitation on the scope of the invention.
[0041] Figure 1 This is an overall schematic diagram of an embodiment of the present invention;
[0042] Figure 2 This is a schematic diagram of sub-step S1 in an embodiment of the present invention;
[0043] Figure 3 This is a schematic diagram of the update strategy in an embodiment of the present invention;
[0044] Figure 4 This is a schematic diagram of sub-step S11 in an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of sub-step S2 in an embodiment of the present invention;
[0046] Figure 6 This is a schematic diagram of sub-step S3 in an embodiment of the present invention;
[0047] Figure 7 This is a schematic diagram of sub-step S32 in an embodiment of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0050] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0051] This invention includes:
[0052] A protocol adaptation method for a smart home system, applicable to a controller that connects to multiple smart home devices and a cloud platform, for controlling the smart home devices, such as... Figure 1 As shown, the protocol adaptation methods include:
[0053] Step S1: After receiving the adaptation instruction sent by the cloud platform, collect firmware information from the smart home device;
[0054] Step S2: Process the firmware information and adaptation instructions to obtain the target firmware information to be distributed;
[0055] Step S3: Download the firmware to be distributed from the cloud platform according to the target firmware information, and update the smart home devices based on the firmware to be distributed.
[0056] Specifically, addressing the issue of the relatively complex update methods in existing technologies, in this embodiment, upon receiving the adaptation command from the cloud platform, the controller collects firmware information of the currently installed firmware on the smart home device. Based on this firmware information, it performs discrimination and processing to obtain the target firmware information to be adapted. That is, the firmware version number of the firmware to be distributed to the smart home device, the current adaptation protocol, and other information. Then, the corresponding firmware to be distributed is downloaded and sent to the smart home device. The smart home device then flashes the new firmware to obtain the new adaptation protocol, thus achieving compatibility with other devices.
[0057] In one embodiment, such as Figure 2 As shown, step S1 includes:
[0058] Step S11: Receive the adaptation instruction and determine the smart home device to be adapted according to the adaptation instruction;
[0059] Step S12: Interact with each smart home device individually to collect firmware information.
[0060] Specifically, to achieve faster processing efficiency, in this embodiment, upon receiving the adaptation instruction, the smart home device to be adapted is determined according to the adaptation instruction; subsequently, the controller interacts with each smart home device to collect the firmware information of the currently installed firmware, thus achieving a better firmware information collection process.
[0061] In order to achieve better collection results during the implementation process, in step S12, during the interaction with smart home devices, the current working status of each smart home device is also collected; when a smart home device is in a continuous working state, the extraction of its firmware information is paused and retained until the next update process, which improves processing efficiency.
[0062] In one embodiment, such as Figure 3 As shown, the procedure before performing step S11 also includes:
[0063] Step A11: The controller is pre-configured with a protocol adaptation policy corresponding to smart home devices. The controller sends an adaptation request to the cloud platform in accordance with the protocol adaptation policy.
[0064] Step A12: The cloud platform sends an adaptation command according to the adaptation request.
[0065] Specifically, to achieve a more flexible update process, in this embodiment, the user pre-configures the protocol adaptation strategy for each smart home device in the controller. The protocol adaptation strategy has different triggering rules, such as periodic, functional abnormality, new device joining the network, etc. When the corresponding rule is triggered, the controller sends an adaptation request to the cloud platform according to the protocol adaptation strategy, so that the cloud platform issues an adaptation command, realizing the firmware update process.
[0066] In one embodiment, such as Figure 4 As shown, step S11 includes:
[0067] Step S111: Before receiving the adaptation instruction, verify the cloud platform in advance according to the handshake protocol;
[0068] Step S112: After the verification is successful, receive the adaptation command;
[0069] Step S113: Extract the transmission key from the adaptation instructions;
[0070] In step S3, the firmware to be sent is an encrypted file, and the controller decrypts the encrypted file based on the transmission key.
[0071] Specifically, to achieve better security, in this embodiment, a handshake protocol is pre-configured in the controller before shipment. This handshake protocol includes a public key and verification process that can be used to verify with the cloud platform. Before receiving adaptation instructions, the controller interacts with the cloud platform for verification according to the handshake protocol. This includes determining whether the interaction process of the cloud platform is correct and whether the private key sent by the cloud platform corresponding to this verification process can be correctly decrypted by the public key. Only after the interaction verification is successful is the transmission key subsequently sent by the cloud platform extracted from the adaptation instructions. Based on this transmission key, the subsequently received firmware to be delivered is decrypted, thus improving the security of protocol adaptation.
[0072] In one embodiment, such as Figure 5 As shown, step S2 includes:
[0073] Step S21: Extract the current firmware version number of the smart home device based on the firmware information, and extract the target firmware version number corresponding to the firmware to be distributed from the self-adaptation instruction.
[0074] Step S22: Compare the current firmware version number with the target firmware version number to obtain the firmware version number to be downloaded;
[0075] Step S23: Generate target firmware information based on the firmware version number to be downloaded.
[0076] In one embodiment, step S23 includes: comparing the firmware version numbers to be downloaded to remove duplicate firmware version numbers to be downloaded, and adding the filtered firmware version numbers to be downloaded to the target firmware information.
[0077] Specifically, to achieve better update results, in this embodiment, after obtaining the firmware information, multiple sets of current firmware version numbers are extracted from the firmware information, and the corresponding target firmware version number is obtained from the adaptation instructions. These two can be compared to obtain the firmware version number to be downloaded. Depending on the product type, the target firmware version number may include only one target firmware or a list of multiple firmwares that need to be updated sequentially. This step can determine the version number of any firmware to be distributed. Subsequently, the downloaded firmware version numbers obtained through comparison are deduplicated to finally obtain the target firmware information.
[0078] In one embodiment, such as Figure 6 As shown, step S3 includes:
[0079] Step S31: Based on the target firmware information, determine multiple firmware files to be distributed in the cloud platform;
[0080] Step S32: Compare and filter all the firmware to be distributed to obtain the reusable parts, so as to create the firmware download package to be distributed;
[0081] Step S33: Obtain the firmware download package to be distributed, and generate the firmware to be distributed based on the firmware download package;
[0082] Step S34: Update the smart home devices according to the firmware to be released.
[0083] Specifically, addressing the issue that existing firmware update processes require separate firmware downloads and updates, consuming significant bandwidth and time, this embodiment addresses this problem by searching all firmware files in the cloud platform after identifying the target firmware information, thus determining multiple firmware files to be distributed. Subsequently, the firmware files are parsed, and reusable portions are extracted. For example, front-end pages, components, frameworks, and the parts establishing network connections with the controller can typically be reused across multiple smart home devices. These overlapping portions are extracted, and a new firmware download package is then created to reduce file size during download. The controller then restores and updates the package locally, improving download efficiency.
[0084] In one embodiment, such as Figure 7 As shown, step S32 includes:
[0085] Step S321: Parse the firmware to be sent to obtain multiple firmware segments;
[0086] Step S322: Filter the firmware segments according to their segment attribute information to obtain the reusable parts;
[0087] Step S323: Remove the reused parts from all the firmware to be sent, and obtain multiple deduplicated firmware;
[0088] Step S324: Add the reused portion and the deduplicated firmware to the firmware download package to be distributed in sequence;
[0089] In step S33, after obtaining the firmware download package to be distributed, the reused part and the deduplicated firmware are reassembled to obtain the firmware to be distributed.
[0090] Specifically, to improve download efficiency, in this embodiment, the firmware to be downloaded is parsed according to the partition to be flashed to obtain multiple firmware segments. Then, based on the segment attribute information of each firmware segment, the purpose of the firmware segment can be determined, and a reusable part can be selected. This reusable part can be extracted to obtain deduplicated firmware, and then assembled into the firmware download package to be downloaded, reducing the amount of data that needs to be transmitted.
[0091] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A protocol adaptation method for a smart home system, applicable to a controller, wherein the controller is connected to multiple smart home devices and a cloud platform for controlling the smart home devices, characterized in that... The protocol adaptation method includes: Step S1: After receiving the adaptation instruction sent by the cloud platform, collect firmware information from the smart home device; Step S2: Process the firmware information and the adaptation instructions to obtain the target firmware information of the firmware to be delivered; Step S3: Download the firmware to be distributed from the cloud platform according to the target firmware information, and update the smart home device based on the firmware to be distributed; Step S3 includes: Step S31: Determine multiple firmware files to be distributed in the cloud platform according to the target firmware information; Step S32: Compare and filter all the firmware to be distributed to obtain reusable parts, so as to create a firmware download package to be distributed; Step S33: Obtain the firmware download package to be distributed, and generate the firmware to be distributed based on the firmware download package to be distributed; Step S34: Update the smart home device according to the firmware to be issued; Step S32 includes: Step S321: Parse the firmware to be distributed to obtain multiple firmware segments; Step S322: Filter the firmware segments according to the segment attribute information of the firmware segments to obtain the reused part; Step S323: Remove the reused portion from all the firmware to be sent to obtain multiple deduplicated firmware; Step S324: Add the reused portion and the deduplicated firmware to the firmware download package to be distributed in sequence; In step S33, after obtaining the firmware download package to be distributed, the reused part and the deduplicated firmware are reassembled to obtain the firmware to be distributed.
2. The protocol adaptation method according to claim 1, characterized in that, Step S1 includes: Step S11: Receive the adaptation instruction and determine the smart home device to be adapted according to the adaptation instruction; Step S12: Interact with each of the smart home devices to collect the firmware information.
3. The protocol adaptation method according to claim 2, characterized in that, The procedure before performing step S11 also includes: Step A11: The controller is pre-configured with a protocol adaptation policy corresponding to the smart home device, and the controller sends an adaptation request to the cloud platform in accordance with the protocol adaptation policy; Step A12: The cloud platform sends the adaptation instruction according to the adaptation request.
4. The protocol adaptation method according to claim 2, characterized in that, Step S11 includes: Step S111: Before receiving the adaptation instruction, verify the cloud platform in advance according to the handshake protocol; Step S112: After the verification is successful, receive the adaptation instruction; Step S113: Extract the transmission key from the adaptation instruction; In step S3, the firmware to be sent is an encrypted file, and the controller decrypts the encrypted file based on the transmission key.
5. The protocol adaptation method according to claim 1, characterized in that, Step S2 includes: Step S21: Extract the current firmware version number of the smart home device according to the firmware information, and extract the target firmware version number corresponding to the firmware to be distributed from the adaptation instruction. Step S22: Compare the current firmware version number with the target firmware version number to obtain the firmware version number to be downloaded; Step S23: Generate the target firmware information based on the firmware version number to be downloaded.
6. The protocol adaptation method according to claim 5, characterized in that, Step S23 includes: comparing the firmware version numbers to be downloaded to remove duplicate firmware version numbers to be downloaded, and adding the filtered firmware version numbers to be downloaded to the target firmware information.
Citation Information
Patent Citations
Firmware updating method of smart home equipment
CN110851161A
Data safety protection method, intelligent device, server and readable storage medium
CN109286599A
Firmware upgrading method, device, medium and smart home system
CN109522036A
Updating method and device of intelligent equipment, electronic equipment and storage medium
CN110727454A
Firmware differentiation hot upgrade method
CN115509591A