CN115968543A - Resource mapping method, device, equipment and storage medium - Google Patents

Resource mapping method, device, equipment and storage medium Download PDF

Info

Publication number
CN115968543A
CN115968543A CN202080103386.2A CN202080103386A CN115968543A CN 115968543 A CN115968543 A CN 115968543A CN 202080103386 A CN202080103386 A CN 202080103386A CN 115968543 A CN115968543 A CN 115968543A
Authority
CN
China
Prior art keywords
ocf
resource
identification information
padding
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202080103386.2A
Other languages
Chinese (zh)
Inventor
包永明
张军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115968543A publication Critical patent/CN115968543A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Abstract

The application discloses a resource mapping method, device, equipment and storage medium, and relates to the technical field of Internet of things. The method comprises the following steps: creating first OCF equipment corresponding to first physical equipment, wherein the first physical equipment is equipment based on a target communication protocol, and the first OCF equipment is virtual OCF equipment mapped by the first physical equipment; creating a first OCF resource based on a mapping relation between the first OCF device and the first physical device, wherein the first OCF resource and a first object in the first physical device have a mapping relation; and generating and storing a resource address of the first OCF resource, wherein the resource address of the first OCF resource is used for determining a first object having a mapping relation with the first OCF resource. The method and the device specify the relation between the OCF resource address and the object under the target communication protocol, thereby enhancing the capability of interconnection and intercommunication between the OCF protocol and other standard protocols.

Description

Resource mapping method, device, equipment and storage medium Technical Field
The embodiment of the application relates to the technical field of internet of things, in particular to a resource mapping method, device, equipment and storage medium.
Background
The integration of the Internet of things (IOT) with Artificial Intelligence (AI) is becoming more and more compact. 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 both are working together to advance the Internet of things to intelligent networking (Internet of Intelligences).
The OCF standard supports search and communication between intelligent devices without being restricted by manufacturers, operating systems, chips or physical transmission, and provides technical specifications for realizing seamless connection between various physical medium layers, transmission layers and application layer devices. The OCF has flexible and wide application scenes: firstly, an OCF Client (Client) (such as a mobile phone application) and an OCF device (Server) (such as an air conditioner) can interact, for example, the information of the on-off, the temperature, the mode and the like of the air conditioner can be acquired and set by using the mobile phone application; secondly, a plurality of OCF clients can control OCF equipment at the same time, for example, a user can flexibly control the same equipment at home through a smart phone, a smart television and a smart sound box; again, by Bridging (Bridging), the OCF client can interact with other standard devices, such as bluetooth, zigbee (Zigbee), etc.; finally, the OCF device may also be controlled by other standard clients through bridging.
However, at present, interaction schemes between the OCF client and other standard devices are still under further study.
Disclosure of Invention
The embodiment of the application provides a resource mapping method, a resource mapping device and a storage medium. The technical scheme is as follows:
according to an aspect of an embodiment of the present application, there is provided a resource mapping method applied to a gateway device, the method including:
creating a first OCF device corresponding to a first physical device, wherein the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
creating a first OCF resource based on a mapping relation between the first OCF device and the first physical device, wherein the first OCF resource and a first object in the first physical device have a mapping relation;
and generating and storing a resource address of the first OCF resource, wherein the resource address of the first OCF resource is used for determining the first object having a mapping relation with the first OCF resource.
According to an aspect of an embodiment of the present application, there is provided a resource mapping apparatus, including:
the device creating module is configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
a resource creating module, configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
and the address generating module is used for generating and storing a resource address of the first OCF resource, wherein the resource address of the first OCF resource is used for determining the first object having a mapping relation with the first OCF resource.
According to an aspect of an embodiment of the present application, there is provided a gateway device, including a processor, a memory, and a transceiver;
the processor is configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
the processor is further configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
the processor is further configured to generate and store a resource address of the first OCF resource, where the resource address of the first OCF resource is used to determine the first object having a mapping relationship with the first OCF resource.
According to an aspect of the embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored therein, the computer program being for execution by a processor to implement the above-mentioned resource mapping method.
According to an aspect of the embodiments of the present application, there is provided a chip, which includes a programmable logic circuit and/or program instructions, and is configured to implement the above resource mapping method when the chip runs on a gateway device.
According to an aspect of the embodiments of the present application, there is provided a computer program product, which, when run on a gateway device, causes the gateway device to perform the above-mentioned resource mapping method.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
the method comprises the steps of establishing a mapping relation between a first OCF resource and a first object in first physical equipment through gateway equipment, generating and storing a resource address of the first OCF resource, determining the first object having the mapping relation with the first OCF resource, and defining the relation between the OCF resource address and an object under a target communication protocol, thereby enhancing the interconnection and intercommunication capacity between the OCF protocol and other standard protocols.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic diagram of a device model structure of a Zigbee device according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating an implementation of interaction between an OCF client and a Zigbee device through a bridge platform according to an embodiment of the present application;
fig. 3 is a schematic diagram of a device model structure of a BLE mesh device according to an embodiment of the present application;
figure 4 is a schematic diagram illustrating an interaction between an OCF client and a BLE mesh device implemented by a bridge platform according to an embodiment of the present application;
FIG. 5 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
fig. 6 is a block diagram of a gateway device according to an embodiment of the present application;
FIG. 7 is a flowchart of a resource mapping method according to an embodiment of the present application;
FIG. 8 is a flow diagram of a resource mapping method provided by another embodiment of the present application;
FIG. 9 is a flowchart of a resource mapping method according to another embodiment of the present application;
FIG. 10 is a flow diagram of a resource mapping method provided by another embodiment of the present application;
fig. 11 is a block diagram of a resource mapping apparatus according to an embodiment of the present application;
fig. 12 is a block diagram of a gateway device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The Zigbee is a wireless network protocol for low-speed short-distance transmission, has the performances of high capacity, low time delay, low power consumption, high safety, high stability and the like, can carry full-class equipment, and provides stable and safe local area network communication for compound intelligent scenes such as full-house intelligence, hotel apartments, home decoration of local products, intelligent office and the like.
Fig. 1 shows a schematic diagram of a device model structure of a Zigbee device. After accessing a network, a Zigbee device becomes a Node (Node) in the Zigbee network, where the Node may have multiple endpoints (endpoints), each Endpoint may have multiple service clusters (Server clusters, referred to as "clusters" for short), and multiple attributes (attributes) may exist below each Cluster, and each Attribute has its own Data Type and Data content (Type & Data).
The OCF client may interact with the Zigbee device. Referring to fig. 2, it illustrates an interaction between an OCF client and a Zigbee device implemented by a bridge platform. The bridge platform 110 includes the following functional modules: a virtual OCF service 112, a Bridging Function (Bridging Function) 114, and a virtual Zigbee client 116. The OCF client 120 and the virtual OCF server 112 may communicate based on an OCF protocol, and the virtual Zigbee client 116 and the Zigbee device 130 may communicate based on a Zigbee protocol. For example, the Zigbee protocol may be a Zigbee3.0 protocol or may also be a Zigbee protocol of another existing version or a later evolved version, which is not limited in this embodiment of the present application.
The bridging function module 114 is used to implement conversion between the OCF protocol and the Zigbee protocol. For example, the role of the bridging function module 114 includes converting information based on the OCF protocol sent by the OCF client 120 into information based on the Zigbee protocol recognizable by the Zigbee device 130. In addition, the role of the bridging function module 114 may also include converting Zigbee protocol-based information sent by the Zigbee device 130 into OCF protocol-based information recognizable by the OCF client 120.
Optionally, the bridging function module 114 may establish a mapping relationship between the information based on the OCF protocol and the information based on the Zigbee protocol, so as to implement conversion between the information based on the OCF protocol and the information based on the Zigbee protocol. As shown in table one below, which illustrates a translation model between the Zigbee protocol and the OCF protocol.
Watch 1
Zigbee protocol Mapping count OCF protocol Mapping count
Node (Node) 1 OCF Device (OCF Device) 1
Service Cluster (Server Cluster) 1 OCF resources (OCF Resource) n
Attribute (Attribute) 1 OCF Resource Property (OCF Resource property) 1
From the first table, 3 sets of mapping relationships between the information based on the Zigbee protocol and the information based on the OCF protocol, and the mapping count of both sides in each set of mapping relationships can be obtained. The 3 sets of mapping relationships based on table one include: the mapping relation between the Node and the OCF Device is 1 to 1; a mapping relation between a service Cluster (Server Cluster) and an OCF Resource (OCF Resource), wherein the mapping relation is a mapping relation of 1 to n; the mapping relationship between the Attribute (Attribute) and the OCF Resource Attribute (OCF Resource property) is a 1-to-1 mapping relationship.
In the following, a translation model between the Zigbee protocol and the OCF protocol is described by taking a Zigbee device as an example of a color temperature lamp. As shown in table two below:
watch 2
Figure PCTCN2020123782-APPB-000001
Figure PCTCN2020123782-APPB-000002
BLE (Bluetooth Low Energy) has been widely used at present, compared with the older classic Bluetooth, to greatly reduce the power consumption of the device. BLE mesh (star networking) is a network support designed for intercommunication between large-scale nodes, with the aim of establishing a trusted secure network, fully interworking operation, mature ecology, satisfying industrial-level applications, and networking supporting large-scale node numbers. The BLE mesh works in a managed flood message propagation mode, so that the message propagation is very reliable and easy to expand, and the performance of the BLE mesh can meet the commercial and industrial markets.
Figure 3 shows a schematic diagram of a device model structure of a BLE mesh device. After being connected to a network, a BLE mesh device becomes a Node (Node) in the BLE mesh network, and the Node may have a plurality of elements (elements), and a plurality of service models (referred to as "models" for short) may exist under each Element, and a plurality of attributes (State, or referred to as "State") may exist under each Model, and each attribute has its own Data Type and Data content (Type & Data).
The OCF client can interact with the BLE mesh device. Referring to figure 4, it shows the interaction between an OCF client and a BLE mesh device implemented by a bridge platform. The bridge platform 110 includes the following functional modules: a virtual OCF server 112, a Bridging Function (Bridging Function) 114, and a virtual BLE mesh client 118. Communication between the OCF client 120 and the virtual OCF server 112 may be performed based on an OCF protocol, and communication between the virtual BLE mesh client 118 and the BLE mesh device 140 may be performed based on a BLE mesh protocol.
The bridge function module 114 is configured to implement conversion between the OCF protocol and the BLE mesh protocol. For example, the role of the bridging function module 114 includes converting information based on the OCF protocol sent by the OCF client 120 into information based on the BLE mesh protocol recognizable by the BLE mesh device 140. In addition, the role of the bridging function module 114 may also include converting the information based on the BLE mesh protocol transmitted by the BLE mesh device 140 into information based on the OCF protocol recognizable by the OCF client 120.
Optionally, the bridging function module 114 may establish a mapping relationship between the information based on the OCF protocol and the information based on the BLE mesh protocol, so as to implement conversion between the information based on the OCF protocol and the information based on the BLE mesh protocol. As shown in table three below, a translation model between BLE mesh protocol and OCF protocol is shown.
Watch III
BLE mesh protocol Mapping count OCF protocol Mapping count
Node (Node) 1 OCF equipment (OCF Device) 1
Service model(Server Model) 1 OCF resources (OCF Resource) 1
Property (State) 1 OCF Resource Property (OCF Resource property) 1
From the third table, 3 sets of mapping relationships between the information based on the BLE mesh protocol and the information based on the OCF protocol, and the mapping count of both sides in each set of mapping relationships can be obtained. The 3 sets of mapping relationships based on table three include: the mapping relation between the Node and the OCF Device is 1 to 1; a mapping relation between a service Model (Server Model) and an OCF Resource (OCF Resource), wherein the mapping relation is a mapping relation from 1 to 1; the mapping relationship between the attribute (State) and the OCF Resource attribute (OCF Resource property) is a 1-to-1 mapping relationship.
Next, a translation model between the BLE mesh protocol and the OCF protocol is described by taking a BLE mesh device as an example of a color temperature lamp. As shown in table four below:
watch four
Figure PCTCN2020123782-APPB-000003
Figure PCTCN2020123782-APPB-000004
The above translation Model between the Zigbee protocol and the OCF protocol, and the translation Model between the BLE mesh protocol and the OCF protocol only specify the mapping relationship between the OCF resource and the Zigbee Cluster (Cluster) and the BLE mesh Model (Model). In the embodiment of the application, the relationship between the address of the OCF resource and the Zigbee Cluster (Cluster) and the BLE mesh Model (Model) is specified, so that the capability of interconnection and intercommunication between the OCF protocol and other standard protocols is enhanced.
The technical solution of the present application will be described below by means of several embodiments.
Referring to fig. 5, a schematic diagram of an implementation environment provided in an embodiment of the present application is shown, where the implementation environment may include: a terminal 210, a Zigbee device/BLE mesh device 220, and a gateway device 230. The implementation environment may be an intelligent networked system.
The terminal 210 may include various handheld devices (e.g., mobile phones, tablet computers, etc.) having wireless communication functions, 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 Equipment (terminal device), and so on. For convenience of description, in the embodiments of the present application, the above-mentioned devices are collectively referred to as a terminal.
The Zigbee device/BLE mesh device 220 refers to an intelligent networking device with a network access capability under the Zigbee networking/BLE mesh networking, for example, the Zigbee device/BLE mesh device 220 may be an intelligent home device, a terminal device, or other devices with a network access capability, which is not limited in this embodiment of the present application. In an example, taking the implementation environment as a home intelligent networking system as an example, the Zigbee device/BLE mesh device 220 may be a smart television, a smart sound box, a smart air conditioner, a smart lamp, a smart door and window, a smart curtain, a smart socket, or other smart home devices.
Gateway device 230, also known as an internetwork connector, protocol converter, is a computer system or device that provides data conversion services across multiple networks. Between two systems or devices using different communication protocols, data formats or languages, even with completely different architectures, the gateway device is equivalent to a translator, and the gateway device can parse received information, repackage the information, and send the information to a destination system or a destination device, so as to meet the requirements of the destination system or the destination device, and meanwhile, the gateway device can also play a role in filtering and safety.
Taking an access process of the OCF client 211 to the Zigbee device/BLE mesh device 220 as an example, the gateway device 230 is connected to the terminal 210 and the Zigbee device/BLE mesh device 220, and the OCF client 211 is installed in the terminal 210, and the OCF client 211 can access the Zigbee device/BLE mesh device 220 through the gateway device 230. For example, a user sends an access request to the gateway device 230 by operating the OCF client 211 running on the terminal 210, where the access request is information based on the OCF protocol, the gateway device 230 converts the access request after receiving the access request, the converted access request is information based on the Zigbee protocol/BLE mesh protocol, and then the gateway device 230 sends the converted access request to the Zigbee device/BLE mesh device 220, thereby completing an access process of the OCF client 211 to the Zigbee device/BLE mesh device 220.
It should be noted that, in this embodiment of the application, "accessing" of the Zigbee device/BLE mesh device by the OCF client includes two manners, that is, "acquiring" means that the OCF client knows the state of the Zigbee device/BLE mesh device, and "setting" means that the OCF client selects, sets, updates, and the like the state of the Zigbee device/BLE mesh device. In addition, in the embodiment of the present application, "access" of the OCF client to the Zigbee device/BLE mesh device may also be referred to as "operation" of the OCF client to the Zigbee device/BLE mesh device, but those skilled in the art may understand the meaning of the operation.
Referring to fig. 6, a block diagram of a gateway device according to an embodiment of the present application is shown. As shown in fig. 6, the gateway device 300 includes a virtual OCF server 310, a bridging function module 320, and a virtual Zigbee client/virtual BLE mesh client 330.
The virtual OCF server 310 is a functional module in the gateway device 300 for interacting with the OCF client 301, and the virtual OCF server 310 interacts with the OCF client 301 based on an OCF protocol.
The virtual Zigbee client/virtual BLE mesh client 330 is a functional module in the gateway device 300 for interacting with the Zigbee device/BLE mesh device 302, and the virtual Zigbee client/virtual BLE mesh client 330 interacts with the Zigbee device/BLE mesh device 302 based on the Zigbee protocol/BLE mesh protocol. The Zigbee device/BLE mesh device 302 may serve as a Zigbee server/BLE mesh server, and receive an access request from the virtual Zigbee client/virtual BLE mesh client 330.
The bridging function module 320 is a function module in the gateway device 300 for implementing conversion between two different protocol messages, that is, the bridging function module 320 is configured to convert information based on the OCF protocol into information based on the Zigbee protocol/BLE mesh protocol, or convert information based on the Zigbee protocol/BLE mesh protocol into information based on the OCF protocol.
In one example, when the OCF client 301 initiates an access request to the Zigbee device/BLE mesh device 302, the OCF client 301 first sends a first access request to the gateway device 300, where the first access request is based on information of the OCF protocol, and then the virtual OCF server 310 in the gateway device 300 receives the first access request, the bridging function module 320 converts the first access request into a second access request, where the second access request is based on information of the Zigbee protocol/BLE mesh protocol, and then the virtual Zigbee client/virtual BLE mesh client 330 in the gateway device 300 sends the second access request to the Zigbee device/mesh device 302, so as to complete the access of the Zigbee device/mesh device 302 by the OCF client 301.
In addition, the gateway device 300 may also be referred to as a bridge platform, and is configured to implement an interaction function between the OCF client 301 and the Zigbee device/BLE mesh device 302.
Referring to fig. 7, a flowchart of a resource mapping method provided in an embodiment of the present application is shown, where the method may be applied in a gateway device. The method may include the following steps (710-730):
step 710, creating a first OCF device corresponding to the first physical device, where the first physical device is a device based on the target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device.
Alternatively, the target communication protocol may be some wireless communication protocol, such as Zigbee protocol or BLE mesh protocol.
And step 720, creating a first OCF resource based on the mapping relationship between the first OCF device and the first physical device, wherein the first OCF resource and the first object in the first physical device have the mapping relationship.
In the embodiment of the application, the OCF resource has a mapping relationship with an object in the physical device based on the target communication protocol. Alternatively, the mapping relationship may be a one-to-one mapping relationship, that is, one OCF resource corresponds to one object, and different OCF resources correspond to different objects.
Of course, in some other examples, the mapping relationship may also be a one-to-many mapping relationship, that is, one OCF resource corresponds to multiple objects, and multiple different objects may correspond to the same OCF resource; alternatively, the mapping relationship may also be a many-to-one mapping relationship, that is, one object corresponds to multiple OCF resources, which is not limited in this embodiment of the present application.
Step 730, generating and storing a resource address of the first OCF resource, where the resource address of the first OCF resource is used to determine a first object having a mapping relationship with the first OCF resource.
For example, when the operation request received by the gateway device includes the resource address of the first OCF resource, the gateway device may determine that the relevant operation needs to be performed on the first object corresponding to the first OCF resource. The resource address of the first OCF resource is used for playing a role of unique identification on the first OCF resource, and different OCF resources have different resource addresses. For example, the Resource address may be a URL (Uniform Resource Locator).
Optionally, the gateway device may generate the resource address of the first OCF resource according to the identification information of the first object. Of course, in other examples, the gateway device may also generate the resource address of the first OCF resource in other manners, as long as the resource address can play a role of uniquely identifying the OCF, which is not limited in this embodiment of the application.
In an example, in a case that the target communication protocol is a Zigbee protocol, that is, in a case that the first physical device is a first Zigbee device, the first OCF resource and the first service cluster in the first physical device have a mapping relationship. Accordingly, the resource address of the first OCF resource includes: identification information of an endpoint to which the first service cluster belongs, and identification information of the first service cluster. For example, assuming that the first service Cluster is Cluster 6 (i.e., a Cluster with id 6) under Endpoint 1 (i.e., an Endpoint with id 1) under the first Zigbee device, the resource address of the first OCF resource may include identification information of Endpoint 1 and identification information of Cluster 6. The identification information of the endpoint is used for uniquely identifying the endpoint, and different endpoints under the same Zigbee equipment have different identification information; the identification information of the service cluster is used for uniquely identifying the service cluster, and different service clusters under the same endpoint have different identification information. Illustratively, the resource address of the first OCF resource may be denoted as "/ep/1/cluster/6", ep denotes an endpoint, 1 denotes an id value of the endpoint, cluster denotes a service cluster, and 6 denotes an id value of the service cluster.
Optionally, the resource address of the first OCF resource further includes: identification information of the Zigbee protocol. Illustratively, the resource address of the first OCF resource may be denoted as "/eco/zigbee3.0/ep/1/cluster/6", eco denoting the communication protocol, zigbee3.0 denoting the identification information of the communication protocol (i.e. denoting being the zigbee3.0 protocol), ep denoting the endpoint, 1 denoting the id value of the endpoint, cluster denoting the service cluster, and 6 denoting the id value of the service cluster.
In another example, in a case where the target communication protocol is a BLE Mesh protocol, that is, the first physical device is a first BLE Mesh device, the first OCF resource and the first service model in the first physical device have a mapping relationship. Accordingly, the resource address of the first OCF resource includes: identification information of an element to which the first service model belongs, and identification information of the first service model. For example, assuming that the first service Model is Model 3 (i.e., model with id 3) under Element2 (i.e., element with id 2) under the first BLE mesh device, the resource address of the first OCF resource may include identification information of Element2 and identification information of Model 3. The identification information of the element is used for uniquely identifying the element, and different elements under the same BLE mesh device have different identification information; the identification information of the service model is used for uniquely identifying the service model, and different service models under the same element have different identification information. Exemplarily, the resource address of the first OCF resource may be represented as "/ele/2/model/3", ele represents an element, 2 represents an id value of the element, model represents a service model, and 3 represents an id value of the service model.
Optionally, the resource address of the first OCF resource further includes: identification information of the BLE Mesh protocol. Exemplarily, the resource address of the first OCF resource may be represented as "/eco/blemsesh/ele/2/model/3", eco represents a communication protocol, blemsesh represents identification information of the communication protocol (i.e., represents being a BLE mesh protocol), ele represents an element, 2 represents an id value of the element, model represents a service model, and 3 represents an id value of the service model.
In an exemplary embodiment, as shown in fig. 8, the step 730 further includes the following steps (740 to 760):
step 740, receiving a first access request sent by the OCF client, where the first access request is a request of the OCF client for accessing the first OCF resource, and the first access request includes a resource address of the first OCF resource.
Optionally, the first access request further includes operation type indication information, which is used to indicate an operation performed on the first OCF resource. Illustratively, the operations that may be performed on the first OCF resource include, but are not limited to, at least one of: read, update, delete, subscribe, and the like.
Step 750, mapping the resource address of the first OCF resource to the identification information of the first object.
After receiving the first access request, the gateway device parses the first access request to obtain the resource address of the first OCF resource, which means that the OCF client wants to access the first OCF resource. Optionally, the operation type indication information carried in the request is also read, so as to learn the operation that needs to be executed on the first OCF resource. Then, the gateway device maps the resource address of the first OCF resource to the identification information of the first object, generates and sends a second access request to the first physical device.
Step 760, sending a second access request to the first physical device, where the second access request is a request for accessing the first object by the gateway device, and the second access request includes the identification information of the first object.
Optionally, the first access request further includes operation type indication information, which is used to indicate an operation performed on the first object. Illustratively, the operations that may be performed on the first object include, but are not limited to, at least one of: read, update, delete, subscribe, and the like.
In summary, in the technical solution provided in the embodiment of the present application, a mapping relationship between a first OCF resource and a first object in a first physical device is established through a gateway device, and a resource address of the first OCF resource is generated and stored, so that the first object having a mapping relationship with the first OCF resource is determined, and a relationship between the OCF resource address and an object under a target communication protocol is specified, thereby enhancing an interconnection capability between an OCF protocol and other standard protocols.
For example, the relationship between the OCF resource address and the Zigbee Cluster (Cluster) and the BLE mesh Model (Model) is defined, so as to enhance the capability of interworking between the OCF protocol and the Zigbee protocol/BLE mesh protocol.
It should be noted that, in the embodiment of the present application, the relationship mapping is performed only for the functional resource URL, and this mapping process is not performed for the OCF specific resource type URL (specific resource URLs, such as "/oic/res", "/oic/d", "/oic/p", and the like).
Referring to fig. 9, a flowchart of a resource mapping method provided in another embodiment of the present application is shown, and the method can be applied to the implementation environment shown in fig. 5. In this embodiment, a relationship between an OCF resource address and a Zigbee Cluster (Cluster) is specified. The method can comprise the following steps (901-917):
in step 901, the virtual Zigbee client discovers a first Zigbee device.
Step 902, the virtual Zigbee client establishes a connection with the first Zigbee device.
Step 903, the virtual Zigbee client sends a mapping relationship establishment request to the bridge function module, where the mapping relationship establishment request is used to request establishment of a mapping relationship between the first Zigbee device and the first OCF device, and the first OCF device is a virtual OCF device mapped by the first Zigbee device.
Step 904, the bridging function module sets a mapping relationship between the OCF resource and the service cluster of the first Zigbee device.
And the bridging function module sets a corresponding OCF resource URL according to the structural characteristics of the data model of the Zigbee protocol. For example, for a Zigbee3.0 device, when a mapping relationship is established between a Cluster (id value is 6) under the device Endpoint (id value is 1) and an OCF resource, the OCF resource URL may be set to/ep/1/Cluster/6.
Step 905 is that the bridge 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 to create a virtual OCF device (i.e., a first OCF device) mapped with the first Zigbee device.
Step 906, the virtual OCF server creates a first OCF device, and creates an OCF resource based on the OCF resource address.
In step 907, the OCF client sends an equipment resource obtaining request to the virtual OCF server, where the equipment resource obtaining request is used to request to obtain information related to the OCF resource created by the virtual OCF server.
For example, information such as a resource address and a resource access policy of each OCF resource created by the virtual OCF server is acquired.
And 908, the virtual OCF server sends the relevant information of the OCF resources to the OCF client.
In step 909, the OCF client sends a first access request to the virtual OCF server, where the first access request includes a resource address of a first OCF resource to be accessed.
For example,/ep/1/cluster/6 is included in the first access request.
In step 910, the virtual OCF server sends a resource address resolution request to the bridge function module, where the resource address resolution request is used to request to resolve a resource address, and the resource address resolution request includes a resource address to be resolved (i.e. a resource address of the first OCF resource).
Step 911, the bridge function module determines the identification information of the service cluster corresponding to the resource address to be resolved, for example, the first OCF resource corresponds to the first service cluster.
And the bridging function module determines which Cluster under which Endpoint of the Zigbee3.0 equipment needs to be accessed according to the resource address to be analyzed. For example, if the first access request includes/ep/1/Cluster/6, it is determined that Cluster 6 under Endpoint 1 under the Zigbee3.0 device is to be accessed.
In step 912, the bridge function module sends a request for accessing the first service cluster to the virtual Zigbee client, where the request may include identification information of the first service cluster.
Step 913, the virtual Zigbee client sends a second access request to the first Zigbee device, where the second access request includes identification information of the first service cluster to be accessed.
Step 914, the first Zigbee device sends the first access result to the virtual Zigbee client.
Step 915, the virtual Zigbee client sends the first access result to the bridging function module.
Step 916, the bridge connection functional module sends a second access result to the virtual OCF server, where the second access result is an access result that is generated after the first access result based on the Zigbee protocol is converted and conforms to the OCF protocol specification.
Step 917, the virtual OCF server sends the second access result to the OCF client.
Referring to fig. 10, a flowchart of a resource mapping method provided in another embodiment of the present application is shown, and the method can be applied to the implementation environment shown in fig. 5. In the present embodiment, a relationship between the OCF resource address and the BLE mesh Model (Model) is specified. The method can comprise the following steps (1001-1017):
in step 1001, the virtual BLE mesh client discovers the first BLE mesh device.
In step 1002, the virtual BLE mesh client establishes a connection with the first BLE mesh device.
In step 1003, the virtual BLE mesh client sends a mapping relationship establishing request to the bridge function module, where the mapping relationship establishing request is used to request to establish a mapping relationship from the first BLE mesh device to the first OCF device, and the first OCF device is the virtual OCF device mapped by the first BLE mesh device.
In step 1004, the bridging function module sets a mapping relationship between the OCF resource and a service model of the first BLE mesh device.
And the bridging function module sets a corresponding OCF resource URL according to the structural characteristics of the data model of the BLE mesh protocol. For example, for a BLE mesh device, when a Model (id value is 3) under a device Element (id value is 2) is mapped with an OCF resource, the OCF resource URL may be set to/ele/2/Model/3.
In step 1005, 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 to create a virtual OCF device (i.e., a first OCF device) mapped to the first BLE mesh device.
Step 1006, the virtual OCF server creates a first OCF device, and creates an OCF resource based on the OCF resource address.
Step 1007, the OCF client sends a device resource obtaining request to the virtual OCF server, where the device resource obtaining request is used to request to obtain the relevant information of the OCF resource created by the virtual OCF server.
For example, information such as a resource address and a resource access policy of each OCF resource created by the virtual OCF server is acquired.
And step 1008, the virtual OCF server sends the relevant information of the OCF resources to the OCF client.
In step 1009, the OCF client sends a first access request to the virtual OCF server, where the first access request includes a resource address of a first OCF resource to be accessed.
For example, the first access request includes/ele/2/model/3.
Step 1010, the virtual OCF server sends a resource address resolution request to the bridge function module, where the resource address resolution request is used to request to resolve a resource address, and the resource address resolution request includes a resource address to be resolved (i.e., a resource address of the first OCF resource).
In step 1011, the bridge function module determines the identification information of the service model corresponding to the resource address to be resolved, for example, the first OCF resource corresponds to the first service model.
And the bridging function module determines which Model under which Element of the BLE mesh device needs to be accessed according to the resource address to be analyzed. For example, if/ele/2/Model/3 is included in the first access request, it is determined that Model 3 under Element2 under BLE mesh device is to be accessed.
In step 1012, the bridging function module sends a request for accessing the first service model to the virtual BLE mesh client, where the request may include identification information of the first service model.
Step 1013, the virtual BLE mesh client sends a second access request to the first BLE mesh device, where the second access request includes identification information of the first service model to be accessed.
At step 1014, the first BLE mesh device sends the first access result to the virtual BLE mesh client.
In step 1015, the virtual BLE mesh client sends the first access result to the bridging function module.
In step 1016, the bridge function module sends a second access result to the virtual OCF server, where the second access result is an access result that conforms to the OCF protocol specification and is generated by converting the first access result based on the BLE mesh protocol.
Step 1017, the virtual OCF server sends the second access result to the OCF client.
In the following, the encoding scheme of the OCF resource address is described by way of an exemplary embodiment.
In one example, the resource address of the first OCF resource includes: a first padding bit, a second padding bit, a third padding bit and a fourth padding bit; wherein, the first filling bit is used for filling the representation information of the object; the second filling bit is used for filling the identification information of the first object; the third filling bit is used for filling the representation information of the service type of the object; the fourth padding bit is used to pad identification information of a service type to which the first object belongs.
For example, for the mapping of OCF protocol to Zigbee protocol, the first padding bit is used to fill the representation information of the service cluster; the second filling bit is used for filling the identification information of the service cluster; the third filling bit is used for filling the representation information of the end point of the service cluster; and the fourth filling bit is used for filling the identification information of the endpoint to which the service cluster belongs.
For another example, for mapping of OCF protocol to BLE mesh protocol, the first padding bits are used to pad the representation information of the service model; the second filling bit is used for filling the identification information of the service model; the third filling bit is used for filling the representation information of the element to which the service model belongs; the fourth padding bit is used for padding the identification information of the element to which the service model belongs.
Optionally, a separator is arranged between any two adjacent filling bits of the first filling bit, the second filling bit, the third filling bit and the fourth filling bit, and the separator is used for distinguishing different filling bits. For example, the OCF resource URL may be represented as "/app/x2/res/x3", in order from left to right: app corresponds to a third padding bit, x2 corresponds to a fourth padding bit, res corresponds to a first padding bit, and x3 corresponds to a second padding bit, "/" denotes a delimiter. For Zigbee3.0 devices, for example app = ep (endpoint), res = cluster, x2= id value of endpoint, x3= id value of cluster. For BLE Mesh devices, for example app = ele (element), res = model, x2= id value of element, x3= id value of model.
Optionally, the resource address of the first OCF resource further includes: the fifth padding bit is used for padding the representation information of the communication protocol, and the sixth padding bit is used for padding the identification information of the communication protocol. Optionally, a separator is provided between any two adjacent padding bits of the first padding bit, the second padding bit, the third padding bit, the fourth padding bit, the fifth padding bit, and the sixth padding bit. For example, the OCF resource URL may be represented as "/eco/x1/app/x2/res/x3", in order from left to right: eco for a fifth pad bit, x1 for a sixth pad bit, app for a third pad bit, x2 for a fourth pad bit, res for a first pad bit, and x3 for a second pad bit, "/" denotes a delimiter. For Zigbee3.0 devices, for example, x1= Zigbee3.0, app = ep (endpoint), res = cluster, x2= id value of endpoint, x3= id value of cluster. For BLE Mesh devices, for example, x1= blemesh, app = ele (element), res = model, x2= id value of element, x3= id value of model.
In another example, the resource address of the first OCF resource includes: a first padding bit and a second padding bit; wherein the first filling bit is used for filling the identification information of the first object; the second padding bits are used to pad identification information of a service type to which the first object belongs.
For example, for the mapping of OCF protocol to Zigbee protocol, the first padding bit is used to pad the identification information of the service cluster; the second filling bit is used for filling the identification information of the endpoint to which the service cluster belongs.
For another example, for mapping of OCF protocol to BLE mesh protocol, the first padding bit is used to pad identification information of the service model; the second padding bit is used for padding the identification information of the element to which the service model belongs.
Optionally, the first padding bit and the second padding bit have a separator therebetween, and the separator is used for distinguishing different padding bits. For example, an OCF resource URL may be represented as "/x2/x3", in order from left to right: x2 corresponds to the second padding bit, x3 corresponds to the first padding bit, and "/" denotes a delimiter. For Zigbee3.0 devices, for example, x2= the id value of the endpoint, x3= the id value of the cluster. Illustratively, the OCF resource URL is "/1/6", meaning that the endpoint id value is 1 and the cluster id value is 6. For BLE Mesh devices, for example, x2= id value of the element, x3= id value of the model. Illustratively, the OCF resource URL is "/2/3", meaning that the id value of the element is 2 and the id value of the model is 3.
Optionally, there is no delimiter between the first and second padding bits, and the length of the first padding bit and the length of the second padding bit are predefined. For example, an OCF resource URL may be represented as "/x2x3", from left to right: x2 corresponds to the second padding bits and x3 corresponds to the first padding bits. For Zigbee3.0 devices, for example, x2= the id value of the endpoint, x3= the id value of the cluster. For BLE Mesh devices, for example, x2= id value of the element, x3= id value of the model. In addition, since there is no delimiter between the first and second padding bits, in order to achieve differentiation of padding data in the first and second padding bits, the length of the first padding bit and the length of the second padding bit are predefined, such as the length of the first padding bit is 32 bits, and the length of the second padding bit is also 32 bits. Of course, the length of the first padding bit and the length of the second padding bit may be predefined in combination with actual situations, and the lengths may be the same or different, which is not limited in this application.
Optionally, the resource address of the first OCF resource further includes: and the third filling bit is used for filling the identification information of the communication protocol. The third padding bit and the first and second padding bits may or may not have a delimiter therebetween, and if there is no delimiter, the length of the third padding bit may also be predefined. Taking the example of having a separator between the third padding bit and the first padding bit, the OCF resource URL may be represented as "/x1/x2x3", which is from left to right: x1 corresponds to the third padding bit, x2 corresponds to the second padding bit, and x3 corresponds to the first padding bit. For example, the third padding bit and the first padding bit do not have a separator therebetween, the OCF resource URL may be represented as "/x1x2x3", which is sequentially from left to right: x1 corresponds to the third padding bit, x2 corresponds to the second padding bit, and x3 corresponds to the first padding bit.
Compared with the method provided by the previous example, the method provided by the present example is helpful for shortening the length of the OCF resource address, thereby saving the storage overhead and the transmission overhead of the OCF resource address.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 11, a block diagram of a resource mapping apparatus according to an embodiment of the present application is shown. The device has the function of realizing the method example of the gateway device side, and the function can be realized by hardware or by executing corresponding software by hardware. The apparatus may be the gateway device described above, or may be provided in the gateway device. As shown in fig. 11, the apparatus 1100 may include: a device creation module 1110, a resource creation module 1120, and an address generation module 1130.
A device creating module 1110, configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
a resource creating module 1120, configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
an address generating module 1130, configured to generate and store a resource address of the first OCF resource, where the resource address of the first OCF resource is used to determine the first object having a mapping relationship with the first OCF resource.
In an exemplary embodiment, in a case that the target communication protocol is a BLE Mesh protocol, the first OCF resource and the first service model in the first physical device have a mapping relationship.
Optionally, the resource address of the first OCF resource includes:
identification information of an element to which the first service model belongs, and identification information of the first service model.
Optionally, the resource address of the first OCF resource further includes:
identification information of the BLE Mesh protocol.
In an exemplary embodiment, in a case that the target communication protocol is a Zigbee protocol, the first OCF resource and the first service cluster in the first physical device have a mapping relationship.
Optionally, the resource address of the first OCF resource includes:
identification information of an endpoint to which the first service cluster belongs, and identification information of the first service cluster.
Optionally, the resource address of the first OCF resource further includes:
identification information of the Zigbee protocol.
In an exemplary embodiment, the apparatus 1110 further comprises: a request receiving module, an address mapping module, and a request sending module (not shown in fig. 11).
A request receiving module, configured to receive a first access request sent by an OCF client, where the first access request is a request of the OCF client for accessing the first OCF resource, and the first access request includes a resource address of the first OCF resource.
And the address mapping module is used for mapping the resource address of the first OCF resource into the identification information of the first object.
A request sending module, configured to send a second access request to the first physical device, where the second access request is a request for the gateway device to access the first object, and the second access request includes identification information of the first object.
In an exemplary embodiment, the resource address of the first OCF resource includes: a first padding bit, a second padding bit, a third padding bit and a fourth padding bit; wherein, the first and the second end of the pipe are connected with each other,
the first filling bit is used for filling representation information of an object;
the second filling bit is used for filling the identification information of the first object;
the third filling bit is used for filling the representation information of the service type to which the object belongs;
the fourth padding bit is used for padding the identification information of the service type to which the first object belongs.
Optionally, any two adjacent padding bits of the first padding bit, the second padding bit, the third padding bit and the fourth padding bit have a separator therebetween.
In an exemplary embodiment, the resource address of the first OCF resource includes: a first padding bit and a second padding bit; wherein the content of the first and second substances,
the first filling bit is used for filling the identification information of the first object;
the second padding bits are used for padding identification information of a service type to which the first object belongs.
Optionally, there is a separator between the first and second padding bits.
Optionally, there is no delimiter between the first and second padding bits, and the length of the first padding bit and the length of the second padding bit are predefined.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the above functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 12, a schematic structural diagram of a gateway device 120 according to an embodiment of the present application is shown. The gateway device 120 may be configured to implement the attribute subscription method of the Zigbee device on the gateway device side. The gateway device 120 may include: a processor 121, a receiver 122, a transmitter 123, a memory 124, and a bus 125.
The processor 121 includes one or more processing cores, and the processor 121 executes various functional applications and information processing by executing software programs and modules.
The receiver 122 and the transmitter 123 may be implemented as one communication component, which may be a communication chip.
The memory 124 is connected to the processor 121 via a bus 125.
The memory 124 may be used to store a computer program, which the processor 121 is configured to execute to implement the steps performed by the gateway device in the above-described method embodiments.
Further, memory 124 may be implemented by any type or combination of volatile or non-volatile storage devices, including, but not limited to: magnetic or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static Random Access Memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, programmable read-only memory (PROM).
In an exemplary embodiment, the gateway device includes a processor, a memory, and a transceiver (which may include a receiver for receiving information and a transmitter for transmitting information);
the processor is configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
the processor is further configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
the processor is further configured to generate and store a resource address of the first OCF resource, where the resource address of the first OCF resource is used to determine the first object having a mapping relationship with the first OCF resource.
In an exemplary embodiment, in a case that the target communication protocol is a BLE Mesh protocol, the first OCF resource and the first service model in the first physical device have a mapping relationship.
Optionally, the resource address of the first OCF resource includes:
identification information of an element to which the first service model belongs, and identification information of the first service model.
Optionally, the resource address of the first OCF resource further includes:
identification information of the BLE Mesh protocol.
In an exemplary embodiment, in a case that the target communication protocol is a Zigbee protocol, the first OCF resource and the first service cluster in the first physical device have a mapping relationship.
Optionally, the resource address of the first OCF resource includes:
identification information of an endpoint to which the first service cluster belongs, and identification information of the first service cluster.
Optionally, the resource address of the first OCF resource further includes:
identification information of the Zigbee protocol.
In an exemplary embodiment, the transceiver is configured to receive a first access request sent by an OCF client, where the first access request is a request of the OCF client to access the first OCF resource, and the first access request includes a resource address of the first OCF resource;
the processor is further configured to map a resource address of the first OCF resource to identification information of the first object;
the transceiver is further configured to send a second access request to the first physical device, where the second access request is a request for the gateway device to access the first object, and the second access request includes identification information of the first object.
In an exemplary embodiment, the resource address of the first OCF resource includes: a first padding bit, a second padding bit, a third padding bit and a fourth padding bit; wherein the content of the first and second substances,
the first filling bit is used for filling representation information of an object;
the second filling bit is used for filling the identification information of the first object;
the third filling bit is used for filling the representation information of the service type to which the object belongs;
the fourth padding bit is used for padding the identification information of the service type to which the first object belongs.
Optionally, any two adjacent padding bits of the first padding bit, the second padding bit, the third padding bit and the fourth padding bit have a separator therebetween.
In an exemplary embodiment, the resource address of the first OCF resource includes: a first padding bit and a second padding bit; wherein the content of the first and second substances,
the first filling bit is used for filling the identification information of the first object;
the second padding bits are used for padding identification information of a service type to which the first object belongs.
Optionally, there is a separator between the first and second padding bits.
Optionally, there is no delimiter between the first and second padding bits, and the length of the first padding bit and the length of the second padding bit are predefined.
An exemplary embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used for being executed by a processor of a gateway device to implement the resource mapping method on the gateway device side.
An exemplary embodiment of the present application further provides a chip, where the chip includes a programmable logic circuit and/or a program instruction, and when the chip runs on a gateway device, the chip is configured to implement the resource mapping method on the gateway device side.
An exemplary embodiment of the present application further provides a computer program product, which, when running on a gateway device, causes the gateway device to execute the above method for mapping resources on the gateway device side.
Those skilled in the art will recognize that the functionality described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof, in one or more of the examples described above. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above description is only exemplary of the application and should not be taken as limiting the application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the application should be included in the protection scope of the application.

Claims (28)

  1. A resource mapping method is applied to a gateway device, and the method comprises the following steps:
    creating a first OCF device corresponding to a first physical device, wherein the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
    creating a first OCF resource based on a mapping relation between the first OCF device and the first physical device, wherein the first OCF resource and a first object in the first physical device have a mapping relation;
    and generating and storing a resource address of the first OCF resource, wherein the resource address of the first OCF resource is used for determining the first object having a mapping relation with the first OCF resource.
  2. The method according to claim 1, wherein the first OCF resource and the first service model in the first physical device have a mapping relationship if the target communication protocol is a BLE Mesh protocol.
  3. The method of claim 2, wherein the resource address of the first OCF resource comprises:
    identification information of an element to which the first service model belongs, and identification information of the first service model.
  4. The method of claim 3, wherein the resource address of the first OCF resource further comprises:
    identification information of the BLE Mesh protocol.
  5. The method of claim 1, wherein the first OCF resource and the first service cluster in the first physical device have a mapping relationship if the target communication protocol is a Zigbee protocol.
  6. The method of claim 5, wherein the resource address of the first OCF resource comprises:
    identification information of an endpoint to which the first service cluster belongs, and identification information of the first service cluster.
  7. The method of claim 6, wherein the resource address of the first OCF resource further comprises:
    identification information of the Zigbee protocol.
  8. The method according to any one of claims 1 to 7, further comprising:
    receiving a first access request sent by an OCF client, wherein the first access request is a request of the OCF client for accessing the first OCF resource, and the first access request comprises a resource address of the first OCF resource;
    mapping the resource address of the first OCF resource to the identification information of the first object;
    and sending a second access request to the first physical device, wherein the second access request is a request for accessing the first object by the gateway device, and the second access request comprises identification information of the first object.
  9. The method of any of claims 1 to 8, wherein the resource address of the first OCF resource comprises: a first padding bit, a second padding bit, a third padding bit and a fourth padding bit; wherein, the first and the second end of the pipe are connected with each other,
    the first filling bit is used for filling representation information of an object;
    the second filling bit is used for filling the identification information of the first object;
    the third filling bit is used for filling the representation information of the service type to which the object belongs;
    the fourth padding bit is used for padding the identification information of the service type to which the first object belongs.
  10. The method of claim 9, wherein any two adjacent padding bits of the first padding bit, the second padding bit, the third padding bit, and the fourth padding bit have a separator therebetween.
  11. The method of any of claims 1 to 8, wherein the resource address of the first OCF resource comprises: a first padding bit and a second padding bit; wherein, the first and the second end of the pipe are connected with each other,
    the first filling bit is used for filling the identification information of the first object;
    the second padding bit is used for padding the identification information of the service type to which the first object belongs.
  12. The method of claim 11, wherein the first padding bits and the second padding bits have a separator therebetween.
  13. The method of claim 11, wherein the first padding bits and the second padding bits have no delimiter therebetween, and wherein a length of the first padding bits and a length of the second padding bits are predefined.
  14. An apparatus for resource mapping, the apparatus comprising:
    the device creating module is configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
    a resource creating module, configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
    and the address generation module is used for generating and storing a resource address of the first OCF resource, wherein the resource address of the first OCF resource is used for determining the first object which has a mapping relation with the first OCF resource.
  15. The apparatus according to claim 14, wherein the first OCF resource and the first service model in the first physical device have a mapping relationship if the target communication protocol is a BLE Mesh protocol.
  16. The apparatus of claim 15, wherein the resource address of the first OCF resource comprises:
    identification information of an element to which the first service model belongs, and identification information of the first service model.
  17. The apparatus of claim 16, wherein the resource address of the first OCF resource further comprises:
    identification information of the BLE Mesh protocol.
  18. The apparatus of claim 14, wherein the first OCF resource and the first service cluster in the first physical device have a mapping relationship if the target communication protocol is a Zigbee protocol.
  19. The apparatus of claim 18, wherein the resource address of the first OCF resource comprises:
    identification information of an endpoint to which the first service cluster belongs, and identification information of the first service cluster.
  20. The apparatus of claim 19, wherein the resource address of the first OCF resource further comprises:
    identification information of the Zigbee protocol.
  21. The apparatus of any one of claims 14 to 20, further comprising:
    a request receiving module, configured to receive a first access request sent by an OCF client, where the first access request is a request of the OCF client for accessing the first OCF resource, and the first access request includes a resource address of the first OCF resource;
    the address mapping module is used for mapping the resource address of the first OCF resource into the identification information of the first object;
    a request sending module, configured to send a second access request to the first physical device, where the second access request is a request for the gateway device to access the first object, and the second access request includes identification information of the first object.
  22. The apparatus according to any of claims 14 to 21, wherein the resource address of the first OCF resource comprises: a first padding bit, a second padding bit, a third padding bit and a fourth padding bit; wherein, the first and the second end of the pipe are connected with each other,
    the first filling bit is used for filling representation information of an object;
    the second filling bit is used for filling the identification information of the first object;
    the third filling bit is used for filling the representation information of the service type of the object;
    the fourth padding bit is used for padding the identification information of the service type to which the first object belongs.
  23. The apparatus of claim 22, wherein any two adjacent ones of the first, second, third and fourth padding bits have a separator therebetween.
  24. The apparatus according to any of claims 14 to 21, wherein the resource address of the first OCF resource comprises: a first padding bit and a second padding bit; wherein the content of the first and second substances,
    the first filling bit is used for filling identification information of the first object;
    the second padding bits are used for padding identification information of a service type to which the first object belongs.
  25. The apparatus of claim 24, wherein the first padding bits and the second padding bits have a separator therebetween.
  26. The apparatus of claim 24, wherein the first padding bits and the second padding bits have no delimiter therebetween, and wherein a length of the first padding bits and a length of the second padding bits are predefined.
  27. A gateway device, characterized in that the gateway device comprises a processor, a memory and a transceiver;
    the processor is configured to create a first OCF device corresponding to a first physical device, where the first physical device is a device based on a target communication protocol, and the first OCF device is a virtual OCF device mapped by the first physical device;
    the processor is further configured to create a first OCF resource based on a mapping relationship between the first OCF device and the first physical device, where the first OCF resource and a first object in the first physical device have a mapping relationship;
    the processor is further configured to generate and store a resource address of the first OCF resource, where the resource address of the first OCF resource is used to determine the first object having a mapping relationship with the first OCF resource.
  28. A computer-readable storage medium, in which a computer program is stored which is adapted to be executed by a processor to implement the resource mapping method according to any one of claims 1 to 13.
CN202080103386.2A 2020-10-26 2020-10-26 Resource mapping method, device, equipment and storage medium Pending CN115968543A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/123782 WO2022087795A1 (en) 2020-10-26 2020-10-26 Resource mapping method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
CN115968543A true CN115968543A (en) 2023-04-14

Family

ID=81381581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080103386.2A Pending CN115968543A (en) 2020-10-26 2020-10-26 Resource mapping method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115968543A (en)
WO (1) WO2022087795A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115175109B (en) * 2022-05-30 2024-01-26 青岛海尔科技有限公司 Control command sending method and device, storage medium and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180063879A1 (en) * 2016-08-29 2018-03-01 Electronics And Telecommunications Research Institute Apparatus and method for interoperation between internet-of-things devices
CN106657227B (en) * 2016-09-26 2019-10-25 海尔优家智能科技(北京)有限公司 The method and device of resource is subscribed in a kind of change
CN111034156B (en) * 2017-09-08 2023-02-17 康维达无线有限责任公司 Automatic service registration in machine-to-machine communication networks
EP3695581B1 (en) * 2017-10-12 2023-09-20 Convida Wireless, LLC Interworking service for the restful internet of things
US11483418B2 (en) * 2017-12-06 2022-10-25 Intel Corporation Plugin management for internet of things (IoT) network optimization

Also Published As

Publication number Publication date
WO2022087795A1 (en) 2022-05-05

Similar Documents

Publication Publication Date Title
CN110933146B (en) Data conversion method and device and server
WO2016070628A1 (en) Power line carrier communication terminal control device, system and method
CN110366153B (en) Bluetooth ad hoc network method
US10148739B2 (en) M2M data querying and invoking methods, querying and invoking devices, and system
CN104427488A (en) Terminal and wireless networking method
CN112866119B (en) Virtual extensible local area network communication method and device, electronic equipment and storage medium
US20180295197A1 (en) Method for resource mapping between restful server and onem2m system
CN104683994A (en) Wireless network configuration method and wireless network devices
CN111416723A (en) Equipment management method and related equipment
JP2015126539A (en) Packet forwarding method and system
CN105450585A (en) Information transmission method and device
CN107567065B (en) Transparent data transmission method and system based on wireless self-organizing network
CN115968543A (en) Resource mapping method, device, equipment and storage medium
CN104333842A (en) Intelligent device program resource sharing method and system based on WIFI
CN113994649A (en) Method, device, equipment and storage medium for accessing BLE Mesh equipment
CN106657377B (en) A kind of WIA-PA/ interconnects manufacture network information service adapter and implementation method entirely
CN107181614B (en) Wifi network, networking method thereof and data transmission method
WO2021035652A1 (en) Communication method, communication apparatus, and system
CN113613274B (en) Intelligent access configuration method based on Mesh networking
WO2022087796A1 (en) Zigbee device attribute subscription method and apparatus, and device
CN112995043B (en) Information processing method and device in wireless mesh network and electronic equipment
GB2415855A (en) Variable network address lengths
CN103997508A (en) Method and apparatus for concentrated fixture storage
CN113472637A (en) LORA gateway
CN107710793A (en) A kind of localization method and corresponding intrument

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination