Internet of Things sub-device access method and device, gateway device and storage medium

By implementing hot updates in the gateway protocol resolver, the problem of redeveloping code and iteration of the entire machine version in the existing technology is solved, and the efficiency and flexibility of product function iteration is improved.

CN120186022APending Publication Date: 2025-06-20QINGDAO HAIER INTELLIGENT HOME APPLIANCE TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510394639.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

When the existing technology connects to a new model of zigbee device, it is necessary to redevelop the code and iterate the entire machine version, resulting in a decrease in the product function iteration efficiency and it is difficult to meet the requirements of rapid iteration.

Method used

Send firmware download requests to the IoT cloud platform through the gateway protocol parser, receive and save the firmware download response, dynamically load the new version of the gateway protocol parser, and update the sub-device model information based on the sub-device model information file, thereby realizing the hot update of the gateway protocol parser.

Benefits of technology

It realizes dynamic loading or hot updates to complete the access of new IoT sub-device without restarting the device or application, avoids the iteration of the entire machine version, shortens the equipment upgrade and configuration time of operation and maintenance personnel, and improves the efficiency of product function iteration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186022A_ABST
    Figure CN120186022A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart home, and discloses an access method of an Internet of Things sub-device, a gateway device comprises a gateway protocol parser, the gateway protocol parser is connected with an Internet of Things cloud platform and is applied to the gateway protocol parser, and the method comprises the following steps: sending a firmware downloading request to the Internet of Things cloud platform to request to download a protocol data packet, the protocol data packet comprises a gateway protocol analyzer of a new version and a sub-device model information file supported by the gateway protocol analyzer; receiving and storing a firmware downloading response sent by the Internet of Things platform, wherein the firmware downloading response comprises a protocol data packet; and dynamically loading the gateway protocol parser based on the gateway protocol parser of the new version, and updating the sub-device model information according to the sub-device model information file so as to realize hot update of the gateway protocol parser. The method can improve the efficiency of product function iteration. The invention further discloses an access device of the Internet of Things sub-equipment, gateway equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart homes. Specifically, it relates to a method and device for accessing Internet of Things sub-devices, a gateway device, and a storage medium. Background Art

[0002] Currently, with the rapid development of science and technology, the degree of intelligence of home appliances is increasing day by day. Different types of whole-house intelligent control sub-devices have emerged accordingly. Correspondingly, there are more and more gateway devices and intelligent control brain screens for managing different types of whole-house intelligent control sub-devices.

[0003] To realize the access management of gateway devices and intelligent control brain screens to whole-house intelligent control sub-devices, related technologies usually develop device access codes separately in terms of projects or products.

[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in related technologies:

[0005] Currently, as long as a new model of zigbee device is accessed, regardless of whether the device model of this model is the same as that of a device already connected to the network, it is necessary to re-develop the code and perform a version iteration for the entire machine. In this way, the efficiency of product function iteration is reduced, and it is difficult to meet the requirements of rapid product function iteration.

[0006] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present application. Therefore, it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0007] To have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important constituent elements or delineate the protection scope of these embodiments. Instead, it serves as a preface to the subsequent detailed description.

[0008] The embodiments of the present disclosure provide a method and device for accessing Internet of Things sub-devices, a gateway device, and a storage medium to improve the efficiency of product function iteration and achieve rapid iteration of product functions.

[0009] In some embodiments, the gateway device includes a gateway protocol parser, which is connected to the Internet of Things cloud platform. Applied to the gateway protocol parser, the method includes: sending a firmware download request to the Internet of Things cloud platform to request the download of protocol data packets, where the protocol data packets include a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser; receiving and saving the firmware download response sent by the Internet of Things platform, where the firmware download response includes the protocol data packets; dynamically loading the gateway protocol parser based on the new version of the gateway protocol parser and updating the sub-device model information according to the sub-device model information file to implement the hot update of the gateway protocol parser.

[0010] In some embodiments, it further includes: before sending a firmware download request to the Internet of Things cloud platform to request the download of protocol data packets, sending a firmware query request to the Internet of Things cloud platform to request to query whether the stored protocol data packets include a new version of the gateway protocol parser; receiving the firmware query response sent by the Internet of Things cloud platform, where the firmware query response includes the current version information of the stored protocol data packets; and constructing a firmware download request when the current version information indicates that the stored protocol data packets include a new version of the gateway protocol parser.

[0011] In some embodiments, the gateway device further includes a gateway main service and a gateway host. The gateway main service is respectively connected to the gateway protocol parser and the gateway host. It further includes: after the hot update of the gateway protocol parser is successful, receiving a model list query request sent by the gateway main service, and converting the updated sub-device model information into model list protocol data; sending the model list protocol data to the gateway main service, so that the gateway main service determines whether the sub-device list of the gateway host matches the sub-device list corresponding to the model list protocol data; receiving the sub-device model configuration information sent by the gateway main service and converting it into configuration list protocol data, where the sub-device model configuration information is parsed from the model list protocol data after the gateway main service determines that the sub-device list of the gateway host does not match the sub-device list corresponding to the model list protocol data; and sending the configuration list protocol data to the gateway main service to synchronize the sub-device model information between the gateway protocol parser and the gateway host.

[0012] In some embodiments, the gateway device includes a gateway main service, a gateway protocol parser, and a gateway host. The gateway main service is respectively connected to the gateway protocol parser and the gateway host. The gateway protocol parser is connected to the Internet of Things cloud platform. When applied to the gateway main service, the method includes: when it is determined that the hot update of the gateway protocol parser is successful, sending a model list query request to the gateway protocol parser; receiving the model list protocol data sent by the gateway protocol parser; when it is determined that the gateway host does not fully support the sub-device list corresponding to the model list protocol data, obtaining sub-device model configuration information based on the model list protocol data; and sending the sub-device model configuration information to the gateway host to synchronize the sub-device model information between the gateway protocol parser and the gateway host.

[0013] In some embodiments, the gateway device includes a gateway protocol parser. The gateway protocol parser is connected to the Internet of Things cloud platform. When applied to the Internet of Things cloud platform, the method includes: receiving a firmware download request sent by the gateway protocol parser, where the firmware download request is used to request to download a protocol data packet, and the protocol data packet includes a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser; sending a firmware download response to the gateway protocol parser so that the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file, and the firmware download response includes the protocol data packet.

[0014] In some embodiments, it further includes: before receiving the firmware download request sent by the gateway protocol parser, receiving a firmware query request sent by the gateway protocol parser, where the firmware query request is used to request to query whether the stored protocol data packet includes a new version of the gateway protocol parser; sending a firmware query response to the gateway protocol parser, and the firmware query response includes the current version information of the stored protocol data packet, so that the gateway protocol parser determines to construct a firmware download request when the stored protocol data packet is a new version data packet.

[0015] In some embodiments, the protocol data packet is obtained in the following manner: obtaining the protocol data packet from the gateway protocol parser code repository, where the protocol data packet is generated by developers developing functional code based on product requirements and using a pipeline; copying the protocol data packet from the gateway protocol parser code repository to the platform local storage.

[0016] In some embodiments, the gateway device includes a gateway main service and a gateway host side. When applied to the gateway host side, the method includes: receiving a configuration query request sent by the gateway main service; determining whether the gateway host side fully supports the sub-device list corresponding to the model list protocol data, and generating a configuration query response based on the determination result; sending the configuration query response to the gateway main service; receiving the sub-device model configuration information sent by the gateway main service, where the sub-device model configuration information is obtained by the gateway main service based on the model list protocol data when the configuration query response indicates incomplete support.

[0017] In some embodiments, the gateway device includes: a gateway protocol parser connected to the Internet of Things cloud platform and executing the access method for Internet of Things sub-devices as described above; a gateway main service connected to the gateway protocol parser and executing the access method for Internet of Things sub-devices as described above; and a gateway host side connected to the gateway main service and executing the access method for Internet of Things sub-devices as described above.

[0018] In some embodiments, the access device includes a processor and a memory storing program instructions, wherein the processor is configured to execute the access method for Internet of Things sub-devices as described above when running the program instructions, or execute the access method for Internet of Things sub-devices as described above.

[0019] In some embodiments, for the computer-readable storage medium, the computer-readable storage medium includes a stored program, wherein the program executes the access method for Internet of Things sub-devices as described above when running.

[0020] The access method and device for Internet of Things sub-devices, gateway device, and storage medium provided by the embodiments of the present disclosure can achieve the following technical effects:

[0021] After the gateway protocol parser provided by the embodiments of the present disclosure sends a firmware download request to the Internet of Things platform to request the download of protocol data packets, it receives and saves the firmware download response sent by the Internet of Things platform. The gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file carried in the protocol data packets, thereby realizing the hot update of the gateway protocol parser. When there is a new model of Internet of Things sub-devices with a need to access the network, the embodiments of the present disclosure allow the gateway device to dynamically load or perform a hot update according to the device access requirements without restarting the device or the application program to complete the access of the new model of Internet of Things sub-devices, without the need for a full machine version iteration, and shortening the time for maintenance personnel to perform device upgrades and related configurations, improving the efficiency of product function iteration.

[0022] The above general description and the following description are only exemplary and explanatory, and are not used to limit this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.

[0024] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0025] Figure 1 is an environmental schematic diagram of an access system for an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0026] Figure 2 is a schematic diagram of a method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0027] Figure 3 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0028] Figure 4 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0029] Figure 5 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0030] Figure 6 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0031] Figure 7 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0032] Figure 8 is a schematic diagram of another method for accessing an Internet of Things sub-device provided by an embodiment of the present disclosure;

[0033] Figure 9 is an application schematic diagram of an embodiment of the present disclosure;

[0034] Figure 10 is a schematic diagram of an access device for an Internet of Things sub-device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the protection scope of this application.

[0036] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0037] According to one aspect of the embodiments of this application, a method for accessing an Internet of Things sub-device is provided. This method for accessing an Internet of Things sub-device is widely applied to whole-house intelligent digital control application scenarios such as Smart Home, intelligent home, intelligent home appliance ecosystem, and Intelligence House ecosystem. Optionally, in this embodiment, the above-mentioned method for accessing an Internet of Things sub-device can be applied to, for example, Figure 1 the hardware environment composed of a gateway device 10 and an Internet of Things cloud platform 20 as shown. As Figure 1As shown, the gateway device 10 is connected to the Internet of Things cloud platform 20. The above network may include, but is not limited to, at least one of the following: wired network, wireless network. The above wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The above wireless network may include, but is not limited to, at least one of the following: WiFi (Wireless Fidelity), Bluetooth. The gateway device 10 is not limited to a network interconnection device that realizes network interconnection at the network layer or a brain screen with a central control function and a configured control screen. The Internet of Things sub-devices include, but are not limited to, smart air conditioners, smart range hoods, smart refrigerators, smart ovens, smart stoves, smart washing machines, smart water heaters, smart washing equipment, smart dishwashers, smart projection devices, smart TVs, smart drying racks, smart curtains, smart audio and video, smart sockets, smart speakers, smart sound boxes, smart fresh air devices, smart kitchen and bathroom appliances, smart bathroom appliances, smart floor sweeping robots, smart window cleaning robots, smart mopping robots, smart air purification devices, smart steamers, smart microwaves, smart kitchen water heaters, smart purifiers, smart water dispensers, smart door locks, etc.

[0038] Combined with Figure 1 As shown, the access system of the Internet of Things sub-devices includes the Internet of Things platform 20, the gateway device 10, and the ncp (Network Coordinator Processor) module 30.

[0039] The gateway device 10 includes a gateway protocol parser 101, a gateway main service 102, and a gateway host 103. The gateway protocol parser 101 is connected to the Internet of Things cloud platform 20. The gateway main service 102 is respectively connected to the gateway protocol parser 101 and the gateway host 103. The gateway main service 102 is connected to the ncp module Host application layer 30.

[0040] Among them, the ncp module Host application layer 30 is used to process tasks at the network layer and application layer, and realize the network access of the Internet of Things sub-devices.

[0041] The gateway protocol parser 101 is a software development kit, which has the ability to manage Internet of Things devices. Among them, the gateway protocol parser 101 is configured with a dynamic library.

[0042] The gateway main service 102 represents the service of the core functions running in the gateway device, which has the ability to process key business logics. The gateway main service 102 also has the capabilities of data storage, communication, and communication with other components.

[0043] The gateway host side 103 represents a device or software entity that acts as a host or a central node in the network. Among them, the above-mentioned network includes ZigBee, Bluetooth Mesh, or WiFi, or a wired network.

[0044] Based on the software and hardware configuration of the access system for the above-mentioned IoT sub-devices, combined with Figure 2 As shown, an embodiment of the present disclosure provides an access method for IoT sub-devices, including:

[0045] S01, the gateway protocol parser sends a firmware download request to the IoT cloud platform to request the download of protocol data packets, and the protocol data packets include a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser.

[0046] In this step, the sub-device model information file includes a file encapsulated by sub-device model information. As an example, the sub-device model information file includes a sub-device model information list. The sub-device model information list includes a list of IoT sub-device models supported by the gateway protocol parser. Each list of IoT sub-device models includes device information of the IoT sub-device, and the device information includes some or all of the device name, device type, device function attribute template, device model, and device heartbeat reporting period.

[0047] It should be noted that the IoT sub-devices corresponding to the protocol data packets include one or more of the following:

[0048] IoT sub-devices in which templates are already stored in the ncp module Host application layer and the device function attributes are newly added.

[0049] IoT sub-devices in which templates are already stored in the ncp module Host application layer and the device models are updated.

[0050] IoT sub-devices in which templates are not stored in the ncp module Host application layer and the device information is newly added.

[0051] S02, the gateway protocol parser receives the firmware download response sent by the IoT platform and saves it. The firmware download response includes protocol data packets.

[0052] S03, the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file to achieve the hot update of the gateway protocol parser.

[0053] In this step, dynamically loading the gateway protocol parser based on the new version of the gateway protocol parser includes: dynamically loading the dynamic library of the gateway protocol parser based on the new version of the gateway protocol parser.

[0054] By adopting the access method of the Internet of Things sub-devices provided by the embodiments of the present disclosure, after the gateway protocol parser provided by the embodiments of the present disclosure sends a firmware download request to the Internet of Things platform to request the download of protocol data packets, it receives the firmware download response sent by the Internet of Things platform and saves it. The gateway protocol parser is dynamically loaded based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file carried in the protocol data packet, thereby realizing the hot update of the gateway protocol parser. When there is a need for a new model of Internet of Things sub-device to access the network, the embodiments of the present disclosure allow the gateway device to dynamically load or hot update according to the device access requirements without restarting the device or application, so as to complete the access of the new model of Internet of Things sub-device, without the need for a whole-machine version iteration, and shorten the time for operation and maintenance personnel to perform device upgrades and related configurations, improving the efficiency of product function iteration.

[0055] In addition, the gateway protocol parser provided by the embodiments of the present disclosure can reduce code branches, improve the maintainability and scalability of the code through componentization, serviceization and dynamic update mechanisms. At the same time, the embodiments of the present disclosure provide a unified Internet of Things sub-device access framework, enabling the same Internet of Things sub-device to access different platforms and realizing the fast access of Internet of Things sub-devices.

[0056] Optionally, the new version of the gateway protocol parser is developed in C language. In this way, it can support both Linux gateway devices and Android control panels, RTOS (Real Time Operate System) gateway devices at the same time. It has high portability and wide function coverage, high code execution efficiency, little impact on the performance of different platform systems, and is loaded and hot updated in the form of dynamic libraries on the Android platform and the Linux platform to achieve seamless update without downtime. In addition, by developing and writing in C language, cross-platform development can be realized, the device access framework can be unified, and the serviceization and componentization of the device protocol transfer and reuse module can be realized.

[0057] It should be noted that when the gateway device is configured with a Linux platform, the gateway main service is the jni-mpr-service service. In addition, the access method of the Internet of Things sub-devices provided by this application can be extended to wireless networks such as Bluetooth mesh and WiFi, or extended to wired networks such as 485.

[0058] Combined with Figure 3 shown, the embodiments of the present disclosure also provide an access method for Internet of Things sub-devices, including:

[0059] S11, the gateway protocol parser sends a firmware query request to the Internet of Things cloud platform to request to query whether the stored protocol data packet includes a new version of the gateway protocol parser.

[0060] In this step, the gateway protocol parser sends a firmware query request to the Internet of Things cloud platform to request a query on whether the stored protocol data packet includes a new version of the gateway protocol parser, including: the gateway protocol parser periodically sends a firmware query request to the Internet of Things cloud platform. Among them, the period for sending the firmware query request can be set according to specific requirements. As an example, the period for sending the firmware query request is N * 24h, where N is a positive integer and h represents hours. It can be understood that the period for sending the firmware query request can also be other values.

[0061] S12. The gateway protocol parser receives the firmware query response sent by the Internet of Things cloud platform, and the firmware query response includes the current version information of the stored protocol data packet.

[0062] S13. In the case where the current version information indicates that the stored protocol data packet includes a new version of the gateway protocol parser, the gateway protocol parser constructs a firmware download request.

[0063] S14. The gateway protocol parser sends a firmware download request to the Internet of Things cloud platform to request the download of the protocol data packet, and the protocol data packet includes a new version of the gateway protocol parser and the sub-device model information file supported by the gateway protocol parser.

[0064] S15. The gateway protocol parser receives and saves the firmware download response sent by the Internet of Things platform, and the firmware download response includes the protocol data packet.

[0065] S16. The gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file to achieve the hot update of the gateway protocol parser.

[0066] Using the access method for IoT sub-devices provided by the embodiments of the present disclosure, before the gateway protocol parser provided by the embodiments of the present disclosure sends a firmware download request to the IoT cloud platform, it first sends a firmware query request to the IoT cloud platform to request to query whether the protocol data packets stored on the platform side include a new version of the gateway protocol parser, and then receives the firmware query response sent by the IoT cloud platform. When the current version information indicates that the protocol data packets stored on the platform side include a new version of the gateway protocol parser, the gateway protocol parser constructs a firmware download request and sends it to the IoT cloud platform to download the protocol data packets, receives and saves the firmware download response, and then dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and performs a hot update of the gateway protocol parser. The gateway protocol parser provided by the embodiments of the present disclosure, through information interaction with the IoT cloud platform, can real-time learn about the version update situation of the gateway protocol parser on the platform side, and after determining that there is a version update, obtains the protocol data packets including the new version of the gateway protocol parser and the sub-device model information file supported by it, so as to perform local dynamic loading and hot update based on the protocol data packets. In this way, the embodiments of the present disclosure allow the gateway device to dynamically load or perform a hot update according to the device access requirements without restarting the device or the application program, without the need for a whole machine version iteration, and shorten the time for maintenance personnel to perform device upgrades and related configurations, improving the efficiency of product function iteration.

[0067] It should be noted that in the case where the current version information indicates that the stored protocol data packets do not include a new version of the gateway protocol parser, the gateway protocol parser does not perform any operations.

[0068] Combined with Figure 4 As shown, the embodiments of the present disclosure also provide an access method for IoT sub-devices, including:

[0069] S21, the gateway protocol parser sends a firmware download request to the IoT cloud platform to request to download the protocol data packets, and the protocol data packets include a new version of the gateway protocol parser and the sub-device model information file supported by the gateway protocol parser.

[0070] S22, the gateway protocol parser receives and saves the firmware download response sent by the IoT platform, and the firmware download response includes the protocol data packets.

[0071] S23, the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file to implement a hot update of the gateway protocol parser.

[0072] S24, after the hot update of the gateway protocol parser is successful, the gateway protocol parser receives the model list query request sent by the gateway main service and converts the updated sub-device model information into model list protocol data.

[0073] In this step, after the gateway protocol parser is successfully hot-updated, it further includes: the gateway protocol parser receives an initialization instruction sent by the gateway main service, and performs an initialization operation based on the initialization instruction, so that after the initialization operation of the gateway protocol parser is completed, it receives a model list query request sent by the gateway main service.

[0074] S25. The gateway protocol parser sends model list protocol data to the gateway main service, so that the gateway main service determines whether the sub-device list of the gateway host terminal matches the sub-device list corresponding to the model list protocol data.

[0075] S26. The gateway protocol parser receives the sub-device model configuration information sent by the gateway main service and converts it into configuration list protocol data. The sub-device model configuration information is parsed from the model list protocol data after the gateway main service determines that the sub-device list of the gateway host terminal does not match the sub-device list corresponding to the model list protocol data.

[0076] S27. The gateway protocol parser sends the configuration list protocol data to the gateway main service to synchronize the sub-device model information between the gateway protocol parser and the gateway host terminal.

[0077] Using the access method for IoT sub-devices provided by the embodiments of the present disclosure, after the gateway protocol parser provided by the embodiments of the present disclosure sends a firmware download request to the IoT platform to request the download of protocol data packets, it receives the firmware download response sent by the IoT platform and saves it. The gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file carried in the protocol data packet, thereby realizing the hot update of the gateway protocol parser.

[0078] Since the device models or functions supported by different gateway protocol parsers configured for the same gateway device may be different, after the hot update is completed, the gateway protocol parser and the gateway host terminal need to perform a sub-device model information synchronization operation. Specifically, after the gateway protocol parser is successfully hot-updated, it first receives a model list query request sent by the gateway main service, converts the updated sub-device model information into model list protocol data, and then sends it to the gateway main service to enable it to determine whether the sub-device list of the gateway host terminal matches the sub-device list corresponding to the model list protocol data. After the gateway protocol parser receives the sub-device model configuration information sent by the gateway main service and converts it into configuration list protocol data, it sends the configuration list protocol data to the gateway main service, thereby realizing the synchronization of the sub-device model information between the gateway protocol parser and the gateway host terminal under the coordination of the gateway main service.

[0079] Combined with Figure 5 As shown, the embodiments of the present disclosure also provide an access method for IoT sub-devices, including:

[0080] S31. When the gateway main service determines that the hot update of the gateway protocol parser is successful, it sends a model list query request to the gateway protocol parser.

[0081] S32. The gateway main service receives the model list protocol data sent by the gateway protocol parser. Among them, the model list protocol data is generated by the gateway protocol parser through conversion of the updated sub-device model information.

[0082] S33. When the gateway main service determines that the gateway host side does not fully support the sub-device list corresponding to the model list protocol data, it obtains the sub-device model configuration information based on the model list protocol data.

[0083] S34. The gateway main service distributes the sub-device model configuration information to the gateway host side to synchronize the sub-device model information between the gateway protocol parser and the gateway host side.

[0084] Using the access method for IoT sub-devices provided in the embodiments of the present disclosure, since the device models or device functions supported by different gateway protocol parsers configured for the same gateway device may be different, after the hot update, the gateway protocol parser and the gateway host side need to perform a sub-device model information synchronization operation. When the gateway main service determines that the hot update of the gateway protocol parser is successful, it sends a model list query request to it and receives the model list protocol data sent by the gateway protocol parser. When it is determined that the gateway host side does not fully support the sub-device list corresponding to the model list protocol data, the sub-device model configuration information is obtained based on the model list protocol data and distributed to the gateway host side to realize the synchronization of the sub-device model information between the gateway protocol parser and the gateway host side.

[0085] Optionally, the gateway main service determines that the gateway host side does not fully support the sub-device list corresponding to the model list protocol data, including:

[0086] The gateway main service sends a configuration query request to the gateway host side to enable the gateway host side to determine whether the gateway host side fully supports the sub-device list corresponding to the model list protocol data. The configuration query request includes the model list protocol data.

[0087] The gateway main service receives the configuration query response sent by the gateway host side.

[0088] In the case where the configuration query response indicates incomplete support, the gateway main service determines that the gateway host side does not fully support the sub-device list corresponding to the model list protocol data.

[0089] In a specific embodiment, the gateway host side determines whether the gateway host side fully supports the sub-device list corresponding to the model list protocol data, including:

[0090] When the gateway host determines that the sub-device list corresponding to the protocol data of the gateway host sub-device list and the model list is the same, it determines full support; or,

[0091] When the gateway host determines that the sub-device list corresponding to the protocol data of the gateway host sub-device list and the model list is different, it determines that it does not fully support.

[0092] Combined with Figure 6 As shown, the embodiments of the present disclosure also provide an access method for Internet of Things sub-devices, including:

[0093] S41, the Internet of Things cloud platform receives a firmware download request sent by the gateway protocol parser. The firmware download request is used to request the download of a protocol data packet, and the protocol data packet includes a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser.

[0094] S42, the Internet of Things cloud platform sends a firmware download response to the gateway protocol parser so that the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file. The firmware download response includes the protocol data packet.

[0095] By using the access method for Internet of Things sub-devices provided by the embodiments of the present disclosure, the Internet of Things cloud platform provided by the embodiments of the present disclosure receives the firmware download request sent by the gateway protocol parser, and sends a firmware download response to it so that it dynamically loads based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file, realizing the hot update of the gateway protocol parser. When there is a need for a new model of Internet of Things sub-devices to access the network, the embodiments of the present disclosure realize the iteration of the separate version of the new model of Internet of Things sub-devices through the information interaction between the Internet of Things cloud platform and the gateway protocol parser, without relying on the release of the whole machine version, which is beneficial to improving the efficiency of product function iteration and realizing the rapid iteration of product functions.

[0096] Combined with Figure 7 As shown, the embodiments of the present disclosure also provide an access method for Internet of Things sub-devices, including:

[0097] S51, the Internet of Things cloud platform receives a firmware query request sent by the gateway protocol parser. The firmware query request is used to request to query whether the stored protocol data packet includes a new version of the gateway protocol parser.

[0098] S52, the Internet of Things cloud platform sends a firmware query response to the gateway protocol parser. The firmware query response includes the current version information of the stored protocol data packet, so that the gateway protocol parser determines to construct a firmware download request when the stored protocol data packet is a new version data packet.

[0099] S53. The Internet of Things cloud platform receives a firmware download request sent by a gateway protocol parser. The firmware download request is used to request the download of protocol data packets, and the protocol data packets include a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser.

[0100] S54. The Internet of Things cloud platform sends a firmware download response to the gateway protocol parser so that the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file. The firmware download response includes protocol data packets.

[0101] By using the access method for Internet of Things sub-devices provided in the embodiments of the present disclosure, after the Internet of Things cloud platform receives a firmware query request sent by a gateway protocol parser, it sends a firmware query response to the gateway protocol parser. The Internet of Things platform then receives a firmware download request sent by the gateway protocol parser and sends a firmware download response to it so that the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file. When there is a new model of Internet of Things sub-device with a need to access the network, through the interaction between the Internet of Things platform and the gateway protocol parser in the embodiments of the present disclosure, the iteration of a separate version of the new model of Internet of Things sub-device can be achieved without the need for a whole machine version release, which is beneficial to improving the efficiency of product function iteration and realizing the rapid iteration of product functions.

[0102] Optionally, the Internet of Things cloud platform obtains the protocol data packets in the following manner:

[0103] The Internet of Things cloud platform obtains the protocol data packets from the gateway protocol parser code repository. Among them, the protocol data packets are created and generated by developers based on product requirements to develop functional codes and using a pipeline;

[0104] The Internet of Things cloud platform copies the protocol data packets from the gateway protocol parser code repository to the local storage of the platform.

[0105] In this way, when a new model device has an access requirement, developers develop functional codes based on product requirements, create and generate protocol data packets using a pipeline, and save them to the gateway protocol parser code repository. The Internet of Things platform copies the protocol data packets to the local storage to retrieve the protocol data packets from the gateway protocol parser code repository.

[0106] Optionally, the developer develops functional code based on product requirements and uses a pipeline to create and generate protocol data packets, including: the developer creates a new version of the gateway protocol parser and pipeline configuration information based on the application configuration; the developer builds and generates protocol data packets in the cloud according to the pipeline configuration information for the Internet of Things and the platform to perform data copy operations. Among them, the product requirements include the application configuration, and the application configuration corresponds to the functional code.

[0107] Combined with Figure 8 As shown, the embodiments of the present disclosure also provide an access method for Internet of Things sub-devices, including:

[0108] S61, the gateway host receives a configuration query request sent by the gateway main service.

[0109] S62, the gateway host determines whether the gateway host fully supports the list of sub-devices corresponding to the model list protocol data, and generates a configuration query response based on the determination result. As an example, in the case where the determination result is not fully supported, a configuration query response indicating not fully supported is generated; in the case where the determination result is fully supported, a configuration query response indicating full support is generated.

[0110] S63, the gateway host sends a configuration query response to the gateway main service.

[0111] S64, the gateway host receives the sub-device model configuration information sent by the gateway main service, and the sub-device model configuration information is obtained by the gateway main service based on the model list protocol data when the configuration query response indicates not fully supported.

[0112] Using the access method for Internet of Things sub-devices provided by the embodiments of the present disclosure, after the gateway host receives the configuration query request, it determines whether the gateway host fully supports the list of sub-devices corresponding to the model list protocol data and then sends a configuration query response to the gateway main service. After that, the gateway host receives the sub-device model configuration information to synchronize the sub-device model information between the gateway host and the gateway protocol parser.

[0113] Optionally, after the gateway host receives the sub-device model configuration information sent by the gateway main service, it further includes:

[0114] After determining that the sub-device model configuration information is received, the gateway host updates the list of sub-devices of the gateway host based on the sub-device model configuration information.

[0115] In the case where the synchronous update is completed, the gateway host sends a synchronous configuration confirmation response to the gateway main service.

[0116] In this way, after the gateway host determines that the synchronization of the sub-device model information with the gateway protocol parser is completed, it notifies the gateway main service in a timely manner.

[0117] In practical applications, combined with Figure 9 As shown, the IOT (Internet of Things) cloud platform represents the Internet of Things cloud platform, and the Zigbee Host represents the gateway host side. The access method for IoT sub-devices specifically includes the following steps:

[0118] S100, The IOT cloud platform obtains protocol data packets from the gateway protocol parser code repository and copies the protocol data packets to the platform local storage. The protocol data packets include the new version of the gateway protocol parser and the zigbee model information file supported by the gateway protocol parser.

[0119] S101, The gateway protocol parser sends a firmware query request to the IOT cloud platform.

[0120] S102, The IOT cloud platform sends a firmware query response to the gateway protocol parser. The firmware query response includes protocol data packets.

[0121] S103, When the gateway protocol parser determines that the stored protocol data packets include the new version of the gateway protocol parser, it constructs a firmware download request.

[0122] S104, The gateway protocol parser sends a firmware download request to the IOT cloud platform.

[0123] S105, The IOT cloud platform sends a firmware download response to the gateway protocol parser. The firmware download response includes protocol data packets.

[0124] S106, The gateway protocol parser saves the protocol data packets for hot update.

[0125] S107, After the hot update of the gateway protocol parser is completed, it sends a successful update message to the gateway main service.

[0126] S108, The gateway main service releases the resources of the dynamic library of the current firmware, and then dynamically loads the dynamic library of the gateway protocol parser.

[0127] S109, The gateway main service sends an initialization instruction to the gateway protocol parser.

[0128] S110, The gateway protocol parser performs an initialization operation based on the initialization instruction.

[0129] S111, The gateway main service sends a model list query request to the gateway protocol parser.

[0130] S112, The gateway protocol parser converts the updated zigbee model information based on the zigbee protocol into model list protocol data.

[0131] S113, The gateway protocol parser sends the model list protocol data to the gateway main service.

[0132] S114, When the gateway main service determines that the zigbee device list corresponding to the model list protocol data is not fully supported by the zigbee host side, it obtains the zigbee model configuration information based on the model list protocol data.

[0133] S115, The gateway main service distributes the zigbee model configuration information to the Zigbee Host.

[0134] S116, When the Zigbee Host finishes the synchronization update, it sends a synchronization configuration confirmation response to the gateway main service to synchronize the zigbee model information between the zigbee host side and the gateway protocol parser.

[0135] Combined Figure 10 As shown in

[0136] In addition, when the logical instructions in the above-mentioned memory 701 are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0137] The memory 701, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. The processor 700 executes functional applications and data processing by running the program instructions / modules stored in the memory 701, that is, implements the access method of the IoT sub-device in the above embodiments.

[0138] The memory 701 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 701 may include a high-speed random access memory and may also include a non-volatile memory.

[0139] An embodiment of the present disclosure further provides a gateway device, including: a gateway protocol parser connected to the Internet of Things cloud platform and executing the access method of the Internet of Things sub-device as described above; a gateway main service connected to the gateway protocol parser and executing the access method of the Internet of Things sub-device as described above; and a gateway host connected to the gateway main service and executing the access method of the Internet of Things sub-device as described above.

[0140] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are set to execute the access method of the Internet of Things sub-device as described above.

[0141] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, for example: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, etc., which are various media that can store program codes.

[0142] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process, and other changes. The embodiments only represent possible variations. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terms used in this application are only for describing the embodiments and do not limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to also include the plural forms. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations of one or more of the associated listed items. Additionally, when used in this application, the term "comprise" and its variants "comprises" and / or "comprising" etc. mean the presence of the stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or groups of these. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, or device comprising the element. Herein, each embodiment may focus on the differences from other embodiments, and the same or similar parts among the embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method parts disclosed in the embodiments, the relevant parts may refer to the description of the method parts.

[0143] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner may depend on the specific application and design constraints of the technical solution. The technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. The technician can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0144] In the embodiments disclosed in this document, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms. The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the various functional units can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.

[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the block can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can also be executed in the reverse order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks can also occur in a different order than that disclosed in the description. Sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and sometimes they can also be executed in the reverse order, which can depend on the functions involved. Each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for accessing an Internet of Things sub-device, wherein the gateway device includes a gateway protocol parser, and the gateway protocol parser is connected to an Internet of Things cloud platform, characterized in that: Applied to the gateway protocol parser, the method includes: Send a firmware download request to the IoT cloud platform to request downloading of a protocol data packet, where the protocol data packet includes a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser; Receive and save the firmware download response sent by the IoT platform, where the firmware download response includes a protocol data packet; The gateway protocol parser is dynamically loaded based on the new version of the gateway protocol parser and the sub-device model information is updated according to the sub-device model information file to realize the hot update of the gateway protocol parser.

2. The method according to claim 1, characterized in that Also includes: Before sending a firmware download request to the IoT cloud platform to request downloading of a protocol data packet, sending a firmware query request to the IoT cloud platform to request querying whether a stored protocol data packet includes a new version of the gateway protocol parser; Receiving a firmware query response sent by the IoT cloud platform, the firmware query response including current version information of the stored protocol data packet; In the case where the current version information indicates that the stored protocol data packet includes a new version of the gateway protocol parser, a firmware download request is constructed.

3. The method according to claim 1 or 2, characterized in that: The gateway device also includes a gateway main service and a gateway host end. The gateway main service is connected to the gateway protocol parser and the gateway host end respectively, and also includes: After the gateway protocol parser is hot-updated successfully, it receives the model list query request sent by the gateway main service and converts the updated sub-device model information into model list protocol data; Send the model list protocol data to the gateway main service, so that the gateway main service determines whether the gateway host terminal device list matches the sub-device list corresponding to the model list protocol data; Receive the sub-device model configuration information sent by the gateway main service and convert it into configuration list protocol data, where the sub-device model configuration information is obtained by parsing the model list protocol data after the gateway main service determines that the gateway host terminal device list does not match the sub-device list corresponding to the model list protocol data; Send the configuration list protocol data to the gateway main service to synchronize the sub-device model information between the gateway protocol parser and the gateway host.

4. A method for accessing an Internet of Things sub-device, wherein the gateway device comprises a gateway main service, a gateway protocol parser, and a gateway host end, wherein the gateway main service is connected to the gateway protocol parser and the gateway host end respectively, and the gateway protocol parser is connected to the Internet of Things cloud platform, characterized in that: Applied to the gateway main service, the methods include: When it is determined that the hot update of the gateway protocol parser is successful, a model list query request is sent to the gateway protocol parser; Receive model list protocol data sent by the gateway protocol parser; In the case where it is determined that the gateway host does not fully support the sub-device list corresponding to the model list protocol data, obtaining sub-device model configuration information based on the model list protocol data; Sub-device model configuration information is sent to the gateway host to synchronize sub-device model information between the gateway protocol parser and the gateway host.

5. A method for accessing an Internet of Things sub-device, wherein the gateway device includes a gateway protocol parser, and the gateway protocol parser is connected to the Internet of Things cloud platform, characterized in that: Applied to the IoT cloud platform, the methods include: Receive a firmware download request sent by the gateway protocol parser, the firmware download request is used to request downloading a protocol data packet, the protocol data packet includes a new version of the gateway protocol parser and a sub-device model information file supported by the gateway protocol parser; A firmware download response is sent to the gateway protocol parser so that the gateway protocol parser dynamically loads the gateway protocol parser based on the new version of the gateway protocol parser and updates the sub-device model information according to the sub-device model information file, the firmware download response including a protocol data packet.

6. The method according to claim 5, characterized in that Also includes: Before receiving the firmware download request sent by the gateway protocol parser, a firmware query request sent by the gateway protocol parser is received, the firmware query request being used to query whether the stored protocol data packet includes a new version of the gateway protocol parser; A firmware query response is sent to the gateway protocol parser, wherein the firmware query response includes current version information of the stored protocol data packet, so that the gateway protocol parser determines that the stored protocol data packet is a new version data packet and constructs a firmware download request.

7. The method according to claim 5, characterized in that Obtain the protocol data packet as follows: Obtain the protocol data packet from the gateway protocol parser code repository, where the protocol data packet is generated by the developer developing the functional code based on product requirements and using the pipeline to create it; Copy the protocol data packet from the gateway protocol parser code repository to the platform local storage.

8. A method for accessing an Internet of Things sub-device, wherein the gateway device includes a gateway main service and a gateway host end, characterized in that: Applied to the gateway host, the methods include: Receive configuration query requests sent by the gateway master service; Determine whether the gateway host fully supports the sub-device list corresponding to the model list protocol data, and generate a configuration query response based on the determination result; Send a configuration query response to the gateway master service; The sub-device model configuration information sent by the gateway main service is received, and the sub-device model configuration information is obtained by the gateway main service based on the model list protocol data when the configuration query response indicates that all are not supported.

9. A gateway device, characterized in that: include: A gateway protocol parser, connected to the Internet of Things cloud platform, and executing the access method of the Internet of Things sub-device according to any one of claims 1 to 3; A gateway master service, connected to the gateway protocol parser, and executing the access method of the Internet of Things sub-device as claimed in claim 4; as well as The gateway host side is connected to the gateway main service and executes the access method of the Internet of Things sub-device as described in claim 8.

10. An access device for an Internet of Things sub-device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the access method of the Internet of Things sub-device as described in any one of claims 1 to 4, or execute the access method of the Internet of Things sub-device as described in claim 8 when running the program instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the access method for an Internet of Things sub-device according to any one of claims 1 to 8 when running.

Citation Information

Cited By

  • Dynamic protocol loading method and system of Internet of Things platform

    CN120692331A