Method, device and equipment for subscribing to attributes of Zigbee devices

By converting the resource subscription request of the OCF client into a configuration report request identifiable by the Zigbee device in the gateway device, the interconnection problem between the OCF client and the Zigbee device is solved, the subscription and update notification of cluster attributes are realized, and the protocol is improved. interoperability between.

CN115943616BActive Publication Date: 2024-09-13GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202080103385.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-26
Publication Date
2024-09-13
Estimated Expiration
2040-10-26

AI Technical Summary

Technical Problem

In the existing technology, the interaction scheme between the OCF client and the Zigbee device has not been fully studied, resulting in limited interconnection and interoperability functions between protocols.

Method used

The gateway device receives the OCF client's resource subscription request, converts it into a configuration report request that can be recognized by the Zigbee device, and sends it to the Zigbee device, thereby realizing the OCF client's subscription to the cluster attributes in the Zigbee device.

Benefits of technology

The interconnection and interoperability functions between different protocols are enhanced, and the effective subscription and update notification of Zigbee device cluster attributes by the OCF client are realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115943616B
    Figure CN115943616B
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for subscribing to the attributes of a Zigbee device, and belongs to the field of Internet of Things technology. The method comprises: an OCF client sends a resource subscription request to a gateway device, the resource subscription request is a request by the OCF client to subscribe to the resource attributes of a first OCF resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first Zigbee device; the gateway device sends a configuration report request to the first Zigbee device, the configuration report request is a request by the gateway device to report and configure the cluster attributes of a first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster. The present application implements the subscription of the OCF client to the cluster attributes in the Zigbee device, and enhances the interconnection function between different protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet of Things technology, and in particular to a method, apparatus and device for subscribing to attributes of a Zigbee device. Background Art

[0002] The combination of Internet of things (IOT) and artificial intelligence (AI) is becoming increasingly close. On the one hand, the Internet of things is moving from "connection" to "intelligence"; on the other hand, artificial intelligence is moving from "cloud" to "edge", and the two are working together to promote the Internet of Things to the Internet of Intelligences.

[0003] The world's largest international standard alliance for the intelligent Internet of Things is OCF (Open Connectivity Foundation). The OCF standard supports search and communication between smart devices without being restricted by manufacturers, operating systems, chips or physical transmission, and provides technical specifications for achieving seamless connection between various physical media layer, transmission layer and application layer devices. OCF has flexible and extensive application scenarios: First, OCF clients (such as mobile applications) and OCF devices (Servers) (such as air conditioners) can interact. For example, mobile applications can be used to obtain and set information such as the switch, temperature, and mode of the air conditioner; second, multiple OCF clients can control OCF devices at the same time. For example, users can flexibly control the same device at home through smartphones, smart TVs, and smart speakers; third, through bridging, OCF clients can interact with other standard devices, such as Zigbee, Bluetooth, etc.; finally, OCF devices can also be controlled by clients of other standards through bridging.

[0004] Zigbee is a low-speed, short-distance transmission wireless network protocol. The Zigbee network has the characteristics of large capacity, low latency, low power consumption, high security and high stability. It can carry all kinds of equipment and provide stable and secure LAN communication for complex smart scenarios such as whole-house intelligence, hotel apartments, real estate home decoration, smart offices, etc.

[0005] However, the interaction scheme between OCF clients and Zigbee devices needs further study. Summary of the invention

[0006] The present application provides a method, apparatus and device for subscribing to the attributes of a Zigbee device. The technical solution is as follows:

[0007] According to one aspect of an embodiment of the present application, a method for subscribing to attributes of a Zigbee device is provided, which is applied to a gateway device, and the method includes:

[0008] Receiving a resource subscription request sent by an OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0009] A configuration report request is sent to the first Zigbee device, where the configuration report request is a request by the gateway device to report and configure cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0010] According to one aspect of an embodiment of the present application, a method for subscribing to attributes of a Zigbee device is provided, which is applied to an OCF client, and the method includes:

[0011] Sending a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by the first Zigbee device;

[0012] Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0013] According to one aspect of an embodiment of the present application, a method for subscribing to an attribute of a Zigbee device is provided, which is applied to a first Zigbee device, and the method includes:

[0014] Receiving a configuration report request sent by a gateway device, where the configuration report request is a request by the gateway device to report and configure cluster attributes of a first service cluster of the first Zigbee device;

[0015] Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0016] According to one aspect of an embodiment of the present application, a device for subscribing to attributes of a Zigbee device is provided, the device comprising:

[0017] A subscription request receiving module, configured to receive a resource subscription request sent by an OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0018] The configuration request sending module is used to send a configuration report request to the first Zigbee device, wherein the configuration report request is a request for the gateway device to report the cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0019] According to one aspect of an embodiment of the present application, a device for subscribing to attributes of a Zigbee device is provided, the device comprising:

[0020] A subscription request sending module, configured to send a resource subscription request to a gateway device, wherein the resource subscription request is a request by an OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0021] Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0022] According to one aspect of an embodiment of the present application, a device for subscribing to attributes of a Zigbee device is provided, the device comprising:

[0023] A configuration request receiving module, configured to receive a configuration report request sent by a gateway device, wherein the configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device;

[0024] Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0025] According to one aspect of an embodiment of the present application, a gateway device is provided, the gateway device comprising a processor, a memory, and a transceiver;

[0026] The transceiver is used to receive a resource subscription request sent by an OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0027] The transceiver is further used to send a configuration report request to the first Zigbee device, where the configuration report request is a request for the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0028] According to one aspect of an embodiment of the present application, a terminal is provided, wherein an OCF client is installed and run on the terminal, and the terminal includes a processor, a memory, and a transceiver;

[0029] The transceiver is used to send a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by the first Zigbee device;

[0030] Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0031] According to one aspect of an embodiment of the present application, a Zigbee device is provided, the Zigbee device comprising a processor, a memory, and a transceiver;

[0032] The transceiver is used to receive a configuration report request sent by a gateway device, where the configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device;

[0033] Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0034] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is used to be executed by a processor of a gateway device to implement the attribute subscription method of the Zigbee device on the gateway device side.

[0035] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is used to be executed by a processor of a terminal to implement the attribute subscription method of a Zigbee device on the OCF client side.

[0036] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is used to be executed by a processor of a Zigbee device to implement the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0037] According to one aspect of an embodiment of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a gateway device, it is used to implement the attribute subscription method of the Zigbee device on the gateway device side.

[0038] According to one aspect of an embodiment of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a terminal, it is used to implement the attribute subscription method of the Zigbee device on the OCF client side.

[0039] According to one aspect of an embodiment of the present application, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on a Zigbee device, it is used to implement the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0040] According to one aspect of an embodiment of the present application, a computer program product is provided. When the computer program product is run on a gateway device, the gateway device executes the attribute subscription method of the Zigbee device on the gateway device side.

[0041] According to one aspect of an embodiment of the present application, a computer program product is provided. When the computer program product is run on a terminal, the terminal executes the attribute subscription method of the Zigbee device on the OCF client side.

[0042] According to one aspect of an embodiment of the present application, a computer program product is provided. When the computer program product is run on a Zigbee device, the Zigbee device executes the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0043] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:

[0044] After receiving the resource subscription request sent by the OCF client, the gateway device converts the resource subscription request into a configuration report request recognizable by the Zigbee device, and then sends the configuration report request to the Zigbee device, thereby enabling the OCF client to subscribe to the cluster attributes in the Zigbee device and enhancing the interconnection function between different protocols. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 is a schematic diagram of a device model structure of a Zigbee device provided by an embodiment of the present application;

[0047] Figure 2 It is a schematic diagram of realizing the interaction between the OCF client and the Zigbee device through the bridge platform provided by an embodiment of the present application;

[0048] Figure 3 It is a schematic diagram of a subscription process specified in the OCF protocol provided in an embodiment of the present application;

[0049] Figure 4 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0050] Figure 5 is a structural block diagram of a gateway device provided by an embodiment of the present application;

[0051] Figure 6 This is a flow chart of a method for subscribing to properties of a Zigbee device provided by an embodiment of the present application;

[0052] Figure 7 is a flowchart of a method for subscribing to attributes of a Zigbee device provided by another embodiment of the present application;

[0053] Figure 8is a flowchart of a method for subscribing to attributes of a Zigbee device provided by another embodiment of the present application;

[0054] Fig. 9 is a flowchart of a method for subscribing to attributes of a Zigbee device provided by another embodiment of the present application;

[0055] Fig.10 is a block diagram of a property subscription device for a Zigbee device provided by an embodiment of the present application;

[0056] Fig.11 is a block diagram of an attribute subscription device for a Zigbee device provided by another embodiment of the present application;

[0057] Fig.12 is a block diagram of an attribute subscription device for a Zigbee device provided by another embodiment of the present application;

[0058] Fig.13 It is a schematic diagram of the structure of a gateway device provided by an embodiment of the present application;

[0059] Fig.14 is a schematic diagram of the structure of a terminal provided by an embodiment of the present application;

[0060] Fig.15 It is a structural diagram of a Zigbee device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0062] Figure 1 The schematic diagram of the device model structure of the Zigbee device is shown. After the Zigbee device is connected to the network, it becomes a node in the Zigbee network. The node may have multiple endpoints. Each endpoint may have multiple service clusters (Server Cluster, referred to as "cluster"), and each cluster may have multiple attributes. Each attribute has its own data type and data content (Type & Data).

[0063] OCF clients can interact with Zigbee devices. Figure 2, which shows that the interaction between the OCF client and the Zigbee device is realized through the bridge platform. The bridge platform 110 includes the following functional modules: a virtual OCF server 112, a bridging function module (Bridging Function) 114 and a virtual Zigbee client 116. The OCF client 120 and the virtual OCF server 112 can communicate based on the OCF protocol, and the virtual Zigbee client 116 and the Zigbee device 150 can communicate based on the Zigbee protocol. For example, the above-mentioned Zigbee protocol can be the Zigbee 3.0 protocol or other existing versions or subsequent evolution versions of the Zigbee protocol, which is not limited in the embodiments of the present application.

[0064] The bridge function module 114 is used to implement the conversion between the OCF protocol and the Zigbee protocol. For example, the role of the bridge function module 114 includes converting the information based on the OCF protocol sent by the OCF client 120 into the information based on the Zigbee protocol that can be recognized by the Zigbee device 150. In addition, the role of the bridge function module 114 can also include converting the information based on the Zigbee protocol sent by the Zigbee device 150 into the information based on the OCF protocol that can be recognized by the OCF client 120.

[0065] Optionally, the bridging function module 114 can establish a mapping relationship between information based on the OCF protocol and information based on the Zigbee protocol to achieve conversion between information based on the OCF protocol and information based on the Zigbee protocol. As shown in the following Table 1, it shows a translation model between the Zigbee protocol and the OCF protocol.

[0066] Table 1

[0067] Zigbee Protocol Map count OCF Protocol Map count Node 1 OCF Device 1 Server Cluster 1 OCF Resource n Attribute 1 OCF Resource property 1

[0068] From the above Table 1, we can get three groups of mapping relationships between information based on the Zigbee protocol and information based on the OCF protocol, as well as the mapping counts of both parties in each group of mapping relationships. The three groups of mapping relationships based on Table 1 include: the mapping relationship between the node (Node) and the OCF device (OCF Device), and the mapping relationship is a 1-to-1 mapping relationship; the mapping relationship between the service cluster (Server Cluster) and the OCF resource (OCF Resource), and the mapping relationship is a 1-to-n mapping relationship; the mapping relationship between the attribute (Attribute) and the OCF resource property (OCF Resource property), and the mapping relationship is a 1-to-1 mapping relationship.

[0069] Below, taking the Zigbee device as a color temperature lamp as an example, the translation model between the Zigbee protocol and the OCF protocol is introduced. As shown in the following Table 2:

[0070] Table 2

[0071]

[0072] In addition, the OCF protocol specifies the subscription (Notification) function of the OCF client to the OCF server (i.e., OCF device). Figure 3 As shown, it shows a schematic diagram of the subscription process specified by the OCF protocol, which may include the following steps:

[0073] 1. When the OCF client needs to subscribe to a resource in the OCF server, the OCF client sends a resource subscription request (RETRIEVE Request) to the OCF server. The resource subscription request is used to indicate the execution of a subscription operation on the resource attributes of the resource;

[0074] 2. The OCF server caches resource subscription requests;

[0075] 3. The OCF server determines the resource to be subscribed based on the resource subscription request, sets the resource access policy of the resource to be subscribed, and then sends a resource subscription response (RETRIEVE Response) to the OCF client;

[0076] 4. The OCF server finds that the resource attributes of the subscribed resources have changed and meet the reporting conditions;

[0077] 5. The OCF server actively sends the attribute update information of the resource to the OCF client. For example, the attribute update information may include the updated attribute value of the resource attribute.

[0078] Based on the above example of interaction between the OCF client and the Zigbee device, it can be seen that the OCF client can access the Zigbee device by establishing a mapping relationship between the information of different protocols through the bridge platform. In an embodiment of the present application, considering the subscription requirement of the OCF client to the cluster attributes of the Zigbee device, a technical solution for the OCF client to subscribe to the cluster attributes of the Zigbee device is provided.

[0079] The technical solution of the present application will be introduced and explained below through several embodiments.

[0080] Please refer to Figure 4, which shows a schematic diagram of an implementation environment provided by an embodiment of the present application, the implementation environment may include: a terminal 210, a Zigbee device 220 and a gateway device 230. The implementation environment may be an intelligent network system.

[0081] The terminal 210 may include various handheld devices with wireless communication functions (such as mobile phones, tablet computers, etc.), vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc. For the convenience of description, in the embodiments of the present application, the above-mentioned devices are collectively referred to as terminals.

[0082] Zigbee device 220 refers to an intelligent Internet of Things device with network access capability under Zigbee networking, such as Zigbee device 220 can be a smart home device, terminal device, or other device with network access capability, which is not limited in the present embodiment of the application. In an example, taking the implementation environment as a home intelligent Internet of Things system as an example, Zigbee device 220 can be a smart TV, smart speaker, smart air conditioner, smart light, smart door and window, smart curtain, smart socket and other smart home devices.

[0083] The gateway device 230 is also called an internetwork connector or a protocol converter. It is a computer system or device that provides data conversion services between multiple networks. Between two systems or devices that use different communication protocols, data formats or languages, or even completely different architectures, the gateway device is equivalent to a translator. The gateway device can parse the received information and repackage it to send it to the destination system or destination device to meet the needs of the destination system or destination device. At the same time, the gateway device can also play a filtering and security role.

[0084] Taking the process of the OCF client 211 accessing the Zigbee device 220 as an example, the gateway device 230 is connected to the terminal 210 and the Zigbee device 220 respectively, and the OCF client 211 is installed and running in the terminal 210, and the OCF client 211 can access the Zigbee device 220 through the gateway device 230. For example, the user sends an access request to the gateway device 230 by operating the OCF client 211 running on the terminal 210. The access request is based on the information of the OCF protocol. After receiving the access request, the gateway device 230 converts the access request. The converted access request is based on the information of the Zigbee protocol. Then, the gateway device 230 sends the converted access request to the Zigbee device 220, thereby completing the process of the OCF client 211 accessing the Zigbee device 220.

[0085] It should be noted that, in the embodiment of the present application, the OCF client's "access" to the Zigbee device includes two modes: "acquisition" and "setting". "Acquisition" means that the OCF client obtains the status of the Zigbee device, etc., and "setting" means that the OCF client selects, sets, updates, etc. the status of the Zigbee device. In addition, in the embodiment of the present application, the OCF client's "access" to the Zigbee device can also be referred to as the OCF client's "operation" on the Zigbee device, but those skilled in the art can understand its meaning.

[0086] Please refer to Figure 5 , which shows a structural block diagram of a gateway device provided by an embodiment of the present application. Figure 5 As shown, the gateway device 300 includes a virtual OCF server 310 , a bridging function module 320 and a virtual Zigbee client 330 .

[0087] The virtual OCF server 310 is a functional module in the gateway device 300 for interacting with the OCF client 301 . The virtual OCF server 310 interacts with the OCF client 301 based on the OCF protocol.

[0088] The virtual Zigbee client 330 is a functional module in the gateway device 300 for interacting with the Zigbee device 302. The virtual Zigbee client 330 interacts with the Zigbee device 302 based on the Zigbee protocol. The Zigbee device 302 can serve as a Zigbee server and receive access requests from the virtual Zigbee client 330.

[0089] The bridging function module 320 is a function module in the gateway device 300 for realizing conversion between two different protocol information, that is, the bridging function module 320 is used to convert information based on the OCF protocol into information based on the Zigbee protocol, or to convert information based on the Zigbee protocol into information based on the OCF protocol.

[0090] In one example, when the OCF client 301 initiates an access request to the Zigbee device 302, the OCF client 301 first sends a first access request to the gateway device 300, and the first access request is based on information of the OCF protocol. Then, the first access request is received by the virtual OCF server 310 in the gateway device 300, and the bridging function module 320 converts the first access request into a second access request, and the second access request is based on information of the Zigbee protocol. Then, the virtual Zigbee client 330 in the gateway device 300 sends a second access request to the Zigbee device 302 to complete the OCF client 301's access to the Zigbee device 302.

[0091] In addition, the gateway device 300 may also be referred to as a bridge platform, which is used to implement the interaction function between the OCF client 301 and the Zigbee device 302 .

[0092] Please refer to Figure 6 , which shows a flowchart of a method for subscribing to the attributes of a Zigbee device provided by an embodiment of the present application, which method can be applied to Figure 4 In the implementation environment shown in FIG. 6 , the method may include the following steps (610 to 620):

[0093] Step 610: The OCF client sends a resource subscription request to the gateway device. The resource subscription request is a request for the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device.

[0094] Optionally, the resource subscription request includes: a resource address of the first OCF resource and subscription operation indication information. The resource address of the first OCF resource is used to identify the first OCF resource, for example, the resource address may be a URL (Uniform Resource Locator). The subscription operation indication information is used to indicate that a subscription operation is performed on a resource attribute of the first OCF resource.

[0095] It should be noted that an OCF resource can be uniquely identified by a resource address (such as a URL) of the OCF resource, and each OCF resource may include one or more resource types. Taking a lamp as an example, its resource type may include a switch resource, a brightness resource, a color temperature resource, a hue and saturation resource, etc., which is not limited in the present embodiment of the application.

[0096] Step 620: The gateway device sends a configuration report request to the first Zigbee device. The configuration report request is a request for the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0097] After receiving the resource subscription request, the gateway device parses the resource subscription request and obtains the resource address and subscription operation indication information of the first OCF resource, thus knowing that the OCF client wants to perform a subscription operation on the first OCF resource. Then, the gateway device maps the resource address of the first OCF resource to the identification information of the cluster attribute of the first service cluster, generates and sends a configuration report request to the first Zigbee device, and the configuration report request includes the identification information of the cluster attribute of the first service cluster. The identification information of the cluster attribute of the first service cluster is used to identify the cluster attribute of the first service cluster. For example, the identification information of the cluster attribute of the first service cluster may include the ID of the first service cluster and the ID of the cluster attribute.

[0098] In the embodiment of the present application, there is a mapping relationship between the first OCF resource and the first service cluster, and there is also a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster. Based on the above mapping relationship, the gateway device converts the resource subscription request to generate a configuration report request, thereby requesting the first Zigbee device to report to the gateway device when the cluster attribute of the first service cluster meets the reporting condition, so as to achieve the purpose of subscribing to the cluster attribute of the first service cluster.

[0099] In an exemplary embodiment, if Figure 7 As shown, the above step 620 also includes the following steps (630-650):

[0100] Step 630: The first Zigbee device sends cluster attribute update information to the gateway device. The cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster.

[0101] After the gateway device successfully subscribes to the cluster attribute of the first service cluster, if the cluster attribute of the first service cluster is updated, then if the reporting conditions are met, the first Zigbee device will actively send cluster attribute update information to the gateway device. Optionally, the cluster attribute update information includes identification information and updated attribute value of the cluster attribute of the first service cluster.

[0102] Step 640: The gateway device generates resource attribute update information based on the updated attribute value of the cluster attribute of the first service cluster, where the resource attribute update information includes the updated attribute value of the resource attribute of the first OCF resource.

[0103] After receiving the cluster attribute update information, the gateway device parses the cluster attribute update information to obtain the identification information and updated attribute value of the cluster attribute of the first service cluster. Then, the gateway device maps the identification information of the cluster attribute of the first service cluster to the resource address of the first OCF resource, and determines the updated attribute value of the resource attribute of the first OCF resource according to the updated attribute value of the cluster attribute of the first service cluster. The gateway device generates resource attribute update information, which may include the resource address of the first OCF resource and the updated attribute value of the resource attribute of the first OCF resource.

[0104] Step 650: The gateway device sends resource attribute update information to the OCF client.

[0105] Correspondingly, after receiving the resource attribute update information, the OCF client parses the resource attribute update information to obtain the updated attribute value of the resource attribute of the first OCF resource.

[0106] In addition, in order to implement the above subscription to the cluster attribute of the first service cluster of the first Zigbee device, the gateway device may perform the following steps after establishing a connection with the first Zigbee device:

[0107] 1. The gateway device determines the cluster attributes with reportable capabilities under the first service cluster of the first Zigbee device;

[0108] The first Zigbee device may include one or more service clusters, and the first service cluster may be any service cluster of the first Zigbee device. The first service cluster may include one or more cluster attributes. Some cluster attributes have reportable capabilities, while some cluster attributes do not have reportable capabilities. The so-called cluster attribute with reportable capabilities means that when the attribute value of the cluster attribute is updated, it can be actively reported to the subscriber, thereby realizing the update reporting function of the cluster attribute.

[0109] 2. The gateway device generates an OCF resource address corresponding to the cluster attribute with reportable capabilities;

[0110] The gateway device may establish a mapping relationship between cluster attributes and OCF resources, and generate a corresponding OCF resource address according to the identification information of the cluster attributes. For example, the gateway device establishes a mapping relationship between the cluster attributes of the first service cluster and the first OCF resource, and generates a resource address of the first OCF resource according to the identification information of the cluster attributes of the first service cluster.

[0111] 3. The gateway device creates an OCF resource based on the OCF resource address and sets the resource access policy of the OCF resource to be subscribable.

[0112] By setting the resource access policy of the OCF resource to be subscribable, when a resource subscription request for the OCF resource is subsequently received, the resource subscription request can be successfully responded to.

[0113] In one example, there is a one-to-one mapping relationship between the OCF resource address and the cluster attribute. That is, one cluster attribute corresponds to one OCF resource address, and different cluster attributes correspond to different OCF resource addresses. For example, the first Zigbee device contains an endpoint with an ID of 1, recorded as Endpoint 1. The Endpoint 1 contains a service cluster with an ID of 6, recorded as Cluster 6. Cluster 6 includes two cluster attributes with reportable capabilities (assuming they are called the first cluster attribute and the second cluster attribute). The IDs of these two cluster attributes are 9 and 10, respectively, recorded as Attribute 9 and Attribute 10. Then, the identification information of the first cluster attribute can be expressed as Endpoint 1Cluster6Attribute9, and the identification information of the second cluster attribute can be expressed as Endpoint 1Cluster 6Attribute 10. Assuming that the first cluster attribute is mapped to the first OCF resource and the second cluster attribute is mapped to the second OCF resource, the resource address of the first OCF resource can be expressed as / ep / 1 / cluster / 6 / attr / 9 and the resource address of the second OCF resource can be expressed as / ep / 1 / cluster / 6 / attr / 10.

[0114] In another example, there is a one-to-many mapping relationship between the OCF resource address and the cluster attribute. That is, multiple cluster attributes correspond to one OCF resource address. Optionally, the same OCF resource address is mapped to multiple cluster attributes belonging to the same service cluster. For example, the first Zigbee device includes an endpoint with an ID of 1, recorded as Endpoint 1. The Endpoint 1 contains a service cluster with an ID of 6, recorded as Cluster 6. Cluster 6 includes two cluster attributes with reportable capabilities (assuming they are called the first cluster attribute and the second cluster attribute), and the IDs of the two cluster attributes are 9 and 10, respectively, recorded as Attribute 9 and Attribute 10. Then, the identification information of the first cluster attribute can be expressed as Endpoint 1Cluster 6Attribute 9, and the identification information of the second cluster attribute can be expressed as Endpoint1Cluster 6Attribute 10. Assuming that the first cluster attribute and the second cluster attribute are mapped together to the first OCF resource, the resource address of the first OCF resource can be expressed as / ep / 1 / cluster / 6 / a / 9 / a / 10.

[0115] To sum up, the technical solution provided by the embodiment of the present application is that after the gateway device receives the resource subscription request sent by the OCF client, it converts the resource subscription request into a configuration report request recognizable by the Zigbee device, and then sends the configuration report request to the Zigbee device, thereby realizing the OCF client's subscription to the cluster attributes in the Zigbee device and enhancing the interconnection function between different protocols.

[0116] In addition, the present application provides two mapping relationships between OCF resource addresses and cluster attributes, the first of which is a one-to-one mapping relationship. When this mapping relationship is adopted, one cluster attribute corresponds to one OCF resource address. When the OCF client needs to subscribe to a certain cluster attribute, it only needs to send a resource subscription request to the OCF resource address corresponding to the cluster attribute, so that the cluster attribute to be subscribed can be selected more flexibly; the other is a one-to-many mapping relationship. When this mapping relationship is adopted, multiple cluster attributes correspond to one OCF resource address. When the OCF client needs to subscribe to multiple cluster attributes, if they happen to correspond to the same OCF resource address, then it only needs to send a resource subscription request to this OCF resource address, without having to send resource subscription requests to multiple OCF resource addresses, which is simpler and more efficient.

[0117] Please refer to Figure 8 , which shows a flowchart of a method for subscribing to the attributes of a Zigbee device provided by another embodiment of the present application, which method can be applied to Figure 4 In the implementation environment shown in FIG. 8 , the method may include the following steps ( 801 to 823 ):

[0118] Step 801: The virtual Zigbee client discovers a first Zigbee device.

[0119] Step 802: The virtual Zigbee client establishes a connection with the first Zigbee device.

[0120] Step 803: The virtual Zigbee client sends a mapping relationship establishment request to the bridging function module, where the mapping relationship establishment request is used to request to establish a mapping relationship between the first Zigbee device and the first OCF device, where the first OCF device is a virtual OCF device mapped to the first Zigbee device.

[0121] Step 804: The bridging function module sets a mapping relationship between the OCF resource and the service cluster of the first Zigbee device.

[0122] Optionally, the bridging function module determines a cluster attribute with reportable capability under a first service cluster of the first Zigbee device, and generates an OCF resource address corresponding to the cluster attribute with reportable capability.

[0123] For example, under Cluster 6 of Endpoint 1 of the first Zigbee device, the following two cluster attributes have reportable capabilities: Attribute 9 (recorded as the first cluster attribute) and Attribute 10 (recorded as the second cluster attribute). Assuming that the first cluster attribute is mapped to the first OCF resource and the second cluster attribute is mapped to the second OCF resource, the resource address of the first OCF resource can be expressed as / ep / 1 / cluster / 6 / attr / 9, and the resource address of the second OCF resource can be expressed as / ep / 1 / cluster / 6 / attr / 10. Among them, "attr / 9" and "attr / 10" indicate that the attributes with id values ​​9 and 10 under Cluster are reportable and can be reported and set. " / ep / 1 / cluster / 6" indicates the Cluster information of the first Zigbee device with Endpoint 1 and id value 6. In addition, the bridging function module may also set the resource access policy of the OCF resources corresponding to the resource addresses / ep / 1 / cluster / 6 / attr / 9 and / ep / 1 / cluster / 6 / attr / 10 to be subscribable.

[0124] Step 805: The bridging function module sends a virtual OCF device creation request to the virtual OCF server, where the virtual OCF device creation request is used to request the creation of a virtual OCF device (ie, the first OCF device) mapped to the first Zigbee device.

[0125] Step 806: The virtual OCF server creates a first OCF device and creates an OCF resource based on the OCF resource address.

[0126] Optionally, the virtual OCF server creates an OCF resource based on the OCF resource address. For example, for the two subscribable first OCF resources and second OCF resources, the virtual OCF server creates corresponding OCF resources based on the resource addresses of the two OCF resources.

[0127] Step 807: The OCF client sends a device resource acquisition request to the virtual OCF server. The device resource acquisition request is used to request to acquire relevant information of the OCF resources created by the virtual OCF server.

[0128] For example, obtain information such as resource addresses and resource access policies of various OCF resources created by the virtual OCF server.

[0129] Step 808: The virtual OCF server sends the OCF resource related information to the OCF client.

[0130] Step 809: The OCF client determines the subscribing OCF resource based on the resource access policy of the OCF resource, and then sends a resource subscription request to the virtual OCF server. The resource subscription request includes the resource address of the first OCF resource to be subscribed.

[0131] For example, the OCF client knows that the first OCF resource and the second OCF resource are subscribable according to the resource access policies of the first OCF resource and the second OCF resource. If the OCF client wants to subscribe to the first OCF resource, it sends a resource subscription request carrying the resource address / ep / 1 / cluster / 6 / attr / 9 of the first OCF resource to the virtual OCF server. In addition, the resource subscription request may also include subscription operation indication information, which is used to indicate that the operation to be performed on the first OCF resource is a subscription operation.

[0132] Step 810, the virtual OCF server sends a resource address resolution request to the bridging function module, the resource address resolution request is used to request resolution of the resource address, the resource address resolution request includes the resource address to be resolved (ie, the resource address of the first OCF resource mentioned above), and may carry subscription operation indication information.

[0133] Step 811 : The bridging function module determines identification information of the cluster attribute corresponding to the resource address to be resolved, and then determines that a subscription operation needs to be performed on the cluster attribute according to subscription operation indication information.

[0134] For example, the resource address resolution request includes the resource address / ep / 1 / cluster / 6 / attr / 9 of the first OCF resource and the subscription operation instruction information. The bridging function module determines that it needs to subscribe to the cluster attribute with id value 9 under Cluster 6 of the first Zigbee device Endpoint 1 (recorded as the first cluster attribute).

[0135] Step 812: The bridging function module sends a configuration report execution request to the virtual Zigbee client, where the configuration report execution request is used to request the virtual Zigbee client to send a configuration report request to the first Zigbee device.

[0136] Optionally, the configuration report execution request includes identification information of the first cluster attribute and subscription operation indication information.

[0137] Step 813: The virtual Zigbee client sends a configuration report request to the first Zigbee device, where the configuration report request is used to request reporting configuration of the first cluster attribute of the first Zigbee device.

[0138] Step 814: The first Zigbee device sends a configuration result to the virtual Zigbee client, where the configuration result is used to indicate whether the reporting configuration of the first cluster attribute is successfully completed.

[0139] Step 815: The virtual Zigbee client sends the configuration result to the bridging function module.

[0140] Step 816: The bridging function module sends the configuration result to the virtual OCF server.

[0141] Step 817: If the configuration result indicates that the reporting configuration of the first cluster attribute is successfully completed, it means that the subscription to the first OCF resource is successful, and the virtual OCF server stores the configuration result.

[0142] Step 818: The virtual OCF server sends a resource subscription response to the OCF client.

[0143] Step 819, when the attribute value of the first cluster attribute of the first Zigbee device is updated, if the reporting condition is met, the first Zigbee device sends cluster attribute update information to the virtual Zigbee client, and the cluster attribute update information may include the identification information and the updated attribute value of the first cluster attribute.

[0144] Step 820: The virtual Zigbee client sends cluster attribute update information to the bridging function module.

[0145] Step 821, the bridging function module finds the resource address of the corresponding first OCF resource from the mapping relationship according to the identification information of the first cluster attribute, and then sends resource attribute update information to the virtual OCF server, wherein the resource attribute update information includes the resource address of the first OCF resource and the updated attribute value of its resource attribute.

[0146] Step 822: The virtual OCF server updates the resource attributes of the first OCF resource.

[0147] Step 823: The virtual OCF server sends resource attribute update information to the OCF client.

[0148] Please refer to Fig. 9 , which shows a flowchart of a method for subscribing to the attributes of a Zigbee device provided by another embodiment of the present application, which method can be applied to Figure 4 In the implementation environment shown in FIG. 1 , the method may include the following steps (901 to 936):

[0149] Step 901: The virtual Zigbee client discovers a first Zigbee device.

[0150] Step 902: The virtual Zigbee client establishes a connection with the first Zigbee device.

[0151] Step 903: The virtual Zigbee client sends a mapping relationship establishment request to the bridging function module, where the mapping relationship establishment request is used to request to establish a mapping relationship between the first Zigbee device and the first OCF device, where the first OCF device is a virtual OCF device mapped to the first Zigbee device.

[0152] Step 904: The bridging function module sets a mapping relationship between the OCF resource and the service cluster of the first Zigbee device.

[0153] Optionally, the bridging function module determines a cluster attribute with reportable capability under a first service cluster of the first Zigbee device, and generates an OCF resource address corresponding to the cluster attribute with reportable capability.

[0154] For example, under Cluster 6 of Endpoint 1 of the first Zigbee device, the following two cluster attributes have reportable capabilities: Attribute 9 (recorded as the first cluster attribute) and Attribute 10 (recorded as the second cluster attribute). Assuming that the first cluster attribute and the second cluster attribute are mapped to the same OCF resource (recorded as the first OCF resource), the resource address of the first OCF resource can be expressed as / ep / 1 / cluster / 6 / a / 9 / a / 10. Among them, "a / 9 / a / 10" means that the attributes with id values ​​9 and 10 under Cluster are reportable and can be reported and set. " / ep / 1 / cluster / 6" indicates the Cluster information of the first Zigbee device with Endpoint 1 and id value 6. In addition, the bridging function module can also set the resource access policy of the OCF resource corresponding to the resource address / ep / 1 / cluster / 6 / a / 9 / a / 10 to be subscribable.

[0155] Step 905: The bridging function module sends a virtual OCF device creation request to the virtual OCF server, where the virtual OCF device creation request is used to request the creation of a virtual OCF device (ie, the first OCF device) mapped to the first Zigbee device.

[0156] Step 906: The virtual OCF server creates a first OCF device and creates an OCF resource based on the OCF resource address.

[0157] Optionally, the virtual OCF server creates an OCF resource based on the OCF resource address. For example, for the first OCF resource that can be subscribed, the virtual OCF server creates a corresponding OCF resource based on the resource address of the OCF resource.

[0158] Step 907: The OCF client sends a device resource acquisition request to the virtual OCF server. The device resource acquisition request is used to request to acquire relevant information of the OCF resources created by the virtual OCF server.

[0159] For example, obtain information such as resource addresses and resource access policies of various OCF resources created by the virtual OCF server.

[0160] Step 908: The virtual OCF server sends the OCF resource related information to the OCF client.

[0161] Step 909: The OCF client determines the subscribing OCF resource based on the resource access policy of the OCF resource, and then sends a resource subscription request to the virtual OCF server. The resource subscription request includes the resource address of the first OCF resource to be subscribed.

[0162] For example, the OCF client knows that the resource is subscribable according to the resource access policy of the first OCF resource. If the OCF client wants to subscribe to the first OCF resource, it sends a resource subscription request carrying the resource address / ep / 1 / cluster / 6 / a / 9 / a / 10 of the first OCF resource to the virtual OCF server. In addition, the resource subscription request may also include subscription operation indication information, which is used to indicate that the operation to be performed on the first OCF resource is a subscription operation.

[0163] Step 910, the virtual OCF server sends a resource address resolution request to the bridging function module, the resource address resolution request is used to request resolution of the resource address, the resource address resolution request includes the resource address to be resolved (ie, the resource address of the first OCF resource mentioned above), and may carry subscription operation indication information.

[0164] Step 911: The bridging function module determines identification information of the cluster attribute corresponding to the resource address to be resolved, and then determines that a subscription operation needs to be performed on the cluster attribute according to the subscription operation indication information.

[0165] For example, the resource address resolution request includes the resource address of the first OCF resource / ep / 1 / cluster / 6 / a / 9 / a / 10 and the subscription operation instruction information. Based on this, the bridging function module determines that it is necessary to subscribe to two cluster attributes (recorded as the first cluster attribute and the second cluster attribute) with id values ​​9 and 10 under Cluster 6 of the first Zigbee device Endpoint 1.

[0166] Step 912: The bridging function module sends a first configuration report execution request to the virtual Zigbee client, where the first configuration report execution request is used to request the virtual Zigbee client to send a first configuration report request to the first Zigbee device.

[0167] Step 913: The virtual Zigbee client sends a first configuration report request to the first Zigbee device, where the first configuration report request is used to request reporting configuration of a first cluster attribute of the first Zigbee device.

[0168] Step 914: The bridging function module sends a second configuration report execution request to the virtual Zigbee client, where the second configuration report execution request is used to request the virtual Zigbee client to send a second configuration report request to the first Zigbee device.

[0169] Step 915: The virtual Zigbee client sends a second configuration report request to the first Zigbee device, where the second configuration report request is used to request reporting configuration of a second cluster attribute of the first Zigbee device.

[0170] It should be noted that, since it is necessary to subscribe to the first cluster attribute and the second cluster attribute, in one example, a configuration report execution request is sent, and the configuration report execution request includes the identification information of the first cluster attribute, the identification information of the second cluster attribute, and the subscription operation indication information. In another example, two configuration report execution requests are sent, one of which includes the identification information of the first cluster attribute and the subscription operation indication information, and the other includes the identification information of the second cluster attribute and the subscription operation indication information.

[0171] Step 916: The first Zigbee device sends a first configuration result to the virtual Zigbee client, where the first configuration result is used to indicate whether the reporting configuration of the first cluster attribute is successfully completed.

[0172] Step 917: The virtual Zigbee client sends the first configuration result to the bridging function module.

[0173] Step 918: The bridging function module sends the first configuration result to the virtual OCF server.

[0174] Step 919: If the first configuration result indicates that the reporting configuration of the first cluster attribute is successfully completed, it means that the resource attribute corresponding to the first cluster attribute under the first OCF resource is subscribed successfully, and the virtual OCF server stores the first configuration result.

[0175] Step 920: The first Zigbee device sends a second configuration result to the virtual Zigbee client, where the second configuration result is used to indicate whether the reporting configuration of the second cluster attribute is successfully completed.

[0176] Step 921: The virtual Zigbee client sends a second configuration result to the bridging function module.

[0177] Step 922: The bridging function module sends the second configuration result to the virtual OCF server.

[0178] Step 923: If the second configuration result indicates that the reporting configuration of the second cluster attribute is successfully completed, it means that the resource attribute corresponding to the second cluster attribute under the first OCF resource is subscribed successfully, and the virtual OCF server stores the second configuration result.

[0179] Step 924: The virtual OCF server sends a resource subscription success response to the OCF client.

[0180] Step 925: If the subscription to the first OCF resource fails, the subscription operation of each cluster attribute under the first OCF resource is canceled.

[0181] One point that needs to be explained is that, in the case where the OCF resource that needs to be subscribed corresponds to multiple cluster attributes, in one example, if the OCF resource corresponds to multiple cluster attributes and all of them are subscribed successfully, the OCF resource is considered to be subscribed successfully; otherwise, if the OCF resource corresponds to multiple cluster attributes and at least one of them fails to be subscribed, the OCF resource is considered to be subscribed unsuccessfully. In another example, if the OCF resource corresponds to multiple cluster attributes and at least one of them is subscribed successfully, the OCF resource is considered to be subscribed successfully; otherwise, if the OCF resource corresponds to multiple cluster attributes and all of them fail to be subscribed, the OCF resource is considered to be subscribed unsuccessfully.

[0182] Step 926: The virtual OCF server sends a resource subscription failure response to the OCF client.

[0183] Step 927, when the attribute value of the first cluster attribute of the first Zigbee device is updated, if the reporting condition is met, the first Zigbee device sends first cluster attribute update information to the virtual Zigbee client, and the first cluster attribute update information may include the identification information and updated attribute value of the first cluster attribute.

[0184] Step 928: The virtual Zigbee client sends first cluster attribute update information to the bridging function module.

[0185] Step 929, the bridging function module finds the resource address of the corresponding first OCF resource from the mapping relationship according to the identification information of the first cluster attribute, and then sends the first resource attribute update information to the virtual OCF server, wherein the first resource attribute update information includes the resource address of the first OCF resource and the updated attribute value of its resource attribute.

[0186] Step 930: The virtual OCF server updates the resource attribute corresponding to the first cluster attribute under the first OCF resource.

[0187] Step 931: The virtual OCF server sends first resource attribute update information to the OCF client.

[0188] Step 932: When the attribute value of the second cluster attribute of the first Zigbee device is updated, if the reporting condition is met, the first Zigbee device sends second cluster attribute update information to the virtual Zigbee client, and the second cluster attribute update information may include identification information and updated attribute value of the second cluster attribute.

[0189] Step 933: The virtual Zigbee client sends the second cluster attribute update information to the bridging function module.

[0190] Step 934, the bridging function module finds the resource address of the corresponding first OCF resource from the mapping relationship according to the identification information of the second cluster attribute, and then sends second resource attribute update information to the virtual OCF server, wherein the second resource attribute update information includes the resource address of the first OCF resource and the updated attribute value of its resource attribute.

[0191] Step 935: The virtual OCF server updates the resource attributes corresponding to the second cluster attributes under the first OCF resource.

[0192] Step 936: The virtual OCF server sends second resource attribute update information to the OCF client.

[0193] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0194] Please refer to Fig.10 , which shows a block diagram of a property subscription device for a Zigbee device provided by an embodiment of the present application. The device has the function of implementing the method example on the gateway device side described above, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the gateway device described above, or it can be set in the gateway device. Fig.10 As shown, the device 1000 may include: a subscription request receiving module 1010 and a configuration request sending module 1020.

[0195] The subscription request receiving module 1010 is used to receive a resource subscription request sent by an OCF client, wherein the resource subscription request is a request for the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped to a first Zigbee device.

[0196] The configuration request sending module 1020 is used to send a configuration report request to the first Zigbee device. The configuration report request is a request for the gateway device to report the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0197] In an exemplary embodiment, the resource subscription request includes:

[0198] a resource address of the first OCF resource;

[0199] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0200] In an exemplary embodiment, the device 1000 further includes: a subscription request parsing module and a resource address mapping module ( Fig.10 not shown).

[0201] The subscription request parsing module is used to parse the resource subscription request to obtain the resource address of the first OCF resource and the subscription operation indication information.

[0202] The resource address mapping module is used to map the resource address of the first OCF resource to identification information of the cluster attribute of the first service cluster.

[0203] The configuration report request includes identification information of cluster attributes of the first service cluster.

[0204] In an exemplary embodiment, the device 1000 further includes: a cluster attribute determination module, a resource address generation module, and an access policy setting module ( Fig.10 not shown).

[0205] The cluster attribute determination module is used to determine the cluster attributes with reportable capabilities under the first service cluster of the first Zigbee device.

[0206] The resource address generation module is used to generate an OCF resource address corresponding to the cluster attribute with reportability.

[0207] The access policy setting module is used to create an OCF resource based on the OCF resource address and set the resource access policy of the OCF resource to be subscribable.

[0208] In an exemplary embodiment, there is a one-to-one mapping relationship between the OCF resource address and the cluster attribute.

[0209] In an exemplary embodiment, there is a one-to-many mapping relationship between the OCF resource address and the cluster attribute.

[0210] In an exemplary embodiment, the same OCF resource address is mapped to multiple cluster attributes belonging to the same service cluster.

[0211] In an exemplary embodiment, the device 1000 further includes: an update information receiving module, an update information generating module and an update information sending module ( Fig.10 not shown).

[0212] The update information receiving module is used to receive cluster attribute update information sent by the first Zigbee device, where the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster.

[0213] The update information generation module is used to generate resource attribute update information based on the updated attribute value of the cluster attribute of the first service cluster, wherein the resource attribute update information includes the updated attribute value of the resource attribute of the first OCF resource.

[0214] The update information sending module is used to send the resource attribute update information to the OCF client.

[0215] Please refer to Fig.11 , which shows a block diagram of a property subscription device for a Zigbee device provided by another embodiment of the present application. The device has the function of implementing the method example of the above OCF client side, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be the terminal described above, or it can be set in the terminal. Fig.11 As shown, the device 1100 may include: a subscription request sending module 1110.

[0216] The subscription request sending module 1110 is used to send a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to the resource attribute of the first OCF resource of the first OCF device, and the first OCF device is a virtual OCF device mapped by the first Zigbee device.

[0217] Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0218] In an exemplary embodiment, the resource subscription request includes:

[0219] a resource address of the first OCF resource;

[0220] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0221] In an exemplary embodiment, the configuration report request includes identification information of cluster attributes of the first service cluster;

[0222] There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

[0223] In an exemplary embodiment, the device 1100 further includes: an update information receiving module and a resource attribute updating module ( Fig.11 not shown).

[0224] An update information receiving module is used to receive resource attribute update information sent by the gateway device, wherein the resource attribute update information includes updated attribute values ​​of the resource attributes of the first OCF resource; wherein the updated attribute values ​​of the resource attributes of the first OCF resource are determined based on the updated attribute values ​​of the cluster attributes of the first service cluster.

[0225] The resource attribute updating module is used to update the attribute value of the resource attribute of the first OCF resource based on the updated attribute value of the resource attribute of the first OCF resource.

[0226] Please refer to Fig.12 , which shows a block diagram of a property subscription device for a Zigbee device provided by another embodiment of the present application. The device has the function of implementing the method example of the first Zigbee device side mentioned above, and the function can be implemented by hardware, or by hardware executing corresponding software. The device can be the Zigbee device introduced above, or it can be set in a Zigbee device. Fig.12 As shown, the device 1200 may include: a configuration request receiving module 1210.

[0227] The configuration request receiving module 1210 is used to receive a configuration report request sent by a gateway device, where the configuration report request is a request for the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device.

[0228] Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0229] In an exemplary embodiment, the resource subscription request includes:

[0230] a resource address of the first OCF resource;

[0231] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0232] In an exemplary embodiment, the configuration report request includes identification information of cluster attributes of the first service cluster;

[0233] There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

[0234] In an exemplary embodiment, the device further includes: an update information sending module ( Fig.12 not shown).

[0235] The update information sending module is used to send cluster attribute update information to the gateway device, where the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster.

[0236] The updated attribute value of the cluster attribute of the first service cluster is converted into the updated attribute value of the resource attribute of the first OCF resource and then sent to the OCF client.

[0237] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0238] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0239] Please refer to Fig.13 , which shows a schematic diagram of the structure of a gateway device 130 provided by an embodiment of the present application. The gateway device 130 can be used to implement the attribute subscription method of the Zigbee device on the gateway device side. The gateway device 130 may include: a processor 131, a receiver 132, a transmitter 133, a memory 134 and a bus 135.

[0240] The processor 131 includes one or more processing cores. The processor 131 executes various functional applications and information processing by running software programs and modules.

[0241] The receiver 132 and the transmitter 133 may be implemented as a communication component, which may be a communication chip.

[0242] The memory 134 is connected to the processor 131 via a bus 135 .

[0243] The memory 134 may be used to store a computer program, and the processor 131 may be used to execute the computer program to implement each step performed by the gateway device in the above method embodiment.

[0244] In addition, the memory 134 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the volatile or non-volatile storage device includes but is not limited to: a magnetic disk or an optical disk, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a static random access memory (SRAM), a read-only memory (ROM), a magnetic memory, a flash memory, and a programmable read-only memory (PROM).

[0245] In an exemplary embodiment, the gateway device includes a processor, a memory, and a transceiver (the transceiver may include a receiver and a transmitter, the receiver is used to receive information, and the transmitter is used to send information);

[0246] The transceiver is used to receive a resource subscription request sent by an OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0247] The transceiver is further used to send a configuration report request to the first Zigbee device, where the configuration report request is a request for the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0248] In an exemplary embodiment, the resource subscription request includes:

[0249] a resource address of the first OCF resource;

[0250] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0251] In an exemplary embodiment, the processor is configured to:

[0252] Parsing the resource subscription request to obtain the resource address of the first OCF resource and the subscription operation indication information;

[0253] Mapping the resource address of the first OCF resource to identification information of cluster attributes of the first service cluster;

[0254] The configuration report request includes identification information of cluster attributes of the first service cluster.

[0255] In an exemplary embodiment, the processor is further configured to:

[0256] Determine a cluster attribute having a reportable capability under a first service cluster of the first Zigbee device;

[0257] Generating an OCF resource address corresponding to the reportable cluster attribute;

[0258] An OCF resource is created based on the OCF resource address, and a resource access policy of the OCF resource is set to be subscribable.

[0259] In an exemplary embodiment, there is a one-to-one mapping relationship between the OCF resource address and the cluster attribute.

[0260] In an exemplary embodiment, there is a one-to-many mapping relationship between the OCF resource address and the cluster attribute.

[0261] In an exemplary embodiment, the same OCF resource address is mapped to multiple cluster attributes belonging to the same service cluster.

[0262] In an exemplary embodiment, the transceiver is further configured to receive cluster attribute update information sent by the first Zigbee device, wherein the cluster attribute update information includes an updated attribute value of a cluster attribute of the first service cluster;

[0263] The processor is configured to generate resource attribute update information based on the updated attribute value of the cluster attribute of the first service cluster, wherein the resource attribute update information includes the updated attribute value of the resource attribute of the first OCF resource;

[0264] The transceiver is further configured to send the resource attribute update information to the OCF client.

[0265] Please refer to Fig.14 , which shows a schematic diagram of the structure of a terminal 140 provided by an embodiment of the present application. The terminal 140 can be used to implement the attribute subscription method of the Zigbee device on the OCF client side. The terminal 140 may include: a processor 141, a receiver 142, a transmitter 143, a memory 144 and a bus 145.

[0266] The processor 141 includes one or more processing cores. The processor 141 executes various functional applications and information processing by running software programs and modules.

[0267] The receiver 142 and the transmitter 143 may be implemented as a communication component, which may be a communication chip.

[0268] The memory 144 is connected to the processor 141 via a bus 145 .

[0269] The memory 144 may be used to store a computer program, and the processor 141 may be used to execute the computer program to implement the various steps performed by the OCF client in the above method embodiment.

[0270] In addition, the memory 144 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the volatile or non-volatile storage device includes but is not limited to: a magnetic disk or an optical disk, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a static random access memory (SRAM), a read-only memory (ROM), a magnetic memory, a flash memory, and a programmable read-only memory (PROM).

[0271] In an exemplary embodiment, the terminal includes a processor, a memory, and a transceiver (the transceiver may include a receiver and a transmitter, the receiver is used to receive information, and the transmitter is used to send information);

[0272] The transceiver is used to send a resource subscription request to the terminal, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device;

[0273] Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

[0274] In an exemplary embodiment, the resource subscription request includes:

[0275] a resource address of the first OCF resource;

[0276] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0277] In an exemplary embodiment, the configuration report request includes identification information of cluster attributes of the first service cluster;

[0278] There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

[0279] In an exemplary embodiment, the transceiver is further used to receive resource attribute update information sent by the gateway device, wherein the resource attribute update information includes an updated attribute value of a resource attribute of the first OCF resource; wherein the updated attribute value of the resource attribute of the first OCF resource is determined based on an updated attribute value of a cluster attribute of the first service cluster;

[0280] The processor is configured to update an attribute value of a resource attribute of the first OCF resource based on an updated attribute value of the resource attribute of the first OCF resource.

[0281] Please refer to Fig.15 , which shows a schematic diagram of the structure of a Zigbee device 150 provided by an embodiment of the present application. The Zigbee device 150 can be used to implement the attribute subscription method of the Zigbee device on the first Zigbee device side. The Zigbee device 150 may include: a processor 151, a receiver 152, a transmitter 153, a memory 154 and a bus 155.

[0282] The processor 151 includes one or more processing cores. The processor 151 executes various functional applications and information processing by running software programs and modules.

[0283] The receiver 152 and the transmitter 153 may be implemented as a communication component, which may be a communication chip.

[0284] The memory 154 is connected to the processor 151 via a bus 155 .

[0285] The memory 154 may be used to store a computer program, and the processor 151 may be used to execute the computer program to implement each step performed by the first Zigbee device in the above method embodiment.

[0286] In addition, the memory 154 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the volatile or non-volatile storage device includes but is not limited to: a magnetic disk or an optical disk, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a static random access memory (SRAM), a read-only memory (ROM), a magnetic memory, a flash memory, and a programmable read-only memory (PROM).

[0287] In an exemplary embodiment, the Zigbee device includes a processor, a memory, and a transceiver (the transceiver may include a receiver and a transmitter, the receiver is used to receive information, and the transmitter is used to send information);

[0288] The transceiver is used to receive a configuration report request sent by a gateway device, where the configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device;

[0289] Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

[0290] In an exemplary embodiment, the resource subscription request includes:

[0291] a resource address of the first OCF resource;

[0292] The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

[0293] In an exemplary embodiment, the configuration report request includes identification information of cluster attributes of the first service cluster;

[0294] There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

[0295] In an exemplary embodiment, the transceiver is further configured to send cluster attribute update information to the gateway device, wherein the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster;

[0296] The updated attribute value of the cluster attribute of the first service cluster is converted into the updated attribute value of the resource attribute of the first OCF resource and then sent to the OCF client.

[0297] An exemplary embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a processor of a gateway device to implement the attribute subscription method of the Zigbee device on the gateway device side.

[0298] An exemplary embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be executed by a processor of a terminal to implement the attribute subscription method of a Zigbee device on the OCF client side.

[0299] An exemplary embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program is used to be executed by a processor of a Zigbee device to implement the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0300] An exemplary embodiment of the present application further provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a gateway device, it is used to implement the attribute subscription method of the Zigbee device on the gateway device side.

[0301] An exemplary embodiment of the present application further provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a terminal, it is used to implement the attribute subscription method of the Zigbee device on the OCF client side.

[0302] An exemplary embodiment of the present application further provides a chip, which includes a programmable logic circuit and / or program instructions. When the chip runs on a Zigbee device, it is used to implement the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0303] An exemplary embodiment of the present application further provides a computer program product. When the computer program product is run on a gateway device, the gateway device executes the attribute subscription method of the Zigbee device on the gateway device side.

[0304] An exemplary embodiment of the present application further provides a computer program product. When the computer program product is executed on a terminal, the terminal executes the above-mentioned method for subscribing to properties of a Zigbee device on the OCF client side.

[0305] An exemplary embodiment of the present application further provides a computer program product. When the computer program product is run on a Zigbee device, the Zigbee device executes the attribute subscription method of the Zigbee device on the first Zigbee device side.

[0306] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0307] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for subscribing to properties of a Zigbee device, characterized in that: Applied to a gateway device, the method comprises: Determine a cluster attribute having a reportable capability under a first service cluster of a first Zigbee device; Generating an OCF resource address corresponding to the reportable cluster attribute; Creating an OCF resource based on the OCF resource address, and setting a resource access policy of the OCF resource to be subscribable; Receive a device resource acquisition request sent by an OCF client, where the device resource acquisition request is used to request to obtain relevant information of the OCF resource created by the gateway device, where the relevant information of the OCF resource includes a resource address and a resource access policy of each of the OCF resources created by the gateway device; Sending relevant information of the OCF resource to the OCF client; Receive a resource subscription request sent by the OCF client, where the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, where the first OCF device is a virtual OCF device mapped by the first Zigbee device, and the first OCF resource is a subscribable OCF resource; A configuration report request is sent to the first Zigbee device, where the configuration report request is a request by the gateway device to report and configure cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

2. The method according to claim 1, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

3. The method according to claim 2, characterized in that After receiving the resource subscription request sent by the OCF client, the method further includes: Parsing the resource subscription request to obtain the resource address of the first OCF resource and the subscription operation indication information; Mapping the resource address of the first OCF resource to identification information of cluster attributes of the first service cluster; The configuration report request includes identification information of cluster attributes of the first service cluster.

4. The method according to any one of claims 1 to 3, characterized in that: There is a one-to-one mapping relationship between the OCF resource address and the cluster attribute.

5. The method according to any one of claims 1 to 3, characterized in that: There is a one-to-many mapping relationship between the OCF resource address and the cluster attribute.

6. The method according to claim 5, characterized in that The same OCF resource address is mapped to multiple cluster attributes belonging to the same service cluster.

7. The method according to any one of claims 1 to 6, characterized in that: After sending the configuration report request to the first Zigbee device, the method further includes: Receiving cluster attribute update information sent by the first Zigbee device, wherein the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster; Generate resource attribute update information based on the updated attribute value of the cluster attribute of the first service cluster, wherein the resource attribute update information includes the updated attribute value of the resource attribute of the first OCF resource; Send the resource attribute update information to the OCF client.

8. A method for subscribing to properties of a Zigbee device, characterized in that: Applied to an OCF client, the method includes: Send a device resource acquisition request to a gateway device, the device resource acquisition request is used to request to obtain relevant information of the OCF resources created by the gateway device, the relevant information of the OCF resources includes the resource address and resource access policy of each of the OCF resources created by the gateway device, the OCF resources are created by the gateway device based on the OCF resource address, the OCF resource address is the OCF resource address corresponding to the cluster attribute with reportable capability generated after the gateway device determines the cluster attribute with reportable capability under the first service cluster of the first Zigbee device, and the resource access policy of the OCF resource is set by the gateway device to be subscribed; Receiving relevant information of the OCF resource sent by the gateway device; Sending a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device, and the first OCF resource is a subscribable OCF resource; Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

9. The method according to claim 8, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

10. The method according to claim 9, characterized in that The configuration report request includes identification information of cluster attributes of the first service cluster; There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

11. The method according to any one of claims 9 to 10, characterized in that: After sending the resource subscription request to the gateway device, the method further includes: Receiving resource attribute update information sent by the gateway device, the resource attribute update information including an updated attribute value of a resource attribute of the first OCF resource; wherein the updated attribute value of the resource attribute of the first OCF resource is determined based on an updated attribute value of a cluster attribute of the first service cluster; Based on the updated attribute value of the resource attribute of the first OCF resource, the attribute value of the resource attribute of the first OCF resource is updated.

12. A method for subscribing to properties of a Zigbee device, characterized in that: Applied to a first Zigbee device, the method comprises: Receiving a configuration report request sent by a gateway device, where the configuration report request is a request by the gateway device to report and configure cluster attributes of a first service cluster of the first Zigbee device; Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device, the first OCF device is a virtual OCF device mapped by the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster, and the first OCF resource is an OCF resource that can be subscribed.

13. The method according to claim 12, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

14. The method according to claim 13, characterized in that The configuration report request includes identification information of cluster attributes of the first service cluster; There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

15. The method according to any one of claims 12 to 14, characterized in that After receiving the configuration report request sent by the gateway device, the method further includes: Sending cluster attribute update information to the gateway device, wherein the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster; The updated attribute value of the cluster attribute of the first service cluster is converted into the updated attribute value of the resource attribute of the first OCF resource and then sent to the OCF client.

16. A property subscription device for a Zigbee device, characterized in that: The device comprises: A cluster attribute determination module, used to determine a cluster attribute with reportable capability under a first service cluster of a first Zigbee device; A resource address generation module, used to generate an OCF resource address corresponding to the cluster attribute with reportable capability; An access policy setting module, used to create an OCF resource based on the OCF resource address, and set the resource access policy of the OCF resource to be subscribable; A subscription request receiving module, configured to receive a device resource acquisition request sent by an OCF client, wherein the device resource acquisition request is used to request to obtain relevant information of the OCF resource created by a gateway device, wherein the relevant information of the OCF resource includes a resource address and a resource access policy of each OCF resource created by the gateway device; send relevant information of the OCF resource to the OCF client; receive a resource subscription request sent by the OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by the first Zigbee device, and the first OCF resource is an OCF resource that can be subscribed to; The configuration request sending module is used to send a configuration report request to the first Zigbee device, wherein the configuration report request is a request for the gateway device to report the cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

17. The device according to claim 16, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

18. The device according to claim 17, characterized in that The device also includes: A subscription request parsing module, used to parse the resource subscription request to obtain the resource address of the first OCF resource and the subscription operation indication information; A resource address mapping module, used to map the resource address of the first OCF resource to identification information of cluster attributes of the first service cluster; The configuration report request includes identification information of cluster attributes of the first service cluster.

19. The device according to any one of claims 16 to 18, characterized in that There is a one-to-one mapping relationship between the OCF resource address and the cluster attribute.

20. The device according to any one of claims 16 to 18, characterized in that There is a one-to-many mapping relationship between the OCF resource address and the cluster attribute.

21. The device according to claim 20, characterized in that The same OCF resource address is mapped to multiple cluster attributes belonging to the same service cluster.

22. The device according to any one of claims 16 to 21, characterized in that The device also includes: An update information receiving module, configured to receive cluster attribute update information sent by the first Zigbee device, wherein the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster; An update information generation module, configured to generate resource attribute update information based on the updated attribute value of the cluster attribute of the first service cluster, wherein the resource attribute update information includes the updated attribute value of the resource attribute of the first OCF resource; The update information sending module is used to send the resource attribute update information to the OCF client.

23. A property subscription device for a Zigbee device, characterized in that: The device comprises: Send a device resource acquisition request to a gateway device, the device resource acquisition request is used to request to obtain relevant information of the OCF resources created by the gateway device, the relevant information of the OCF resources includes the resource address and resource access policy of each of the OCF resources created by the gateway device, the OCF resources are created by the gateway device based on the OCF resource address, the OCF resource address is the OCF resource address corresponding to the cluster attribute with reportable capability generated after the gateway device determines the cluster attribute with reportable capability under the first service cluster of the first Zigbee device, and the resource access policy of the OCF resource is set by the gateway device to be subscribed; Receiving relevant information of the OCF resource sent by the gateway device; A subscription request sending module, configured to send a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device, and the first OCF resource is an OCF resource that can be subscribed to; Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

24. The device according to claim 23, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

25. The device according to claim 24, characterized in that The configuration report request includes identification information of cluster attributes of the first service cluster; There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

26. The device according to any one of claims 23 to 25, characterized in that The device also includes: An update information receiving module, configured to receive resource attribute update information sent by the gateway device, wherein the resource attribute update information includes an updated attribute value of a resource attribute of the first OCF resource; wherein the updated attribute value of the resource attribute of the first OCF resource is determined based on an updated attribute value of a cluster attribute of the first service cluster; The resource attribute updating module is used to update the attribute value of the resource attribute of the first OCF resource based on the updated attribute value of the resource attribute of the first OCF resource.

27. A property subscription device for a Zigbee device, characterized in that: The device comprises: A configuration request receiving module, configured to receive a configuration report request sent by a gateway device, wherein the configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device; Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device, the first OCF device is a virtual OCF device mapped by the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster, and the first OCF resource is an OCF resource that can be subscribed.

28. The device according to claim 27, characterized in that The resource subscription request includes: a resource address of the first OCF resource; The subscription operation indication information is used to indicate to perform a subscription operation on the resource attribute of the first OCF resource.

29. The device according to claim 28, characterized in that The configuration report request includes identification information of cluster attributes of the first service cluster; There is a mapping relationship between the resource address of the first OCF resource and the identification information of the cluster attribute of the first service cluster.

30. The device according to any one of claims 27 to 29, characterized in that The device also includes: An update information sending module, configured to send cluster attribute update information to the gateway device, wherein the cluster attribute update information includes an updated attribute value of the cluster attribute of the first service cluster; The updated attribute value of the cluster attribute of the first service cluster is converted into the updated attribute value of the resource attribute of the first OCF resource and then sent to the OCF client.

31. A gateway device, characterized in that: The gateway device includes a processor, a memory and a transceiver; The processor is used to determine a cluster attribute with reportable capability under a first service cluster of a first Zigbee device; generate an OCF resource address corresponding to the cluster attribute with reportable capability; create an OCF resource based on the OCF resource address, and set a resource access policy of the OCF resource to be subscribable; The transceiver is used to receive a device resource acquisition request sent by an OCF client, wherein the device resource acquisition request is used to request to obtain relevant information of the OCF resource created by the gateway device, and the relevant information of the OCF resource includes a resource address and a resource access policy of each OCF resource created by the gateway device; The transceiver is further used to send the relevant information of the OCF resource to the OCF client; The transceiver is further configured to receive a resource subscription request sent by the OCF client, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by the first Zigbee device, and the first OCF resource is an OCF resource that can be subscribed; The transceiver is further used to send a configuration report request to the first Zigbee device, where the configuration report request is a request for the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

32. A terminal, characterized in that: The terminal is installed and running with an OCF client, and the terminal includes a processor, a memory and a transceiver; The transceiver is used to send a device resource acquisition request to the gateway device, the device resource acquisition request is used to request to obtain relevant information of the OCF resources created by the gateway device, the relevant information of the OCF resources includes the resource address and resource access policy of each of the OCF resources created by the gateway device, the OCF resources are created by the gateway device based on the OCF resource address, the OCF resource address is the OCF resource address corresponding to the cluster attribute with reportable capability generated after the gateway device determines the cluster attribute with reportable capability under the first service cluster of the first Zigbee device, and the resource access policy of the OCF resource is set by the gateway device to be subscribed; The transceiver is further configured to receive the relevant information of the OCF resource sent by the gateway device; The transceiver is further used to send a resource subscription request to the gateway device, wherein the resource subscription request is a request by the OCF client to subscribe to a resource attribute of a first OCF resource of a first OCF device, wherein the first OCF device is a virtual OCF device mapped by a first Zigbee device, and the first OCF resource is an OCF resource that can be subscribed; Among them, the resource subscription request is converted into a configuration report request and then sent to the first Zigbee device. The configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device. There is a mapping relationship between the first OCF resource and the first service cluster.

33. A Zigbee device, characterized in that: The Zigbee device includes a processor, a memory and a transceiver; The transceiver is used to receive a configuration report request sent by a gateway device, where the configuration report request is a request by the gateway device to report and configure the cluster attributes of the first service cluster of the first Zigbee device; Among them, the configuration report request is converted from a resource subscription request, and the resource subscription request is a request for the OCF client to subscribe to the resource attributes of the first OCF resource of the first OCF device. The first OCF device is a virtual OCF device mapped to the first Zigbee device, and there is a mapping relationship between the first OCF resource and the first service cluster.

34. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to be executed by a processor to implement the attribute subscription method of a Zigbee device as described in any one of claims 1 to 7.

35. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to be executed by a processor to implement the attribute subscription method of a Zigbee device as described in any one of claims 8 to 11.

36. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to be executed by a processor to implement the attribute subscription method of a Zigbee device as described in any one of claims 12 to 15.

Citation Information

Patent Citations

  • Method and device for changing subscription resources

    CN106657227A

  • Method, device and medium for achieving notification of equipment state information

    CN108600295A

  • Internet of Things equipment interoperation scheduling method

    CN108848159A

  • Resource synchronization method and device, equipment, and storage medium

    CN111629018A

  • Cluster Based Communication

    US20160014712A1