CN113994649A - Method, device, equipment and storage medium for accessing BLE Mesh equipment - Google Patents

Method, device, equipment and storage medium for accessing BLE Mesh equipment Download PDF

Info

Publication number
CN113994649A
CN113994649A CN201980097356.2A CN201980097356A CN113994649A CN 113994649 A CN113994649 A CN 113994649A CN 201980097356 A CN201980097356 A CN 201980097356A CN 113994649 A CN113994649 A CN 113994649A
Authority
CN
China
Prior art keywords
ocf
ble mesh
access request
mapping relationship
mesh device
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
CN201980097356.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 CN113994649A publication Critical patent/CN113994649A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An access method, device, equipment and storage medium for BLE Mesh equipment belong to the technical field of communication. The method comprises the following steps: the OCF client sends a first access request to the gateway equipment; the gateway device sends a second access request to the first BLE Mesh device. According to the method, after receiving a first access request sent by an OCF client, a gateway device converts the first access request into a second access request, and then sends the second access request to BLE Mesh equipment, so that the access of the OCF client to the BLE Mesh equipment is realized, and the interconnection and intercommunication among different protocols are enriched.

Description

Method, device, equipment and storage medium for accessing BLE Mesh equipment Technical Field
The embodiment of the application relates to the technical field of internet of things, in particular to an access method, device, equipment and storage medium for BLE Mesh equipment.
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 push the Internet of things to intelligent networking (Internet of intelligence).
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 such as the on-off, temperature and mode 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.
BLE (Bluetooth Low Energy) greatly reduces the power consumption of devices compared with the earlier classic Bluetooth, and is widely used at present. 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. BLE mesh works in a managed flood mode, which makes the message propagation very reliable and easy to expand, and the performance of BLE mesh can meet the commercial and industrial markets.
However, interaction between the OCF client and the BLE Mesh device cannot be achieved at present.
Disclosure of Invention
The embodiment of the application provides an access method, device, equipment and storage medium of BLE Mesh equipment. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides an access method for a BLE Mesh device, which is applied to a gateway device, and the method includes:
receiving a first access request sent by an OCF client, wherein the first access request is a request of the OCF client for accessing resources of first OCF equipment, and the first OCF equipment is virtual OCF equipment mapped by first BLE Mesh equipment;
sending a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
On the other hand, an embodiment of the present application provides an access method for BLE Mesh devices, which is applied to an OCF client, and the method includes:
sending a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In another aspect, an embodiment of the present application provides an access method for a BLE Mesh device, which is applied to a first BLE Mesh device, and the method includes:
receiving a second access request sent by a gateway device, wherein the second access request is a request for accessing a service model of the first BLE Mesh device by the gateway device;
the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In another aspect, an embodiment of the present application provides an access device for a BLE Mesh device, which is applied to a gateway device, and the access device includes:
a first request receiving module, configured to receive a first access request sent by an OCF client, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
a second request sending module, configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In a further aspect, an embodiment of the present application provides an access device for BLE Mesh devices, where the access device is applied to an OCF client, and the device includes:
a first request sending module, configured to send a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In a further aspect, an embodiment of the present application provides an access device for BLE Mesh devices, where the access device is applied to a first BLE Mesh device, and the device includes:
a second request receiving module, configured to receive a second access request sent by a gateway device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device;
the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In yet another aspect, an embodiment of the present application provides a gateway device, where the gateway device includes a processor, a memory, and a transceiver;
the transceiver is configured to receive a first access request sent by an OCF client, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
the transceiver is further configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In a further aspect, an embodiment of the present application provides a terminal, where the terminal is installed with an OCF client, and the terminal includes a processor, a memory, and a transceiver;
the transceiver is configured to send a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In a further aspect, an embodiment of the present application provides a BLE Mesh device, where the BLE Mesh device includes a processor, a memory, and a transceiver;
the transceiver is configured to receive a second access request sent by a gateway device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device;
the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
In a further aspect, an embodiment of the present application 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 method for accessing a BLE Mesh device on the gateway device side.
In a further aspect, an embodiment of the present application 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 terminal to implement the above-mentioned access method for a BLE Mesh device on an OCF client side.
In a further aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is configured to be executed by a processor of a first BLE Mesh device, so as to implement the method for accessing a BLE Mesh device on the side of the first BLE Mesh device.
In a further aspect, an embodiment of the present application provides a computer program product, which when running on a gateway device, causes the gateway device to execute the above access method for a BLE Mesh device on a gateway device side.
In a further aspect, an embodiment of the present application provides a computer program product, which, when the computer program product runs on a terminal installed with an OCF client, causes the terminal to execute the above-mentioned method for accessing BLE Mesh devices on the OCF client side.
In a further aspect, an embodiment of the present application provides a computer program product, which, when running on a first BLE Mesh device, causes the first BLE Mesh device to perform the above-mentioned method for accessing a BLE Mesh device on the first BLE Mesh device side.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
after receiving a first access request sent by an OCF client, a gateway device converts the first access request into a second access request, and then sends the second access request to BLE Mesh equipment, so that the access of the OCF client to the BLE Mesh equipment is realized, and the interconnection and intercommunication among different protocols are enriched.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a bridging platform provided by one embodiment of the present application;
FIG. 2 is a schematic illustration of an implementation environment provided by an embodiment of the present application;
fig. 3 is a block diagram of a gateway device according to an embodiment of the present application;
figure 4 is a flowchart of an access method of a BLE Mesh device provided in an embodiment of the present application;
figure 5 is a flowchart of an access method of a BLE Mesh device provided in another embodiment of the present application;
figure 6 is a block diagram of a BLE Mesh device provided in an embodiment of the present application;
figure 7 is a flowchart of an access method of a BLE Mesh device according to yet another embodiment of the present application;
figure 8 is a flowchart of an access method for a BLE Mesh device according to yet another embodiment of the present application;
FIG. 9 is a flowchart of a method for creating and storing mapping information provided by an embodiment of the present application;
FIG. 10 is a flow chart of a method for creating and storing mapping information provided by another embodiment of the present application;
FIG. 11 is a flowchart of a method for creating and storing mapping information according to yet another embodiment of the present application;
FIG. 12 is a flow chart of a method for creating and storing mapping information provided by another embodiment of the present application;
FIG. 13 is a flowchart of a method for creating and storing mapping information according to yet another embodiment of the present application;
fig. 14 is a flowchart of a GET process for a smart lamp through an OCF client according to an embodiment of the present application;
fig. 15 is a flowchart of a SET procedure for a smart lamp through an OCF client according to an embodiment of the present application;
FIG. 16 is a flowchart of a method for creating and storing mapping information according to yet another embodiment of the present application;
fig. 17 is a flowchart of a SET procedure for a smart lamp by an OCF client according to another embodiment of the present application;
figure 18 is a block diagram of an access device of a BLE Mesh device provided by one embodiment of the present application;
figure 19 is a block diagram of an access device of a BLE Mesh device provided in another embodiment of the present application;
figure 20 is a block diagram of an access device of a BLE Mesh device provided in yet another embodiment of the present application;
figure 21 is a block diagram of an access device of a BLE Mesh device provided in yet another embodiment of the present application;
fig. 22 is a schematic structural diagram of a gateway device according to an embodiment of the present application;
fig. 23 is a schematic structural diagram of a terminal installed with an OCF client running according to an embodiment of the present application;
figure 24 is a schematic structural diagram of a BLE Mesh device provided in 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.
In one example, an OCF client may interact with a BLE GATT (Generic Attribute Profile) device. Referring to figure 1, the interaction between an OCF client and a BLE GATT device via a bridge platform is shown. The bridge platform 110 includes the following functional modules: a virtual OCF service 112, a Bridging Function 114, and a virtual BLE GATT client 116. OCF client 120 and virtual OCF server 112 may communicate based on an OCF protocol, and virtual BLE GATT client 116 and BLE GATT device 130 may communicate based on a BLE protocol.
The bridge function module 114 is used to implement conversion between the OCF protocol and the BLE 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 GATT protocol recognizable by the BLE GATT device 130. In addition, the bridging function module 114 may also convert the information based on the BLE GATT protocol sent by the BLE GATT device 130 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 GATT protocol, so as to convert the information based on the OCF protocol into the information based on the BLE GATT protocol. As shown in table one below, which shows a mapping relationship between information based on the above two different protocols.
Watch 1
Information based on BLE GATT protocol Mapping count Information based on OCF protocol Mapping count
BLE GATT-based summaries N OCF device type 1
Service 1 OCF resources N
Feature(s) 1 OCF resource attributes N
Feature descriptors 1 OCF notification on/off options 1
From the first table, four sets of mapping relationships between the information based on the BLE GATT protocol and the information based on the OCF protocol, and the mapping count of both of the mapping relationships in each set, can be obtained. The four sets of mapping relationships based on table one include: based on the mapping relation between the BLE GATT summary (BLE GATT-based profile) and the OCF Device Type (OCF Device Type), wherein the mapping relation is the mapping relation of N to 1; a mapping relationship between a Service (Service) and an OCF Resource (OCF Resource), wherein the mapping relationship is a 1-to-N mapping relationship; a mapping relation between the characteristics (characteristics) and the OCF Resource property (OCF Resource property), wherein the mapping relation is a mapping relation of 1 to N; and a mapping relationship between the feature Descriptor (Characteristic Descriptor) and the OCF Notification on/off option (OCF Notification on/off option), and the mapping relationship is a 1-to-1 mapping relationship.
In the following, taking an example that an OCF client accesses a BLE blood pressure monitor, a description is given of a mapping relationship between information based on an OCF protocol and information based on a BLE GATT protocol.
As shown in table two below, it shows a specific mapping example between the BLE GATT based summary and the OCF device type.
Watch two
BLE GATT-based summaries OCF device type
Blood Pressure Profile Bloodpressurementor (blood pressure monitor)
As shown in table three below, a specific mapping example between the service contained in the BLE GATT protocol-based information and the OCF resource contained in the OCF protocol-based information is shown.
Watch III
Figure PCTCN2019121008-APPB-000001
A Service included in the information based on the BLE GATT protocol may have a plurality of BLE Property names (BLE attribute names), and each BLE Property name corresponds to one OCF Resource (OCF Resource), so that a mapping relationship between one Service (Service) and N OCF resources (OCF resources) can be completed. In the above table three, To OCF refers To access To OCF devices, and From OCF refers To access by OCF clients.
Based on the above example of interaction between the OCF client and the BLE GATT device, it can be seen that the OCF client can access the BLE GATT device by establishing a mapping relationship between information of different protocols through the bridge platform. However, with the rapid development of BLE Mesh networking, it is urgently needed to establish a mapping relationship between an OCF protocol and a BLE Mesh protocol to realize that BLE Mesh equipment is accessed through an OCF client.
The technical solution of the present application will be described below by means of several embodiments.
Referring to fig. 2, a schematic diagram of an implementation environment provided by an embodiment of the present application is shown, where the implementation environment may include: a terminal 210, a 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., cell 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.
BLE Mesh device 220 refers to an intelligent networking device with network access capability under BLE Mesh networking, and for example, BLE Mesh device 220 may be an intelligent home device, a terminal device, or other devices with 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 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, and 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 which use different communication protocols, data formats or languages, even 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 target system or target device so as to adapt to the requirements of the target system or target device, and meanwhile, the gateway device can also play a role in filtering and safety.
In this embodiment, gateway device 230 is connected to terminal 210 and BLE Mesh device 220, and an OCF client 211 is installed in terminal 210, and this OCF client 211 may access BLE Mesh device 220 through gateway device 230. For example, a user operates OCF client 211 running on terminal 210 to send an access request to gateway device 230, where the access request is based on information in the OCF protocol, gateway device 230 receives the access request and converts the access request, where the converted access request is based on information in the BLE Mesh protocol, and then gateway device 230 sends the converted access request to BLE Mesh device 230, thereby completing an access process of OCF client 211 to BLE Mesh device 230.
It should be noted that in this embodiment of the application, "accessing" of the OCF client to the BLE Mesh device includes two ways, that is, "acquiring" means that the OCF client knows the state of the BLE Mesh device, and "setting" means that the OCF client selects, sets, updates, and the like the state of the BLE Mesh device. In addition, in the embodiment of the present application, "access" of the OCF client to the BLE Mesh device may also be referred to as "operation" of the OCF client to the BLE Mesh device, but a person skilled in the art may understand the meaning of the operation.
Referring to fig. 3, a block diagram of a gateway device according to an embodiment of the present application is shown. As shown in fig. 3, the gateway device 300 includes a virtual OCF server 310, a mapping function module 320, and a 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 BLE Mesh client 330 is a functional module in the gateway device 300 for interacting with the BLE Mesh device 302, and the virtual BLE Mesh client 330 interacts with the BLE Mesh device 302 based on a BLE Mesh protocol. The BLE Mesh device 302 may act as a BLE Mesh server, receiving access requests from the virtual BLE Mesh client 330.
The mapping function module 320 is a function module in the gateway device 300 for implementing conversion between two different protocol information, that is, the mapping function module 320 is used for converting information based on the OCF protocol into information based on the BLE Mesh protocol, or converting information based on the BLE Mesh protocol into information based on the OCF protocol.
In one example, when OCF client 301 initiates an access request to BLE Mesh device 302, OCF client 301 first sends a first access request to gateway device 300, where the first access request is based on information of OCF protocol, and then receives the first access request by virtual OCF server 310 in gateway device 300, mapping function module 320 converts the first access request into a second access request, where the second access request is based on information of BLE Mesh protocol, and then sends the second access request to BLE Mesh device 302 by virtual BLE Mesh client 330 in gateway device 300, so as to complete the access of OCF client 301 to BLE Mesh device 302.
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 BLE Mesh device 302.
Referring to fig. 4, a flowchart of an access method of a BLE Mesh device provided in an embodiment of the present application is shown, where the method may be applied in the implementation environment shown in fig. 2. The method comprises the following steps (410-420):
in step 410, the OCF client sends a first access request to the gateway device.
The first access request is a request for accessing a resource of the first OCF device by an OCF client, and the first access request is an access request based on an OCF protocol. Wherein the first OCF device is a virtual OCF device mapped by the first BLE Mesh device.
The OCF client sends a first access request to the gateway device, wherein the purpose of the first access request is to access the first BLE Mesh device so as to acquire or set related information of the first BLE Mesh device.
Accordingly, the gateway device receives the first access request. The virtual OCF server in the gateway device may receive the first access request sent by the OCF client.
In step 420, the gateway device sends a second access request to the first BLE Mesh device.
The second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and the second access request is an access request based on the BLE Mesh protocol. After receiving the first access request, the gateway device converts the first access request into a second access request, thereby implementing access to the first BLE Mesh device.
The virtual OCF server of the gateway device may parse the first access request, obtain information included in the first access request, and then send the information to the mapping function module. The mapping function module of the gateway device maps the information, the mapped information is sent to the virtual BLE Mesh client, and the virtual BLE Mesh client generates a second access request according to the mapped information. The gateway device is provided with a mapping function module for realizing mapping between information based on an OCF protocol and information based on a BLE Mesh protocol, so that a first access request based on the OCF protocol is converted into a second access request based on the BLE Mesh protocol.
The service model of the first BLE Mesh device refers to a setting model of a service that the first BLE Mesh device can provide, and in practical applications, the service model of the first BLE Mesh device differs according to a difference of a type of the first BLE Mesh device, for example, when the first BLE Mesh device is an intelligent electric lamp, the service model of the first BLE Mesh device may include: a switch model, a brightness model, a color temperature model, and a hue and saturation model, etc.; when the first BLE Mesh device is a smart air conditioner, the service model of the first BLE Mesh device may include: a switch model, a temperature model, a cooling model, a heating model, a dehumidification model, a ventilation model, and the like.
In this embodiment of the application, a mapping relationship exists between a resource type of a resource of the first OCF device and a service model of the first BLE Mesh device. According to the mapping relationship, the mapping function module of the gateway device may convert a first access request for accessing the resource of the first OCF device into a second access request for accessing the service model of the first BLE Mesh device.
In one possible implementation, the step 420 includes: and the gateway device sends a second access request to the first BLE Mesh device according to the mapping information. The mapping information is used for determining a mapping relationship between an access request based on an OCF protocol and an access request based on a BLE Mesh protocol, that is, for determining a mapping relationship between a first access request and a second access request. In this embodiment of the application, the mapping information is stored in the gateway device, and the mapping function module of the gateway device may convert information based on the OCF protocol included in the first access request into corresponding information based on the BLE Mesh protocol according to the mapping information, so that the virtual BLE Mesh client generates the second access request based on the information based on the BLE Mesh protocol obtained through the conversion.
The virtual BLE Mesh client of the gateway device sends a second access request to the first BLE Mesh device, and accordingly, the first BLE Mesh device receives the second access request sent by the virtual BLE Mesh client of the gateway device. Therefore, the access of the OCF client to the first BLE Mesh device is realized.
In an exemplary embodiment, as shown in fig. 5, after the step 420, the following steps (step 430 to step 440) are further included:
in step 430, the first BLE Mesh device sends the first access result to the gateway device.
The first access result is an access result corresponding to the second access request, and the first BLE Mesh device processes the second access request after receiving the second access request and generates the first access result. Optionally, the processing of the second access request by the first BLE Mesh device includes: a decision is made whether to accept the access operation indicated by the second access request, and the second access request is executed in the case of accepting the access operation indicated by the second access request. For example, when the first BLE Mesh device is an intelligent electric lamp and the second access request is a switch state for accessing the intelligent electric lamp, assuming that the intelligent electric lamp accepts an access operation indicated by the second access request, the intelligent electric lamp obtains the switch state of the intelligent electric lamp, and generates a first access result corresponding to the second access request according to the switch state, where the first access result includes the switch state of the intelligent electric lamp.
Accordingly, the gateway device receives the first access result. The virtual BLE Mesh client of the gateway device may receive a first access result transmitted by the first BLE Mesh device, the first access result being information based on the BLE Mesh protocol.
Step 440, the gateway device sends the second access result to the OCF client.
After receiving the first access result, the virtual BLE Mesh client of the gateway device converts the first access result into a second access result by the mapping function module, sends the second access result to the virtual OCF server of the gateway device, and sends the second access result to the OCF client by the virtual OCF server. In this embodiment of the application, the second access result is an access result that is generated by the gateway device and conforms to the OCF protocol, that is, the second access result is information based on the OCF protocol. Because the OCF client cannot read the information based on the BLE Mesh protocol, the first access result needs to be converted into the second access result in order to be read by the OCF client.
Accordingly, the OCF client receives the second access result. The OCF client may receive the second access result sent by the virtual OCF server of the gateway device.
To sum up, according to the technical scheme provided by the embodiment of the application, after receiving a first access request sent by an OCF client, a gateway device converts the first access request into a second access request, and then sends the second access request to BLE Mesh equipment, so that access of the OCF client to the Mesh equipment is realized, and interconnection and intercommunication between BLE protocols are enriched.
In addition, according to the technical scheme provided by the embodiment of the application, the gateway device can convert the first access request sent by the OCF client into the second access request recognizable by the BLE Mesh device according to the mapping information, so that the mapping relation is established between the access request based on the OCF protocol and the access request based on the BLE Mesh protocol, and thus when the gateway device converts the access request sent by the OCF client, the gateway device only needs to search the mapping information, namely, the access request can be converted into the access request recognizable by the BLE Mesh device, thereby facilitating the conversion of the gateway device to the information based on different protocols and improving the conversion efficiency of the gateway device.
In one example, the mapping information includes the following mapping relationships:
(1) mapping relation between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
the device identification of the first OCF device is a unique identifier of the first OCF device and is used for uniquely identifying the first OCF device; the device identity of the first BLE Mesh device is a unique identifier of the first BLE Mesh device for uniquely identifying the first BLE Mesh device. Optionally, the device identifier may be represented in the form of an Identity Document (ID), or in the form of a device number, which is not limited in this embodiment of the present application. The device identifier of the first OCF device and the device identifier of the first BLE Mesh device may both be represented in the form of a device ID, may also be represented in the form of a device number, and may also be represented in the form of one device ID, and may also be represented in the form of one device number, and the like. Optionally, in an embodiment of the present application, the first BLE Mesh device is a Node (Node) in a BLE Mesh networking.
In this embodiment, the first OCF device and the first BLE Mesh device have a mapping relationship therebetween, and the mapping relationship is a 1-to-1 mapping relationship. Thus, the mapping information includes a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device.
(2) A mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
the Resource address of the first OCF device refers to href (Hypertext Reference) of the Resource of the first OCF device, and the href of the Resource of the first OCF device is a Uniform Resource Identifier (URI) of the Resource of the first OCF device. Exemplarily, the href of the resource of the first OCF device may be represented in the form of "/xx/xxxx", where "xx" is the element address of the first BLE Mesh device and "xxxx" is the description of href.
Referring to fig. 6, a block diagram of a BLE Mesh device is shown. As shown in fig. 6, the BLE Mesh device 600 includes at least one Element (Element), where a Primary Element (Primary Element)610 must exist, and the Primary Element 610 corresponds to an Element address, and when the BLE Mesh device is discovered (Provisioned), a configuration node (provisioning) allocates a unicast address to the BLE Mesh device, where the unicast address is the Element address of the Primary Element 610. In the case where there are a plurality of elements, the other elements except the master Element 610 are slave elements (Secondary elements) 620, and the Element addresses of the slave elements are accumulated on the Element address of the master Element. As shown in fig. 6, the BLE Mesh device 600 has three elements, including one master element 610 and two slave elements 620, and the element addresses of the two slave elements 620 are obtained by adding 1 and adding 2 to the element address of the master element 610, respectively.
In this embodiment, the resource of the first OCF device has a mapping relationship with an element of the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship. Thus, the mapping information includes a mapping relationship between the resource address of the first OCF device and the element address of the first BLE Mesh device.
(3) A mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Generally, a resource type can be defined in an intelligent networking technology architecture, and then different domains, different devices, and different resources can instantiate the resource type.
As shown in fig. 6, each element in the BLE Mesh device 600 corresponds to a plurality of models (models), and generally, the BLE Mesh device 600 corresponds to three types of models, namely a Control Model (Control Model), a service Model (Server Model) and a Client Model (Client Model), wherein the Control Model 630 generally exists in the master element 610, and the service Model 640 and the Client Model 650 may exist in the master element 610 or the slave element 620. Service model 640 may correspond to a plurality of states (states) that are for being accessed, however, client model 650 does not have a State, and client model 650 is generally for accessing the states of service model 640.
In this embodiment, the resource type of the first OCF device has a mapping relationship with the service model of the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship. Thus, the mapping information includes a mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device.
Optionally, the gateway device represents the mapping information in the form of a mapping table. As shown in table four below, a mapping table showing the mapping information is shown.
Watch four
BLE Mesh protocol Mapping count OCF protocol Mapping count
Equipment (or called 'node') 1 OCF equipment 1
Element(s) 1 OCF resources 1
Service model 1 OCF resource type 1
Status of state 1 OCF resource attributes 1
As can be seen from the fourth table, there is a mapping relationship between the first BLE Mesh device and the first OCF device, and the mapping relationship is a 1-to-1 mapping relationship; the element of the first BLE Mesh device has a mapping relation with the resource of the first OCF device, and the mapping relation is a 1-to-1 mapping relation; a mapping relation exists between a service model of the first BLE Mesh device and a resource type of the first OCF device, and the mapping relation is a 1-to-1 mapping relation; the state of the first BLE Mesh device has a mapping relationship with the resource attribute of the first OCF device, and the mapping relationship is a 1-to-1 mapping relationship. The mapping relationship between the state of the first BLE Mesh device and the resource attribute of the first OCF device may be directly obtained from the mapping relationship between the service model of the first BLE Mesh device and the resource type of the first OCF device.
Based on the mapping information including the three mapping relationships, as shown in fig. 7, the step 420 may be replaced by the following steps 42A to 42C, and the access method of the BLE Mesh device may include the following steps:
in step 410, the OCF client sends a first access request to the gateway device.
Based on the description of step 410 in the embodiment of fig. 4, a description of step 410 in the embodiment of fig. 7 can be obtained, and for the description of step 410 in the embodiment of fig. 7, please refer to the embodiment of fig. 4, which is not repeated herein.
Step 42A, the gateway device parses the first access request to obtain the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device.
After receiving the first access request sent by the OCF client, the virtual OCF server of the gateway device may parse the first access request, so as to obtain the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device, and then send the parsed information to the mapping function module of the gateway device.
Step 42B, the gateway device maps, according to the mapping information, the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and the service model of the first BLE Mesh device, respectively.
After receiving the analyzed information, a mapping function module of the gateway device queries the mapping information to map the analyzed information respectively, that is, a device identifier of the first BLE Mesh device corresponding to the device identifier of the first OCF device, an element address of the first BLE Mesh device corresponding to the resource address of the first OCF device, and a service model of the first BLE Mesh device corresponding to the resource type of the first OCF device are queried from the mapping information. After the mapping operation is completed, the mapping function module of the gateway device may send the information obtained by mapping to the virtual BLE Mesh client of the gateway device.
Step 42C, the gateway device sends the second access request to the first BLE Mesh device according to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and the service model of the first BLE Mesh device.
After receiving the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and the service model of the first BLE Mesh device, the virtual BLE Mesh client of the gateway device may send a second access request to the first BLE Mesh device, so as to complete an access process to the first BLE Mesh device through the OCF client.
The above steps 43A to 43C may specifically include the following steps: firstly, a resource address of a first OCF device can be analyzed in gateway equipment, and an element address of the first BLE Mesh device is obtained through the resource address; then, the gateway device may analyze the resource type of the first OCF device, and obtain the service model of the first BLE Mesh device through the resource type; and finally, obtaining a client model of the first BLE Mesh device through the service model of the first BLE Mesh device.
To sum up, according to the technical scheme provided by the embodiment of the application, after receiving the first access request sent by the OCF client, the gateway device may convert the first access request based on the OCF protocol sent by the OCF client into the second access request based on the BLE Mesh protocol according to the mapping information, and then send the second access request to the BLE Mesh device, thereby implementing a mode of accessing the BLE Mesh device through the OCF client. In addition, in the embodiment of the application, the gateway device determines the specific mapping relationship included in the mapping information between the OCF device and the BLE Mesh device, so that the gateway device can convert the access request more intuitively and definitely after receiving the access request of the OCF client, and the efficiency of converting the access request by the gateway device is improved.
In addition, according to the technical scheme provided by the embodiment of the application, the mapping relationship is directly established between the BLE Mesh device and the OCF device, and is not established between the BLE Mesh device and an OCF platform including a plurality of OCF devices, so that the number of the mapping relationships included in the mapping information can be reduced, the complexity of the mapping information during design and creation is reduced, and the processing overhead required by the gateway device during query of the mapping information is reduced.
In another example, the mapping information includes the following mapping relationships:
(1) mapping relation between the device identification of the first OCF device and the element address of the first BLE Mesh device;
based on the description of the device identifier of the first OCF device and the element address of the first BLE Mesh device in the optional embodiment, a description of the device identifier of the first OCF device and the element address of the first BLE Mesh device in this exemplary embodiment is obtained, and for the description, reference is made to the optional embodiment, and details are not repeated here.
In this embodiment, the first OCF device has a mapping relationship with elements of the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship. Thus, the mapping information includes a mapping relationship between the device identifier of the first OCF device and the element address of the first BLE Mesh device.
(2) A mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Based on the description of the mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device in the optional embodiment, an description of the mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device in the optional embodiment is obtained, and for the description, please refer to the optional embodiment above, and details are not repeated here.
In this embodiment, the resource type of the first OCF device has a mapping relationship with the service model of the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship. Thus, the mapping information includes a mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device.
Optionally, the gateway device represents the mapping information in the form of a mapping table. As shown in the following table five, a mapping table showing the above mapping information is shown.
Watch five
BLE Mesh protocol Mapping count OCF protocol Mapping count
Equipment (or called 'node') 1 OCF platform 1
Element(s) 1 OCF equipment 1
Service model 1 OCF resource type 1
Status of state 1 OCF resource attributes 1
As can be seen from table five, the first BLE Mesh device has a mapping relationship with the OCF platform, and the mapping relationship is a 1-to-1 mapping relationship. Optionally, the OCF platform may include a plurality of OCF clients, and each OCF client corresponds to one OCF device, so that the first BLE Mesh device may actually correspond to a plurality of OCF devices, that is, a one-to-many mapping relationship between the first BLE Mesh device and the OCF device. Since the first BLE Mesh device may have one or more elements, as shown in table five above, the elements of the first BLE Mesh device have a mapping relationship with the OCF device, and the mapping relationship is a 1-to-1 mapping relationship. In an embodiment of the present application, the first BLE Mesh device is a Node (Node) in a BLE Mesh network.
As can also be seen from the above table five, there is a mapping relationship between the service model of the first BLE Mesh device and the resource type of the first OCF device, and the mapping relationship is a 1-to-1 mapping relationship; the state of the first BLE Mesh device and the Resource property (Resource property) of the first OCF device also have a mapping relationship, and the mapping relationship is a 1-to-1 mapping relationship. The mapping relationship between the state of the first BLE Mesh device and the resource attribute of the first OCF platform may be directly obtained from the mapping relationship between the service model of the first BLE Mesh device and the resource type of the first OCF device.
Based on the mapping information including the two mapping relationships, as shown in fig. 8, the step 420 may be replaced by the following steps 421 to 423, and the access method of the BLE Mesh device may include the following steps:
in step 410, the OCF client sends a first access request to the gateway device.
Based on the description of step 410 in the embodiment of fig. 4, a description of step 410 in the embodiment of fig. 8 can be obtained, and for the description of step 410 in the embodiment of fig. 8, please refer to the embodiment of fig. 4, which is not repeated herein.
In step 421, the gateway device parses the first access request to obtain the device identifier of the first OCF device and the resource type of the first OCF device.
After receiving the first access request sent by the OCF client, the virtual OCF server of the gateway device may parse the first access request, so as to obtain the device identifier of the first OCF device and the resource type of the first OCF device, and then send the parsed information to the mapping function module of the gateway device.
In step 422, the gateway device maps the device identifier of the first OCF device and the resource type of the first OCF device to the element address of the first BLE Mesh device and the service model of the first BLE Mesh device, respectively, according to the mapping information.
After receiving the analyzed information, a mapping function module of the gateway device queries the mapping information to map the analyzed information respectively, that is, a mapping information is used to query an element address of the first BLE Mesh device corresponding to the device identifier of the first OCF device and a service model of the first BLE Mesh device corresponding to the resource type of the first OCF device. After the mapping operation is completed, the mapping function module of the gateway device may send the information obtained by mapping to the virtual BLE Mesh client of the gateway device.
In step 423, the gateway device sends a second access request to the first BLE Mesh device according to the element address of the first BLE Mesh device and the service model of the first BLE Mesh device.
After receiving the element address of the first BLE Mesh device and the service model of the first BLE Mesh device, the virtual BLE Mesh client of the gateway device may send a second access request to the first BLE Mesh device to complete an access process to the first BLE Mesh device through the OCF client.
To sum up, according to the technical scheme provided by the embodiment of the application, after receiving the first access request sent by the OCF client, the gateway device may convert the first access request based on the OCF protocol sent by the OCF client into the second access request based on the BLE Mesh protocol according to the mapping information, and then send the second access request to the BLE Mesh device, thereby implementing a mode of accessing the BLE Mesh device through the OCF client. In addition, in the embodiment of the application, the gateway device determines the specific mapping relationship included in the mapping information between the OCF device and the BLE Mesh device, so that the gateway device can convert the access request more intuitively and definitely after receiving the access request of the OCF client, and the efficiency of converting the access request by the gateway device is improved.
Referring to fig. 9, a flowchart of a method for creating and storing mapping information according to an embodiment of the present application is shown, where the method may be applied to the implementation environment shown in fig. 2, for example, to a gateway device in the implementation environment shown in fig. 2. The method comprises the following steps (910-930):
step 910, create a first OCF device.
After receiving the notification of creating the first OCF device, the virtual OCF server in the gateway device creates the first OCF device according to the notification. Optionally, the gateway device stores an OCF device list to be created, where the OCF device list to be created is used to indicate a correspondence between a device identifier of the first BLE Mesh device to be created and the OCF device to be created, and when creating the first OCF device, the functional module corresponding to the first OCF device may query the device identifier of the first BLE Mesh device to be discovered in the OCF device list to be created, and create the first OCF device corresponding to the first BLE Mesh device according to the device identifier of the first BLE Mesh device to be discovered. Optionally, each of the first OCF devices successfully created corresponds to a Device identification (Device index). Optionally, after the function module corresponding to the first OCF device successfully creates the first OCF device, the function module may return the device identifier of the first OCF device to the mapping function module in the gateway device.
In a possible implementation manner, as shown in fig. 10, the step 910 further includes the following steps (901 to 904) before:
in step 901, a first BLE Mesh device is stored as a node in a list of discovered BLE Mesh devices.
The discovered BLE Mesh device list includes a node corresponding to the discovered first BLE Mesh device, that is, in this embodiment, the discovered first BLE Mesh device is represented in the form of a node in the discovered BLE Mesh device list. The discovered BLE Mesh device list is located in a virtual BLE Mesh client of the gateway device, and may be a device list stored in the gateway device or a device list temporarily created by the gateway device, which is not limited in this embodiment of the present application. Optionally, the BLE Mesh device list to be created is initially empty.
And step 902, performing key binding on the service model corresponding to each node.
A correspondence exists between nodes in the discovered BLE Mesh device list and the first BLE Mesh device, the first BLE Mesh device corresponding to each node may have a plurality of service models, and optionally, the service models of the first BLE Mesh devices may be the same or different, which is not limited in this embodiment of the present application. For example, when the first BLE Mesh device includes a smart lamp and a smart air conditioner, the service model of the smart lamp may be a switch model, and the service model of the smart air conditioner may also be a switch model. For another example, when the first BLE Mesh device includes a smart lamp and a smart air conditioner, the service of the smart lamp may be a brightness model, a color temperature model, and a saturation model, and the service model of the smart air conditioner may be a temperature model, a humidity model.
The virtual BLE Mesh client of the gateway device may perform Key (Key) binding on the service model corresponding to each node, that is, distribute a Key to the service model corresponding to each node. In an embodiment of the present application, the secret key is allocated by the virtual BLE Mesh client and is used to encrypt data transmitted between the first BLE Mesh device and the virtual BLE Mesh client.
Step 903, a client model is appointed for the service model which is successfully bound.
The client model is located in the virtual BLE Mesh client, in this embodiment of the present application, there are one or more client models in the virtual BLE Mesh client, and optionally, each client model may correspond to one service model or one class of service models, which is not limited in this embodiment of the present application. For example, the switch models in the service models of different BLE Mesh devices may correspond to different client models of virtual BLE Mesh clients, and one switch model corresponds to one virtual BLE Mesh client model; the virtual BLE Mesh client may also correspond to the same client model. When each client model corresponds to one type of service model, the number of client models in the virtual BLE Mesh client is reduced.
Step 904, store the node in the list of OCF devices to be created.
After the virtual BLE Mesh client of the gateway device successfully creates the node, a notification of successful creation may be sent to the mapping relationship of the gateway device, and after the mapping function module receives the notification of successful creation of the node, the node that was successfully created may be stored in the OCF device list to be created. Optionally, in this embodiment of the application, after the mapping function module stores the node in the list of OCF devices to be created, a notification of creating the first OCF device may be sent to the virtual OCF server.
Step 920, establishing a mapping relationship between the first OCF device and the first BLE Mesh device.
After receiving the device identifier of the first OCF device, the mapping relationship module of the gateway device establishes a mapping relationship between the first OCF device and the first BLE Mesh device.
In one example, as shown in fig. 11, in order to obtain the mapping information shown in table four above, the step 920 may include the following sub-steps (92A to 92C):
step 92A, establishing a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device.
Optionally, the mapping relationship between the first OCF device and the first BLE Mesh device may be represented in the form of a key-value pair, and the first OCF device is a "key" and the first BLE Mesh device is a "value", where the "key" refers to a number of stored data, the "value" refers to stored data, and the first OCF device is a "key" refers to a number storing a device identifier of the first OCF device, and the first BLE Mesh device is a "value" refers to a device identifier of the first BLE Mesh device.
For example, the mapping relationship between the device identity of the first OCF device and the device identity of the first BLE Mesh device may be represented as: OCF Device index < - > Node.
Step 92B, establishing a mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device.
In this embodiment of the application, the service model of the first BLE Mesh device refers to a service model of successfully binding a secret key. When a mapping relationship exists between the first OCF device and the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship, a mapping relationship also exists between the resource type of the first OCF device and the service model of the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship.
For example, the mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device may be represented as: model SRV in OCF resource type < - > Node, wherein SRV is the abbreviation of server.
Step 92C, establishing a mapping relationship between the resource address of the first OCF device and the element address of the first BLE Mesh device.
The resource address of the first OCF device may be denoted as "/xx/xxxx/", where "xx" is the element address of the first BLE Mesh device. For example, the mapping relationship between the resource address of the first OCF device and the element address of the first BLE Mesh device may be represented as: OCF Resource href (href: < uri ═ xx/xxxx/>) < - > xx corresponds to the Element address where the Model SRV in the Node is located.
In another example, as shown in FIG. 12, in order to obtain the mapping information shown in Table five, the step 920 may include the following sub-steps (921-922):
step 921, establishing a mapping relationship between the device identifier of the first OCF device and the element address of the first BLE Mesh device.
In this embodiment of the application, a mapping relationship exists between element addresses of the first OCF device and the first BLE Mesh device, and the mapping relationship is a 1-to-1 mapping relationship. Alternatively, the mapping relationship between the element addresses of the first OCF device and the first BLE Mesh device may be represented in the form of a key-value pair, where the first OCF device is a "key" and the element address of the first BLE Mesh device is a "value".
For example, the mapping relationship between the device identity of the first OCF device and the element address of the first BLE Mesh device may be represented as: OCF Device Index < - > Element.
Step 922, establishing a mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device.
In this embodiment of the application, the service model of the first BLE Mesh device refers to a service model of successfully binding a secret key.
For example, the mapping relationship between the resource type of the first OCF device and the service model of the first BLE Mesh device may be represented as: model SRV in OCF resource type < - > Element.
Step 930, storing the mapping information according to the mapping relation.
After the mapping relationship is established between the first OCF device and the first BLE Mesh device, the mapping function module of the gateway device may store mapping information according to the mapping relationship, so as to perform conversion between information of different protocols according to the mapping information in the following cases of processing an access request of an OCF client and the like. Optionally, the mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device in the mapping information, or the mapping relationship between the device identifier of the first OCF device and the element address of the first BLE Mesh device, may be stored in the form of a key-value pair.
It should be noted that, in the above embodiment, the implementation sequence between the step 92A to the step 92C and the execution sequence between the step 921 to the step 922 are not limited, that is, the step numbers are only used for the purpose of distinguishing the respective steps, in practical applications, the step 92A to the step 92C may be executed simultaneously, the step 921 to the step 922 may also be executed simultaneously, and the execution sequence between the step 92A to the step 92C and the step 921 to the step 922 is not limited in this embodiment.
To sum up, according to the technical scheme provided by the embodiment of the application, a mapping relationship is established between the BLE Mesh device and the OCF device by creating the OCF device corresponding to the BLE Mesh device, and mapping information is stored according to the mapping relationship, so that a manner of establishing and storing mapping information is realized.
It should be noted that, in the foregoing method embodiment, the technical solution of the present application is mainly described from the perspective of interaction between the OCF client, the gateway device, and the first BLE Mesh device. The steps executed by the OCF client can be implemented separately as an access method of BLE Mesh equipment on the OCF client side; the steps executed by the gateway device may be implemented as an access method of a BLE Mesh device on the gateway device side; the above steps performed by the first BLE Mesh device may be implemented as an access method of a BLE Mesh device on the first BLE Mesh device side.
A specific example of the access method of the BLE Mesh device and the creating and storing method of the mapping information provided in the embodiment of the present application is described below.
Assuming that the smart networking system is a home smart networking system, and the first BLE Mesh device is a smart lamp, as shown in table six below, the device identifier of the smart lamp may be denoted as "Light", the device identifier of the first OCF device may be denoted as "oic.d.light", and a mapping relationship exists between "Light" and "oic.d.light".
Watch six
Device identification of first BLE Mesh device (Smart light) Device identification of first OCF device
Light oic.d.light
Thus, as shown in table seven below, the service model of the smart lamp includes: a general switch model (Generic off Server), a Light brightness model (Light brightness Server), a Light color temperature model (Light CTL Server), a Light hue and saturation model (Light HSL Server); the resource types of the first OCF device include: the method comprises the steps of establishing a mapping relation according to a service model of the intelligent electric lamp and a resource type of the first OCF device, wherein the mapping relation comprises a switch resource (oic.r.switch.binary), a brightness resource (oic.r.light.brightness), a color temperature resource (oic.r.color.color.color), a hue and saturation resource (oic.r.color.hs).
Watch seven
Service model of intelligent electric lamp Resource type of first OCF device
Generic OnOff Server oic.r.switch.binary
Light Lightness Server oic.r.light.brightness
Light CTL Server oic.r.colour.colourtemperature
Light HSL Server oic.r.colour.hs
In one example, as shown in fig. 13, in this example, there are two intelligent electric lamps, namely an intelligent electric lamp 1 and an intelligent electric lamp 2, and the gateway device may perform the following steps (1310 to 1390) in establishing mapping information between the intelligent electric lamp and the first OCF device:
step 1310, using the intelligent lamp 1 as a node 1, using the intelligent lamp 2 as a node 2, and storing the node 1 and the node 2 in the discovered device list;
step 1320, performing key binding for the service models corresponding to the node 1 and the node 2;
step 1330, assigning a client model for the successfully bound service model;
step 1340, storing the node 1 and the node 2 in an OCF device list to be created;
step 1350, creating a first OCF device; the example takes the first OCF device corresponding to the creation node 1 as an example for illustration;
step 1360, establishing a mapping relationship between the device identifier of the first OCF device and the device identifier of the smart lamp 1;
step 1370, establishing a mapping relation between the resource type of the first OCF device and the service model of the intelligent electric lamp 1; for example, a mapping relationship may be established between resource types "oic.r.switch.bind" of the first OCF device in a service Model "Generic one off Server Model" of the smart lamp, and then, in the first OCF device, an obtaining (GET), Setting (SET), and updating (Update) operation may be performed on a resource corresponding to the resource type;
step 1380, establishing a mapping relationship between the resource address of the first OCF device and the element address of the intelligent electric lamp 1;
at 1390, mapping information is stored according to the mapping relationship.
Referring to fig. 14 in conjunction, based on the mapping information created in the example of fig. 13, the GET procedure of the OCF client for the smart lamp may include the following procedures (1410-1470):
step 1410, the OCF client sends a first GET request to the gateway device; in this example, two OCF clients, namely an OCF client 1 and an OCF client 2, exist, and this example only exemplifies that the OCF client 2 sends the first access request;
step 1420, the gateway device parses the first GET request to obtain the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device; when the gateway device parses the GET request, the resource address of the first OCF device may be parsed first, and then the resource type of the first OCF device may be parsed;
step 1430, the gateway device maps the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the intelligent electric lamp, the element address of the intelligent electric lamp, and the service model of the intelligent electric lamp, respectively, according to the mapping information;
step 1440, the gateway device sends a second GET request to the smart lamp; the second GET request includes: the method comprises the steps of identifying equipment of the intelligent lamp, element addresses of the intelligent lamp and a service model of the intelligent lamp; in this example, there are two intelligent lamps, namely an intelligent lamp 1 and an intelligent lamp 2, and this example only takes the example that the intelligent lamp 1 receives the second access request as an example;
step 1450, the smart lamp sends the first GET result to the gateway device;
step 1460, the gateway device processes the first GET result to obtain a second GET result;
in step 1470, the gateway device sends the second GET result to the OCF client.
Referring to fig. 15 in combination, based on the mapping information created in the example of fig. 13, the SET procedure of the OCF client for the smart lamp may include the following procedures (1510-1570):
step 1510, the OCF client sends a first SET request to the gateway device; in this example, there are also two OCF clients, which are OCF client 1 and OCF client 2, and this example only takes the example where OCF client 2 sends the first access request as an example;
step 1520, the gateway device parses the first SET request to obtain the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device;
step 1530, the gateway device maps the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the intelligent electric lamp, the element address of the intelligent electric lamp, and the service model of the intelligent electric lamp, respectively, according to the mapping information;
step 1540, the gateway device sends a second SET request to the smart lamp; the second SET request includes: the method comprises the steps of identifying equipment of the intelligent lamp, element addresses of the intelligent lamp and a service model of the intelligent lamp; in this example, there are two intelligent lamps, namely an intelligent lamp 1 and an intelligent lamp 2, and this example only takes the example that the intelligent lamp 1 receives the second access request as an example;
step 1550, the smart lamp sends the first SET result to the gateway device;
step 1560, the gateway device processes the first SET result to obtain a second SET result;
step 1570, the gateway device sends the second SET result to the OCF client.
In another example, as shown in fig. 16, in this example, there are also two intelligent electric lamps, namely an intelligent electric lamp 1 and an intelligent electric lamp 2, and the gateway device may perform the following steps (1610 to 1680) in establishing mapping information between the intelligent electric lamp and the first OCF device:
step 1610, using the intelligent lamp 1 as a node 1, using the intelligent lamp 2 as a node 2, and storing the node 1 and the node 2 in a discovered intelligent lamp list;
step 1620, performing key binding on the service models corresponding to the node 1 and the node 2;
step 1630, assigning a client model for the successfully bound service model;
step 1640, storing node 1 and node 2 in an OCF device list to be created;
step 1650, creating a first OCF device; the example takes the first OCF device corresponding to the creation node 1 as an example for illustration;
step 1660, establishing a mapping relationship between the device identifier of the first OCF device and the element address of the smart lamp 1;
step 1670, establishing a mapping relationship between the resource type of the first OCF device and the service model of the intelligent electric lamp 1;
and 1680, storing the mapping information according to the mapping relation.
Referring to fig. 17 in combination, based on the mapping information created in the example of fig. 16, the SET procedure of the OCF client for the smart lamp may include the following procedures (1710 to 1770):
step 1710, the OCF client sends a first SET request to the gateway device; in this example, there are also two OCF clients, which are OCF client 1 and OCF client 2, and this example only takes the example where OCF client 1 sends the first access request as an example;
step 1720, the gateway device parses the first access request to obtain a device identifier of the first OCF device and a resource type of the first OCF device;
step 1730, the gateway device maps the device identifier of the first OCF device and the resource type of the first OCF device to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device, respectively, according to the mapping information;
step 1740, the gateway device sends a second SET request to the intelligent electric lamp; the second SET request includes: an element address of the first BLE Mesh device and a service model of the first BLE Mesh device; in this example, there are two intelligent lamps, namely an intelligent lamp 1 and an intelligent lamp 2, and this example only takes the example that the intelligent lamp 2 receives the second access request as an example;
step 1750, the intelligent electric lamp sends a first SET result to the gateway device;
step 1760, the gateway device processes the first SET result to obtain a second SET result;
step 1770, the gateway device sends the second SET result to the OCF client.
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. 18, a block diagram of an access device of a BLE Mesh device provided in 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. 18, the apparatus 1800 may include: a first request receiving module 1810 and a second request sending module 1820.
A first request receiving module 1810 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 for accessing a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device.
A second request sending module 1820, configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the second request sending module 1820 is configured to: sending the second access request to the first BLE Mesh device according to mapping information; the mapping information is used for determining a mapping relation between an access request based on an OCF protocol and an access request based on a BLE Mesh protocol.
Optionally, the mapping information includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, as shown in fig. 19, the second request sending module 1820 includes: a first request parsing sub-module 1822, configured to parse the first access request to obtain an equipment identifier of the first OCF device, a resource address of the first OCF device, and a resource type of the first OCF device; a mapping sub-module 1824, configured to map, according to the mapping information, the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device, respectively; a second request sending submodule 1826, configured to send the second access request to the first BLE Mesh device according to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device.
Optionally, the mapping information includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, as shown in fig. 19, the second request sending module 1820 includes: a first request parsing sub-module 1822, configured to parse the first access request to obtain a device identifier of the first OCF device and a resource type of the first OCF device; a mapping sub-module 1824, configured to map, according to the mapping information, the device identifier of the first OCF device and the resource type of the first OCF device to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device respectively; a second request sending submodule 1826, configured to send the second access request to the first BLE Mesh device according to the element address of the first BLE Mesh device and a service model of the first BLE Mesh device.
Optionally, as shown in fig. 19, the apparatus 1800 further includes: an OCF device creating module 1830, configured to create the first OCF device corresponding to the first BLE Mesh device; a mapping relationship establishing module 1840, configured to establish a mapping relationship between the first OCF device and the first BLE Mesh device; a mapping information storage module 1850, configured to store the mapping information according to the mapping relationship.
Optionally, as shown in fig. 19, the apparatus 1800 further includes: a first result receiving module 1860, configured to receive a first access result corresponding to the second access request sent by the first BLE Mesh device; a second result sending module 1870, configured to send a second access result to the OCF client, where the second access result is an access result that conforms to the OCF protocol and is generated by the gateway device according to the first access result.
Referring to fig. 20, a block diagram of an access device of a BLE Mesh device provided in an embodiment of the present application is shown. The device has the functions of realizing the method example of the OCF client side, and the functions can be realized by hardware or by executing corresponding software by hardware. The device may be the terminal installed and operated with the OCF client described above, or may be provided in the terminal installed and operated with the OCF client. As shown in fig. 20, the apparatus 2000 may include: a first request sending module 2010.
A first request sending module 2010, configured to send a first access request to a gateway device, where the first access request is a request of the OCF client for accessing a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device; the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Referring to fig. 21, a block diagram of an access device of a BLE Mesh device provided in an embodiment of the present application is shown. The device has the function of implementing the method example of the first BLE Mesh device side, and the function may be implemented by hardware or by hardware executing corresponding software. The apparatus may be the first BLE Mesh device described above, or may be provided in the first BLE Mesh device. As shown in fig. 21, the apparatus 2100 may comprise: the second request receiving module 2110.
A second request receiving module 2110, configured to receive a second access request sent by a gateway device, where the second access request is a request of the gateway device to access a service model of the first BLE Mesh device; the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
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. 22, a schematic structural diagram of a gateway device 220 according to an embodiment of the present application is shown. The gateway device 220 may be configured to implement the access method of the BLE Mesh device. The gateway device 220 may include: a processor 221, a receiver 222, a transmitter 223, a memory 224, and a bus 225.
The processor 221 includes one or more processing cores, and the processor 221 executes various functional applications and information processing by running software programs and modules.
The receiver 222 and the transmitter 223 may be implemented as one communication component, which may be a communication chip.
The memory 224 is coupled to the processor 221 by a bus 225.
The memory 224 may be used for storing a computer program, which the processor 221 is configured to execute in order to implement the steps performed by the gateway device in the above-described method embodiments.
Further, the memory 224 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 transceiver is configured to receive a first access request sent by an OCF client, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
the transceiver is further configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the transceiver is further configured to: sending the second access request to the first BLE Mesh device according to mapping information; the mapping information is used for determining a mapping relation between an access request based on an OCF protocol and an access request based on a BLE Mesh protocol.
Optionally, the mapping information includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the processor is configured to parse the first access request to obtain an equipment identifier of the first OCF device, a resource address of the first OCF device, and a resource type of the first OCF device; the processor is further configured to map, according to the mapping information, the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and the service model of the first BLE Mesh device, respectively; the transceiver is configured to send the second access request to the first BLE Mesh device according to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device.
Optionally, the mapping information includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the processor is configured to parse the first access request to obtain the device identifier of the first OCF device and the resource type of the first OCF device; the processor is further configured to map, according to the mapping information, the device identifier of the first OCF device and the resource type of the first OCF device to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device, respectively; the transceiver is configured to send the second access request to the first BLE Mesh device according to the element address of the first BLE Mesh device and a service model of the first BLE Mesh device.
Optionally, the processor is further configured to create the first OCF device corresponding to the first BLE Mesh device; the processor is further configured to establish a mapping relationship between the first OCF device and the first BLE Mesh device; the memory is used for storing the mapping information according to the mapping relation.
Optionally, the transceiver is further configured to receive a first access result corresponding to the second access request sent by the first BLE Mesh device; the transceiver is further configured to send a second access result to the OCF client, where the second access result is an access result that conforms to the OCF protocol and is generated by the gateway device according to the first access result.
Referring to fig. 23, a schematic structural diagram of a terminal 230 according to an embodiment of the present application is shown. The terminal 230 has an OCF client installed therein, and the terminal 230 may include: a processor 231, a receiver 232, a transmitter 233, a memory 234, and a bus 235.
The processor 231 includes one or more processing cores, and the processor 221 executes various functional applications and information processing by running software programs and modules.
The receiver 232 and the transmitter 233 may be implemented as one communication component, which may be a communication chip.
The memory 234 is coupled to the processor 231 by a bus 235.
The memory 234 may be used to store a computer program, which the processor 231 is used to execute to implement the various steps performed by the OCF client in the above-described method embodiments.
Further, the memory 234 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 terminal includes a processor, a memory, and a transceiver (which may include a receiver for receiving information and a transmitter for transmitting information);
the transceiver is configured to send a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device; the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Referring to fig. 24, a schematic structural diagram of a BLE Mesh device 240 provided in an embodiment of the present application is shown. The BLE Mesh device 240 may include: processor 241, receiver 242, transmitter 243, memory 244, and bus 245.
The processor 241 includes one or more processing cores, and the processor 241 executes various functional applications and information processing by executing software programs and modules.
The receiver 242 and the transmitter 243 may be implemented as one communication component, which may be a piece of communication chip.
The memory 244 is coupled to the processor 241 by a bus 245.
The memory 244 may be used to store a computer program that the processor 241 is configured to execute to implement the various steps performed by the first BLE Mesh device in the above-described method embodiments.
Further, memory 244 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 BLE Mesh device comprises a processor, a memory, and a transceiver (which may include a receiver for receiving information and a transmitter for transmitting information);
the transceiver is configured to receive a second access request sent by a gateway device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device; the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device; a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
Optionally, the mapping information between the first OCF device and the first BLE Mesh device includes the following mapping relationship: a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device; a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
An 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, so as to implement the method for accessing the BLE Mesh device on the gateway device side.
An 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 terminal, so as to implement the above-mentioned method for accessing BLE Mesh devices on an OCF client side.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the storage medium, where the computer program is used for being executed by a processor of a first BLE Mesh device, so as to implement the method for accessing a BLE Mesh device on the first BLE Mesh device side.
The application also provides a computer program product, and when the computer program product runs on a gateway device, the gateway device is enabled to execute the access method of the BLE Mesh device on the gateway device side.
The application also provides a computer program product, and when the computer program product runs on a terminal installed with an OCF client, the OCF client executes the method for accessing BLE Mesh devices on the OCF client side.
The present application further provides a computer program product, which when the computer program product runs on a BLE Mesh device, causes the first BLE Mesh device to execute the method for accessing a BLE Mesh device on the first BLE Mesh device side.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination thereof. 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 present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (34)

  1. An access method of a BLE Mesh device, applied to a gateway device, the method 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 resources of first OCF equipment, and the first OCF equipment is virtual OCF equipment mapped by first BLE Mesh equipment;
    sending a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  2. The method according to claim 1, wherein the sending a second access request to the first BLE Mesh device comprises:
    sending the second access request to the first BLE Mesh device according to mapping information;
    the mapping information is used for determining a mapping relation between an access request based on an OCF protocol and an access request based on a BLE Mesh protocol.
  3. The method of claim 2, wherein the mapping information comprises the following mapping relationships:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  4. The method according to claim 3, wherein the sending the second access request to the first BLE Mesh device according to mapping information comprises:
    analyzing the first access request to obtain the equipment identifier of the first OCF equipment, the resource address of the first OCF equipment and the resource type of the first OCF equipment;
    according to the mapping information, mapping the device identifier of the first OCF device, the resource address of the first OCF device and the resource type of the first OCF device to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device and the service model of the first BLE Mesh device respectively;
    sending the second access request to the first BLE Mesh device according to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device.
  5. The method of claim 2, wherein the mapping information comprises the following mapping relationships:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  6. The method according to claim 5, wherein the sending the second access request to the first BLE Mesh device according to mapping information comprises:
    analyzing the first access request to obtain the equipment identifier of the first OCF equipment and the resource type of the first OCF equipment;
    according to the mapping information, mapping the device identifier of the first OCF device and the resource type of the first OCF device to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device respectively;
    sending the second access request to the first BLE Mesh device according to the element address of the first BLE Mesh device and a service model of the first BLE Mesh device.
  7. The method according to any one of claims 2 to 6, wherein before transmitting the second access request to the first BLE Mesh device according to the mapping information, further comprising:
    creating the first OCF device corresponding to the first BLE Mesh device;
    establishing a mapping relationship between the first OCF device and the first BLE Mesh device;
    and storing the mapping information according to the mapping relation.
  8. The method according to any one of claims 1 to 7, wherein after the sending of the second access request to the first BLE Mesh device, further comprising:
    receiving a first access result corresponding to the second access request sent by the first BLE Mesh device;
    and sending a second access result to the OCF client, wherein the second access result is an access result which is generated by the gateway equipment according to the first access result and conforms to the OCF protocol.
  9. An access method of a BLE Mesh device, applied to an OCF client, the method comprising:
    sending a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
    the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  10. The method according to claim 9, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  11. The method according to claim 9, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  12. An access method of a BLE Mesh device, applied to a first BLE Mesh device, the method comprising:
    receiving a second access request sent by a gateway device, wherein the second access request is a request for accessing a service model of the first BLE Mesh device by the gateway device;
    the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  13. The method according to claim 12, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  14. The method according to claim 12, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  15. An access device of a BLE Mesh device, applied to a gateway device, the device comprising:
    a first request receiving module, configured to receive a first access request sent by an OCF client, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
    a second request sending module, configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  16. The apparatus of claim 15, wherein the second request sending module is configured to:
    sending the second access request to the first BLE Mesh device according to mapping information;
    the mapping information is used for determining a mapping relation between an access request based on an OCF protocol and an access request based on a BLE Mesh protocol.
  17. The apparatus of claim 16, wherein the mapping information comprises the following mapping relationship:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  18. The apparatus of claim 17, wherein the second request sending module comprises:
    the first request analysis submodule is used for analyzing the first access request to obtain the equipment identifier of the first OCF equipment, the resource address of the first OCF equipment and the resource type of the first OCF equipment;
    a mapping sub-module, configured to map, according to the mapping information, the device identifier of the first OCF device, the resource address of the first OCF device, and the resource type of the first OCF device to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device, respectively;
    a second request sending submodule, configured to send the second access request to the first BLE Mesh device according to the device identifier of the first BLE Mesh device, the element address of the first BLE Mesh device, and a service model of the first BLE Mesh device.
  19. The apparatus of claim 16, wherein the mapping information comprises the following mapping relationship:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  20. The apparatus of claim 19, wherein the second request sending module comprises:
    the first request analysis submodule is used for analyzing the first access request to obtain the equipment identifier of the first OCF equipment and the resource type of the first OCF equipment;
    a mapping sub-module, configured to map, according to the mapping information, the device identifier of the first OCF device and the resource type of the first OCF device to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device, respectively;
    a second request sending submodule, configured to send the second access request to the first BLE Mesh device according to an element address of the first BLE Mesh device and a service model of the first BLE Mesh device.
  21. The apparatus of any one of claims 16 to 20, further comprising:
    an OCF device creating module, configured to create the first OCF device corresponding to the first BLE Mesh device;
    a mapping relationship establishing module, configured to establish a mapping relationship between the first OCF device and the first BLE Mesh device;
    and the mapping information storage module is used for storing the mapping information according to the mapping relation.
  22. The apparatus of any one of claims 15 to 21, further comprising:
    a first result receiving module, configured to receive a first access result, which is sent by the first BLE Mesh device and corresponds to the second access request;
    and the second result sending module is used for sending a second access result to the OCF client, wherein the second access result is an access result which is generated by the gateway device according to the first access result and conforms to the OCF protocol.
  23. An access device of a BLE Mesh device, applied to an OCF client, the device comprising:
    a first request sending module, configured to send a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
    the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  24. The apparatus according to claim 23, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  25. The apparatus according to claim 23, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  26. An access apparatus for a BLE Mesh device, applied to a first BLE Mesh device, the apparatus comprising:
    a second request receiving module, configured to receive a second access request sent by a gateway device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device;
    the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  27. The apparatus according to claim 26, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between the device identifier of the first OCF device and the device identifier of the first BLE Mesh device;
    a mapping relationship between a resource address of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  28. The apparatus according to claim 26, wherein the mapping information between the first OCF device and the first BLE Mesh device comprises the following mapping relationship:
    a mapping relationship between a device identity of the first OCF device and an element address of the first BLE Mesh device;
    a mapping relationship between a resource type of the first OCF device and a service model of the first BLE Mesh device.
  29. A gateway device, characterized in that the gateway device comprises a processor, a memory and a transceiver;
    the transceiver is configured to receive a first access request sent by an OCF client, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
    the transceiver is further configured to send a second access request to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  30. A terminal is characterized in that the terminal is provided with an OCF client and comprises a processor, a memory and a transceiver;
    the transceiver is configured to send a first access request to a gateway device, where the first access request is a request for the OCF client to access a resource of a first OCF device, and the first OCF device is a virtual OCF device mapped by a first BLE Mesh device;
    the first access request is converted into a second access request and then sent to the first BLE Mesh device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  31. A BLE Mesh device, comprising a processor, a memory, and a transceiver;
    the transceiver is configured to receive a second access request sent by a gateway device, where the second access request is a request for the gateway device to access a service model of the first BLE Mesh device;
    the second access request is obtained by converting a first access request, the first access request is a request of an OCF client for accessing a resource of a first OCF device, the first OCF device is a virtual OCF device mapped by the first BLE Mesh device, and a mapping relationship exists between a resource type of the resource and the service model.
  32. A computer-readable storage medium, wherein a computer program is stored in the storage medium for execution by a processor to implement the method of accessing a BLE Mesh device according to any of claims 1 to 8.
  33. A computer-readable storage medium, wherein a computer program is stored in the storage medium for execution by a processor to implement the method of accessing a BLE Mesh device according to any of claims 9 to 11.
  34. A computer-readable storage medium, wherein a computer program is stored in the storage medium for execution by a processor to implement the method of accessing a BLE Mesh device according to any of claims 12 to 14.
CN201980097356.2A 2019-11-26 2019-11-26 Method, device, equipment and storage medium for accessing BLE Mesh equipment Pending CN113994649A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/121008 WO2021102694A1 (en) 2019-11-26 2019-11-26 Ble mesh device access method and apparatus, device and storage medium

Publications (1)

Publication Number Publication Date
CN113994649A true CN113994649A (en) 2022-01-28

Family

ID=76129114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980097356.2A Pending CN113994649A (en) 2019-11-26 2019-11-26 Method, device, equipment and storage medium for accessing BLE Mesh equipment

Country Status (2)

Country Link
CN (1) CN113994649A (en)
WO (1) WO2021102694A1 (en)

Families Citing this family (2)

* 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
WO2024050832A1 (en) * 2022-09-09 2024-03-14 Oppo广东移动通信有限公司 Command transmission method and apparatus, chip, storage medium and computer program

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951493A (en) * 2019-03-29 2019-06-28 深圳市信锐网科技术有限公司 A kind of network intercommunication method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465783B (en) * 2007-12-18 2011-04-06 闪联信息技术工程中心有限公司 Connection method, device and connection network bridge for isomery household network appliances
CN102497364A (en) * 2010-12-07 2012-06-13 中国科学院计算技术研究所 Bridge and method for bridging IGRS (intelligent Grouping and Resource Sharing) equipment and UPnP (Universal Plug-n-Play) equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951493A (en) * 2019-03-29 2019-06-28 深圳市信锐网科技术有限公司 A kind of network intercommunication method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LEE JOO-CHUL, ET A: "Virtualizing_Non-OCF_Devices_into_OCF_Ecosystem", 《 2018 INTERNATIONAL CONFERENCE ON INFORMATION AND CONFERENCE TECHNOLOGY CONVERGENCE》 *

Also Published As

Publication number Publication date
WO2021102694A1 (en) 2021-06-03

Similar Documents

Publication Publication Date Title
CN110933146B (en) Data conversion method and device and server
JP7012836B2 (en) Network slice management method and equipment
US10887394B2 (en) Mechanism and service for device naming
US11936743B2 (en) Device management services based on restful messaging
CN109417492B (en) Network function NF management method and NF management equipment
US10148739B2 (en) M2M data querying and invoking methods, querying and invoking devices, and system
CN111416723B (en) Equipment management method and related equipment
CN110413845B (en) Resource storage method and device based on Internet of things operating system
CN115486038B (en) Internet of things configuration method, internet of things configuration device, computer equipment and storage medium
CN110034944A (en) Network splitting and disposing method and device thereof
CN113994649A (en) Method, device, equipment and storage medium for accessing BLE Mesh equipment
KR102094041B1 (en) System having the Semantic Engine based on RDF Graph for Autonomous Interaction between IoT Devices in Real-Time
CN101345657A (en) Method and system for cluster management of multiple network elements based on simple network management protocol
CN111866856A (en) Mesh device control method and system, storage medium and electronic device
WO2022087795A1 (en) Resource mapping method and apparatus, device, and storage medium
CN113434190B (en) Data processing method and device, storage medium and electronic equipment
CN107710793A (en) A kind of localization method and corresponding intrument
CN113260072B (en) Mesh networking traffic scheduling method, gateway equipment and storage medium
CN115943616B (en) Attribute subscription method, device and equipment for Zigbee equipment
CN111107046B (en) Data stream transmission method and device
CN117596157B (en) Dynamic construction method, apparatus and storage medium for object model
WO2023138256A1 (en) Communication method and communication apparatus
WO2022116191A1 (en) Connection establishment method and apparatus, and device and storage medium
EP4311280A1 (en) Communication method and device
Noman MODULAR INTEROPERABILITY

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