WO2022116191A1 - 连接建立方法、装置、设备及存储介质 - Google Patents

连接建立方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022116191A1
WO2022116191A1 PCT/CN2020/134023 CN2020134023W WO2022116191A1 WO 2022116191 A1 WO2022116191 A1 WO 2022116191A1 CN 2020134023 W CN2020134023 W CN 2020134023W WO 2022116191 A1 WO2022116191 A1 WO 2022116191A1
Authority
WO
WIPO (PCT)
Prior art keywords
identifier
mapping relationship
ble mesh
endpoint
chip
Prior art date
Application number
PCT/CN2020/134023
Other languages
English (en)
French (fr)
Inventor
包永明
茹昭
张军
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to PCT/CN2020/134023 priority Critical patent/WO2022116191A1/zh
Priority to CN202080107383.6A priority patent/CN116491222A/zh
Publication of WO2022116191A1 publication Critical patent/WO2022116191A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/16Gateway arrangements

Definitions

  • the present application relates to the technical field of the Internet of Things, and in particular, to a connection establishment method, apparatus, device, and storage medium.
  • IoT devices can access the network, and terminal devices can control IoT devices through the network.
  • IoT devices include Zigbee (Zigbee) devices and Z-Wave (a wireless network protocol) devices.
  • Zigbee devices use Zigbee protocol
  • Z-Wave devices use Z-Wave protocol
  • terminal devices use CHIP (Connected Homeover Internet ProtocolWorking Group, Zigbee Protocol). Under the Bee Alliance through the Internet Internet Protocol Connection Home Workgroup) agreement.
  • the terminal device using the CHIP protocol needs to establish a connection with the Zigbee device or Z-Wave device through the bridge device, so as to perform protocol conversion through the bridge device, and connect the Zigbee device or Z-Wave device to the CHIP protocol, so that the terminal device can Communication with Zigbee devices or Z-Wave devices is based on the CHIP protocol.
  • IoT devices also include BLEMesh (Bluetooth Low Energy Mesh, Bluetooth Low Energy Mesh) devices
  • BLEMesh Bluetooth Low Energy Mesh
  • Bluetooth Low Energy Mesh Bluetooth Low Energy Mesh
  • the embodiments of this application provide a connection establishment method, apparatus, device, and storage medium.
  • the terminal device communicates with the BLE Mesh device using the CHIP protocol, which expands the way to control the BLE Mesh device.
  • CHIP protocol which expands the way to control the BLE Mesh device.
  • a method for establishing a connection is provided, applied to a bridging device, and the method includes:
  • the CHIP virtual device and the terminal device use the CHIP protocol
  • the BLE Mesh device and the terminal device are used for the CHIP virtual device based on the mapping relationship between the BLE Mesh device and the CHIP virtual device and the CHIP virtual device.
  • the connection between the device and the end device communicates.
  • connection establishment apparatus which is applied to a bridging device, and the apparatus includes:
  • a relationship establishment module is used to create a CHIP virtual device based on the connection between the bridge device and the BLE Mesh device, and establish a mapping relationship between the BLE Mesh device and the CHIP virtual device;
  • connection establishment module for establishing a connection between the CHIP virtual device and the terminal device
  • the CHIP virtual device and the terminal device use the CHIP protocol
  • the BLE Mesh device and the terminal device are used for the CHIP virtual device based on the mapping relationship between the BLE Mesh device and the CHIP virtual device and the CHIP virtual device.
  • the connection between the device and the end device communicates.
  • a bridge device includes: a processor; a transceiver connected to the processor; a memory for storing executable program codes of the processor; wherein, The processor is configured to load and execute the executable program code to implement the connection establishment method as described in the above aspects.
  • a computer-readable storage medium is provided, and executable program code is stored in the readable storage medium, and the executable program code is loaded and executed by the processor to implement the above-mentioned aspect The described connection establishment method.
  • a chip includes a programmable logic circuit and/or program instructions, when the chip runs on a bridge device, for implementing the connection establishment method described in the above aspect .
  • an embodiment of the present application provides a computer program product, which is used to implement the connection establishment method described in the foregoing aspect when the computer program product is executed by a processor of a bridge device.
  • the embodiment of this application provides a solution for establishing a connection between a BLE Mesh device and a CHIP virtual device.
  • the bridging device After the bridging device establishes the mapping relationship between the BLE Mesh device and the CHIP virtual device, it can ensure that the BLE Mesh device is connected to the CHIP network, so that the The terminal device communicates with the BLE Mesh device using the CHIP protocol, which expands the way to control the BLE Mesh device.
  • FIG. 1 shows a schematic structural diagram of a CHIP virtual device provided by an exemplary embodiment of the present application
  • FIG. 2 shows a schematic structural diagram of a BLE Mesh device provided by an exemplary embodiment of the present application
  • FIG. 3 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application
  • FIG. 4 shows a mapping relationship diagram provided by an exemplary embodiment of the present application
  • FIG. 5 shows a mapping relationship diagram provided by an exemplary embodiment of the present application
  • FIG. 6 shows a schematic diagram of a connection between a BLE Mesh device and a terminal device provided by an exemplary embodiment of the present application
  • FIG. 7 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application.
  • FIG. 8 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application
  • FIG. 9 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application.
  • FIG. 10 shows a block diagram of a connection establishment apparatus provided by an exemplary embodiment of the present application.
  • FIG. 11 shows a block diagram of a connection establishment apparatus provided by an exemplary embodiment of the present application.
  • FIG. 12 shows a schematic structural diagram of a communication device provided by an exemplary embodiment of the present application.
  • the CHIP virtual device is a device using the CHIP protocol.
  • the CHIP virtual device includes an endpoint, a cluster identifier and an attribute identifier.
  • the endpoint is used to represent the device identifier of the CHIP virtual device
  • the cluster identifier is used to represent the function of the CHIP virtual device.
  • the attribute identifier is used to represent the attribute of the CHIP virtual device.
  • the endpoint is represented by endpoint, the cluster ID is represented by cluster, and the attribute ID is represented by attribute.
  • Each endpoint includes a device ID (Identity document, identification number), which is used to represent the device type in the CHIP protocol.
  • the CHIP virtual device corresponds to endpoint1 and endpoint2
  • endpoint1 corresponds to cluster1 and cluster2
  • cluster1 corresponds to attribute1 and attribute2
  • endpoint2 corresponds to cluster3 and cluster4
  • cluster2 corresponds to two attribute identifiers, attribute3 and attribute4.
  • attribute1 and attribute2, and attribute3 and attribute4 respectively have data type and data, where the data type is represented by Type and the data is represented by Data.
  • the CHIP virtual device corresponds to at least one endpoint, and each endpoint corresponds to at least one cluster identifier, has at least one function, each cluster identifier corresponds to at least one attribute identifier, and each function has at least one attribute.
  • the BLE Mesh device includes element identification, model identification and status.
  • the element identification is used to represent the entity addressing identification of the BLE Mesh device
  • the model identification is used to indicate the function of the BLE Mesh device
  • the status is used to indicate the status of the BLE Mesh device. status.
  • the element identifier is represented by element
  • the model identifier is represented by model
  • the state is represented by state.
  • the BLE Mesh device corresponds to element1 and element2, element1 corresponds to model1 and model2, model1 corresponds to state1 and state2, and element2 corresponds to model3 and model4
  • a model identifier model2 corresponds to two states state3 and state4, and each state in state1 and state2, state3 and state4 has a data type and data, where the data type is represented by Type, and the data is represented by Data.
  • a BLE Mesh device corresponds to at least one element identifier, and each element identifier corresponds to at least one model identifier, has at least one function, each model identifier corresponds to at least one state, and each function has at least one state .
  • the bridge device acts as a bridge to connect the terminal device and the BLE Mesh device, so that the BLE Mesh device can be connected to the CHIP protocol adopted by the terminal device.
  • the bridging device includes a gateway device, a smart home device, or other type of device.
  • the embodiments of the present application are applied to a scenario in which the CHIP protocol is used to communicate with a BLE Mesh device.
  • the method provided by the embodiments of the present application is used to connect the terminal device and the BLE Mesh device using the CHIP protocol through the bridge device.
  • the BLE Mesh device establishes a connection so that the end device communicates with the BLE Mesh device under the CHIP protocol.
  • FIG. 3 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application. The method is applied to a bridging device, and the method includes at least part of the following contents:
  • a mapping relationship between the BLE Mesh device and the CHIP virtual device is first established, and the subsequent bridge device, according to the mapping relationship, performs the mapping between the received terminal device or the CHIP virtual device.
  • the request of the BLE Mesh device is processed to realize the communication between the end device and the BLE Mesh device.
  • the bridge device creates a CHIP virtual device based on the connection with the BLE Mesh device, and establishes the mapping relationship between the BLE Mesh device and the CHIP virtual device, and completes the mapping between the BLE Mesh device and the CHIP virtual device.
  • a mapping relationship between the device information of the BLE Mesh device and the device information of the CHIP virtual device is established.
  • the device information of the BLE Mesh device includes element identification, model identification and status.
  • the element identification is used to indicate the entity addressing identification of the BLE Mesh device
  • the model identification is used to indicate the function of the BLE Mesh device
  • the status is used to indicate the BLE Mesh device. status.
  • the device information of the CHIP virtual device includes element identifier, model identifier and status.
  • the element identifier is used to represent the entity addressing identifier of the BLE Mesh device
  • the model identifier is used to represent the function of the BLE Mesh device
  • the state is used to represent the location where the BLE Mesh device is located. state.
  • the mapping relationship between the device information of the BLE Mesh device and the device information of the CHIP virtual device is established, including the following situations:
  • the device information of the BLE Mesh device includes the element identifier
  • the device information of the CHIP virtual device includes the endpoint
  • the endpoints of the CHIP virtual device are 0x0012, 0x0013, and 0x0014
  • the element identifiers of the BLE Mesh device are 0x0001, 0x0002, and 0x0003.
  • 0x0012 corresponds to 0x0001
  • 0x0013 corresponds to 0x0002
  • 0x0014 corresponds to 0x0003.
  • the endpoints of the CHIP virtual device are set to 0x0001, 0x0002 and 0x0003, and the endpoint 0x0001 of the CHIP virtual device directly represents the element identifier 0x0001 of the BLE Mesh device, and the CHIP virtual device
  • the endpoint 0x0002 of the device directly represents the element identifier 0x0002 of the BLE Mesh device
  • the endpoint 0x0003 of the CHIP virtual device directly represents the element identifier 0x0003 of the BLE Mesh device.
  • the element identifier of the BLE Mesh device is equivalent to the endpoint of the CHIP virtual device, and the bridge device can directly determine the element identifier of the BLE Mesh device corresponding to the endpoint of the CHIP virtual device.
  • the element identifier of the BLE Mesh device includes a master element identifier and a slave element identifier
  • the master element identifier can represent the node addressing of the BLE Mesh device
  • the slave element identifier is the sum of accumulated values based on the master element identifier .
  • the main element identifier is 0x0001
  • the first slave element identifier is 0x0002 after the main element identifier plus 1
  • the second slave element identifier is 0x0003 after the main element identifier plus 2, and so on. Determined on the basis of the main element identification.
  • mapping relationship is stored in the mapping relationship table; or, the mapping relationship is stored in the bridging device.
  • the bridging device can create a mapping relationship table, and store the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device in the mapping relationship table.
  • the subsequent bridge device receives the endpoint of the CHIP virtual device, it queries the mapping Relationship table to determine the element identifier of the corresponding BLE Mesh device.
  • the mapping relationship is stored in the mapping relationship table, and the mapping relationship can be determined directly by querying the mapping relationship table, the mapping is flexible, and the query efficiency is improved.
  • the bridge device after the bridge device establishes a connection with the BLE Mesh device, directly determine the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, and save the mapping relationship directly in the bridge device. If the bridge device obtains the CHIP virtual device The endpoint of the device directly determines the element identifier of the BLE Mesh device corresponding to the endpoint of the CHIP virtual device.
  • mapping relationship is directly stored in the bridging device, and there is no need to maintain the mapping relationship table, which saves resources.
  • the endpoint list of the CHIP virtual device is determined, the endpoint list includes at least one endpoint of the CHIP virtual device, and the mapping relationship between the element identifier of the BLE Mesh device and the endpoint list of the CHIP virtual device is established.
  • an endpoint list is allocated to the BLE Mesh device, and the mapping relationship between the element identifier of the BLE Mesh device and the endpoint list of the CHIP virtual device is established.
  • the identification of the endpoint list of the CHIP virtual device is used to establish a mapping relationship with the element identification of the BLE Mesh device, and the element identification of the BLE Mesh device is determined according to the endpoint list of the CHIP virtual device, and then the endpoint of the CHIP virtual device is determined. Correspondence to the element identifier of the BLE Mesh device.
  • the endpoint list includes three endpoints, 0x0012, 0x0013, and 0x0014, which correspond to the element identifiers 0x0001, 0x0002, and 0x0003 of the BLE Mesh device in one-to-one correspondence.
  • the device information of the BLE Mesh device further includes a model identifier
  • the CHIP virtual device also includes a cluster identifier.
  • a mapping relationship between the model identifier and the cluster identifier is established.
  • the cluster identifier can be determined according to the mapping relationship.
  • the corresponding model ID is established.
  • the model ID of a BLE Mesh device is 0x1000
  • the cluster ID corresponding to the model ID is 0x0008
  • the established mapping relationship includes the corresponding relationship between 0x1000 and 0x0008.
  • the device information of the BLE Mesh device further includes a state
  • the CHIP virtual device also includes an attribute identifier.
  • a mapping relationship between the state and the attribute identifier is established.
  • the attribute identifier corresponding to the state can be determined according to the mapping relationship. .
  • mapping relationship in the embodiments of the present application may be combined with each other, so that the established mapping relationship includes the mapping relationship between multiple device information.
  • the methods (1), (2) and (3) are integrated to establish a mapping relationship, and the mapping relationship includes the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the BLE Mesh The mapping relationship between the model ID of the device and the cluster ID of the CHIP virtual device, and the mapping relationship between the state of the BLE Mesh device and the attribute ID of the CHIP virtual device.
  • FIG. 4 shows a mapping relationship diagram provided by an exemplary embodiment of the present application.
  • the device information of the CHIP virtual device and the device information of the BLE Mesh device have a one-to-one correspondence.
  • the element identifier of the BLE Mesh device includes the master element identifier and the slave element identifier. Based on the master element identifier, the BLE Mesh device can be addressed, and the slave element identifier is the sum of the accumulated values based on the master element identifier.
  • the device information of the BLE Mesh device includes a main element identifier
  • the device information of the CHIP virtual device includes an endpoint.
  • a mapping relationship between the main element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device is established.
  • the mapping relationship can determine the main element identifier of the BLE Mesh device corresponding to the endpoint.
  • the device information of the BLE Mesh device further includes an element identifier
  • the CHIP virtual device also includes a cluster identifier.
  • a mapping relationship between the element identifier and the cluster identifier is established, and when the cluster identifier is received, the cluster identifier is determined according to the mapping relationship. The corresponding element ID.
  • the device information of the BLE Mesh device also includes a model identifier
  • the device information of the CHIP virtual device also includes an attribute identifier.
  • mapping relationship includes the mapping relationship between multiple device information.
  • methods (4), (5) and (6) are integrated to establish a mapping relationship, and the mapping relationship includes the main element identification in the element identification of the BLE Mesh device and the endpoint of the CHIP virtual device.
  • the mapping relationship, the mapping relationship between the element ID of the BLE Mesh device and the cluster ID of the CHIP virtual device, and the mapping relationship between the model ID of the BLE Mesh device and the attribute ID of the CHIP virtual device are integrated to establish a mapping relationship, and the mapping relationship includes the main element identification in the element identification of the BLE Mesh device and the endpoint of the CHIP virtual device.
  • FIG. 5 shows a mapping relationship diagram provided by an exemplary embodiment of the present application.
  • the device information of the CHIP virtual device and the device information of the BLE Mesh device have a one-to-one correspondence.
  • the subsequent terminal obtains the state data corresponding to the state of the BLE Mesh device according to the mapping relationship.
  • the establishment of the mapping relationship between the BLE Mesh device and the CHIP virtual device is completed through step 301, and the connection between the CHIP virtual device and the terminal device is subsequently established.
  • the bridge device is used as the connection between the terminal device and the BLE Mesh device.
  • the bridge between the terminal device and the BLE Mesh device realizes the communication.
  • the terminal device is a device with a CHIP client function, and the terminal device has execution control service or request service, or can also execute other services.
  • an application (CHIP APP) is installed in the terminal device, and the application is a program that uses the CHIP protocol to control the BLE Mesh device.
  • FIG. 6 shows a schematic diagram of a connection between a BLE Mesh device and a terminal device provided by an exemplary embodiment of the present application.
  • the bridge device is represented by Bridge, which can connect with each BLE Mesh device through a secure communication link, and can also interpret the BLE Mesh device as a CHIP virtual device and display it in the CHIP APP, providing the CHIP APP with possible interface to access.
  • CHIP APP1, CHIP APP2 and CHIP APP3 are installed in the terminal device.
  • the bridge devices include CHIP device1 and CHIP device2, which correspond to Bridge device1 and Bridge device2 of BLE Mesh devices.
  • Bridge establishes BLE Mesh network connections with Bridge device1 and Bridge device2 respectively.
  • Bridge It is connected with CHIP device1 and CHIP device 2 by CHIP network respectively.
  • Each CHIP APP in CHIP APP1, CHIP APP2 and CHIP APP3 can call the interface provided by Bridge to control BLE Mesh device through Bridge.
  • the terminal device after the terminal device and the BLE Mesh device can communicate through the bridge device, the terminal device sends a read request to the BLE Mesh device based on the connection to read the status data of the BLE Mesh device.
  • the read request is used to read the status data of the BLE Mesh device.
  • the read request carries first device information of the CHIP virtual device, where the first device information includes an endpoint and a cluster identifier, or the first device information includes an endpoint, a cluster identifier, and an attribute identifier.
  • mapping relationship determine second device information corresponding to the first device information.
  • the terminal device adopts the CHIP protocol.
  • the device information carried in the read request is the device information of the CHIP virtual device.
  • the device information of the BLE Mesh device can be determined according to the device information and mapping relationship of the CHIP virtual device included in the read request.
  • the bridge device can convert the device information of the CHIP virtual device into the device information of the BLE Mesh device according to the established mapping relationship. If the BLE Mesh device receives To the converted device information sent by the bridge device, corresponding status data can be determined according to the device information.
  • mapping relationship includes the mapping relationship between the endpoint list and the element identifier
  • the bridging device determines the element identifier corresponding to the endpoint based on the mapping relationship, it needs to determine the element identifier corresponding to the endpoint list to which the endpoint belongs in the mapping relationship.
  • the embodiments of this application are only described by taking the bridging device as an example to determine the element identifier of the BLE Mesh device corresponding to the endpoint based on the mapping relationship between the endpoint list and the BLE Mesh device.
  • the terminal device needs to obtain the endpoint of the CHIP virtual device included in the endpoint list from the bridge device, and then obtain the element identifier of the corresponding BLE Mesh device according to the obtained endpoint of the CHIP virtual device.
  • the terminal device sends the list identifier of the endpoint list to the bridge device, and the bridge device determines the corresponding endpoint list according to the list identifier, and returns the endpoint list to the terminal device.
  • the bridge device After the bridge device determines the second device information corresponding to the first device information, it sends a read request including the second device information to the BLE Mesh device, and the BLE Mesh device receives the read including the second device information. After the request, the state data corresponding to the second device information is sent to the bridge device, and the bridge device can determine the state data of the BLE Mesh device to which the second device information belongs.
  • the method for determining the status data is also different:
  • the read request includes the endpoint and the cluster ID, then based on the mapping relationship, determine the element ID corresponding to the endpoint and the model ID corresponding to the cluster ID, and determine the state data of the state corresponding to the model ID.
  • the bridging device determines the corresponding element identifier and model identifier according to the endpoint and cluster identifier included in the read request, and then can determine the state data of at least one state corresponding to the model identifier.
  • the state data of the one state is determined, and if the model identifier corresponds to three states, the state data of the three states is determined.
  • the mapping relationship between the CHIP virtual device and the BLE Mesh device established by the bridge device includes the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the model identifier of the BLE Mesh device and the cluster identifier of the CHIP virtual device.
  • the mapping relationship between the BLE Mesh devices, or the mapping relationship includes the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the mapping relationship between the model identifier of the BLE Mesh device and the cluster identifier of the CHIP virtual device, and the BLE Mesh device.
  • the mapping relationship between the state of the mesh device and the attribute identification of the CHIP virtual device after receiving the read request, the bridge device can determine the element identification corresponding to the endpoint and the model identification corresponding to the cluster identification based on the mapping relationship, and determine the model identification.
  • the state data for the corresponding state is
  • the read request includes endpoints, cluster IDs and attribute IDs, then based on the mapping relationship, determine the element ID corresponding to the endpoint, the model ID corresponding to the cluster ID, and the state corresponding to the attribute ID, and determine the status data of the state.
  • the bridging device can determine the corresponding element identifier, model identifier and state according to the endpoint, cluster identifier and attribute identifier included in the read request, and then can determine the state data of the state.
  • the mapping relationship between the CHIP virtual device and the BLE Mesh device established by the bridge device includes the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the model identifier of the BLE Mesh device and the cluster identifier of the CHIP virtual device. and the mapping relationship between the state of the BLE Mesh device and the attribute identifier of the CHIP virtual device, after receiving the read request, the bridge device can determine the element identifier corresponding to the endpoint and the corresponding cluster identifier based on the mapping relationship.
  • Model ID which determines the state data of the state corresponding to the model ID.
  • the read request includes endpoints, cluster identifiers and attribute identifiers, based on the mapping relationship, determine the main element identifier corresponding to the endpoint, the element identifier corresponding to the cluster identifier, and the model identifier corresponding to the attribute identifier, and determine the state corresponding to the model identifier. status data.
  • the bridging device determines the corresponding main element identifier, element identifier and model identifier according to the endpoint, cluster identifier and attribute identifier included in the read request, and can then determine the state data of at least one state corresponding to the model identifier.
  • the state data of the one state is determined, and if the model identifier corresponds to three states, the state data of the three states is determined.
  • the mapping relationship between the CHIP virtual device and the BLE Mesh device established by the bridge device includes the mapping relationship between the main element identifier in the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the element identifier of the BLE Mesh device and the CHIP virtual device.
  • the bridging device determines the corresponding main element identifier and element identifier according to the endpoint and cluster identifier included in the read request, then can determine at least one model identifier corresponding to the element identifier, and then determine the corresponding model identifier for each model identifier. State data for at least one state.
  • an element identifier corresponds to a model identifier
  • a model identifier corresponds to the state data of a state
  • an element identifier corresponds to multiple model identifiers
  • a model identifier corresponds to the state data of a state
  • an element identifier corresponds to multiple model identifiers
  • a A model identifies state data corresponding to multiple states.
  • the mapping relationship between the CHIP virtual device and the BLE Mesh device established by the bridge device includes the mapping relationship between the main element identifier in the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the element identifier of the BLE Mesh device and the CHIP virtual device.
  • the mapping relationship between the cluster identifiers of the devices, or the mapping relationship includes the mapping relationship between the main element identifier in the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the element identifier of the BLE Mesh device and the CHIP virtual device.
  • the bridge device determines the status data of the BLE Mesh device in the above manner. Before sending the status data to the terminal device, it needs to convert the status data into attribute data that the terminal device can recognize, and then send the attribute to the terminal device. data to complete the process of the terminal device reading the status data of the BLE Mesh device.
  • the embodiments of the present application only take a bridging device as an example to describe the connection establishment method as an example.
  • the bridge device includes a CHIP virtual service module, a CHIP bridge module and a BLE Mesh virtual client.
  • the BLE Mesh virtual client is used to establish a secure connection with the BLE Mesh device and interact with the BLE Mesh device.
  • the CHIP bridge module is used to establish the mapping relationship between the BLE Mesh device and the CHIP virtual device, and the CHIP virtual service The module is used to create a CHIP virtual device, establish a secure connection with the terminal device, and interact with the terminal device.
  • the embodiment of this application provides a solution for establishing a connection between a BLE Mesh device and a CHIP virtual device.
  • the bridging device After the bridging device establishes the mapping relationship between the BLE Mesh device and the CHIP virtual device, it can ensure that the BLE Mesh device is connected to the CHIP network, so that the The terminal device communicates with the BLE Mesh device using the CHIP protocol, which expands the way to control the BLE Mesh device.
  • FIG. 3 describes a method for the bridge device to realize the communication between the BLE Mesh device and the CHIP virtual device by establishing a mapping relationship between the BLE Mesh device and the CHIP virtual device.
  • the bridging device includes a CHIP virtual service module, a CHIP bridging module and a BLE Mesh virtual client. The following describes the interaction between various modules in the bridging device and between the terminal device and the BLE Mesh device.
  • FIG. 7 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application. Referring to FIG. 7 , the method includes:
  • the BLE Mesh virtual client establishes a secure connection with the BLE Mesh device.
  • the BLE Mesh virtual client sends a mapping relationship establishment request to the CHIP bridge module.
  • the CHIP bridge module establishes a request based on the mapping relationship, and establishes the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the mapping relationship between the model identifier of the BLE Mesh device and the cluster identifier of the CHIP virtual device, and The mapping relationship between the state of the BLE Mesh device and the attribute identifier of the CHIP virtual device.
  • the CHIP bridge module sends a creation request to the CHIP virtual service module.
  • the CHIP virtual service module creates a CHIP virtual device based on the creation request.
  • the CHIP virtual service module establishes a secure connection with the terminal device.
  • the terminal device sends a read request to the CHIP virtual service module.
  • the CHIP virtual service module sends a relationship resolution request to the CHIP bridge module.
  • the CHIP bridge module determines the status of the BLE Mesh device based on the device information included in the relationship resolution request, and sends a data read request to the BLE Mesh virtual client.
  • the BLE Mesh virtual client sends a data read request to the BLE Mesh device.
  • the BLE Mesh virtual client receives status data corresponding to the status returned by the BLE Mesh device.
  • the BLE Mesh virtual client sends status data to the CHIP bridge module.
  • the CHIP bridge module converts the status data into attribute data, and sends the attribute data to the CHIP virtual service module.
  • the CHIP virtual service module sends attribute data to the terminal device.
  • the bridge device can also establish a mapping relationship between the endpoint list and the BLE Mesh device.
  • Step 703 is replaced by 7031.
  • the method further includes steps 71-75:
  • the CHIP bridge module establishes a request based on the mapping relationship, establishes the mapping relationship between the device identifier of the BLE Mesh device and the endpoint list, the mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device, the The mapping relationship between the model ID and the cluster ID of the CHIP virtual device, and the mapping relationship between the state of the BLE Mesh device and the attribute ID of the CHIP virtual device.
  • the terminal device sends a list reading request to the CHIP virtual service module.
  • the CHIP virtual service module sends the accepted list reading request to the CHIP bridge module.
  • the CHIP bridge module determines the corresponding endpoint list according to the list identifier in the list read request.
  • the CHIP bridge module sends the endpoint list to the CHIP virtual service module.
  • the CHIP virtual service module sends the endpoint list to the terminal device.
  • FIG. 9 shows a flowchart of a connection establishment method provided by an exemplary embodiment of the present application. Referring to FIG. 9 , the method includes:
  • the BLE Mesh virtual client establishes a secure connection with the BLE Mesh device.
  • the BLE Mesh virtual client sends a mapping relationship establishment request to the CHIP bridge module.
  • the CHIP bridge module establishes a request based on the mapping relationship, and establishes a mapping relationship between the main element identification in the element identification of the BLE Mesh device and the endpoint of the CHIP virtual device, and the element identification of the BLE Mesh device and the cluster identification of the CHIP virtual device.
  • the CHIP bridge module sends a creation request to the CHIP virtual service module.
  • the CHIP virtual service module creates a CHIP virtual device based on the creation request.
  • the CHIP virtual service module establishes a secure connection with the terminal device.
  • the terminal device sends a read request to the CHIP virtual service module.
  • the CHIP virtual service module sends a relationship resolution request to the CHIP bridge module.
  • the CHIP bridge module determines the status of the BLE Mesh device based on the device information included in the relationship resolution request, and sends a data read request to the BLE Mesh virtual client.
  • the BLE Mesh virtual client sends a data read request to the BLE Mesh device.
  • the BLE Mesh virtual client receives status data corresponding to the status returned by the BLE Mesh device.
  • the BLE Mesh virtual client sends status data to the CHIP bridge module.
  • the CHIP bridge module converts the status data into attribute data, and sends the attribute data to the CHIP virtual service module.
  • the CHIP virtual service module sends attribute data to the terminal device.
  • FIG. 10 shows a block diagram of a connection establishment apparatus provided by an exemplary embodiment of the present application, and the apparatus includes:
  • the relationship establishment module 1001 is used to create a CHIP virtual device based on the connection between the bridge device and the BLE Mesh device, and establish a mapping relationship between the BLE Mesh device and the CHIP virtual device;
  • a connection establishment module 1002 is used to establish a connection between the CHIP virtual device and the terminal device;
  • the CHIP virtual device and the terminal device use the CHIP protocol
  • the BLE Mesh device and the terminal device are used to communicate based on the mapping relationship between the BLE Mesh device and the CHIP virtual device and the connection between the CHIP virtual device and the terminal device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the device information of the BLE Mesh device and the device information of the CHIP virtual device.
  • the device information of the BLE Mesh device includes an element identifier, a model identifier, and a state.
  • the element identifier is used to represent the entity addressing identifier of the BLE Mesh device
  • the model identifier is used to represent the function of the BLE Mesh device
  • the state is used to represent the BLE Mesh device.
  • the device information of the CHIP virtual device includes an endpoint, a cluster ID and an attribute ID.
  • the endpoint is used to represent the device ID of the CHIP virtual device
  • the cluster ID is used to represent the function of the CHIP virtual device
  • the attribute ID is used to represent the attribute of the CHIP virtual device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the element identifier of the BLE Mesh device and the endpoint of the CHIP virtual device.
  • the relationship establishment module 1001 includes:
  • the establishment unit 10012 is configured to establish a mapping relationship between the device identifier of the BLE Mesh device and the endpoint list of the CHIP virtual device.
  • mapping relationship is stored in the mapping relationship table; or, the mapping relationship is stored in the bridging device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the model identification of the BLE Mesh device and the cluster identification of the CHIP virtual device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the state of the BLE Mesh device and the attribute identifier of the CHIP virtual device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the main element identification in the element identification of the BLE Mesh device and the endpoint of the CHIP virtual device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the element identification of the BLE Mesh device and the cluster identification of the CHIP virtual device.
  • the relationship establishment module 1001 is configured to establish a mapping relationship between the model identification of the BLE Mesh device and the attribute identification of the CHIP virtual device.
  • the receiving module 1003 is configured to receive a read request sent by the terminal device based on the connection between the CHIP virtual device and the terminal device, and the read request carries the first device information of the CHIP virtual device,
  • the first device information includes an endpoint and a cluster identifier, or the first device information includes an endpoint, a cluster identifier, and an attribute identifier;
  • an information determination module 1004 configured to determine the second device information corresponding to the first device information based on the mapping relationship
  • a data determination module 1005, configured to determine the status data of the BLE Mesh device to which the second device information belongs;
  • the conversion module 1006 is used to convert the state data into corresponding attribute data
  • the sending module 1007 is used for sending attribute data to the terminal device.
  • the first device information includes an endpoint and a cluster identifier
  • the information determination module 1004 is configured to determine, based on the mapping relationship, an element identifier corresponding to the endpoint and a model identifier corresponding to the cluster identifier;
  • the data determination module 1005 is configured to determine the state data of the state corresponding to the model identifier.
  • the device information includes an endpoint, a cluster identifier, and an attribute identifier
  • the information determination module 1004 is configured to determine, based on the mapping relationship, an element identifier corresponding to the endpoint, a model identifier corresponding to the cluster identifier, and a state corresponding to the attribute identifier;
  • the data determination module 1005 is used for determining the state data of the state.
  • the information determining module 1004 is configured to determine at least one endpoint included in the endpoint list to which the endpoint belongs in the mapping relationship;
  • the sending module 1007 is configured to send at least one endpoint to the terminal device.
  • the first device information includes an endpoint, a cluster identifier, and an attribute identifier.
  • the information determination module 1004 is configured to determine, based on the mapping relationship, a main element identifier corresponding to the endpoint, an element identifier corresponding to the cluster identifier, and a model corresponding to the attribute identifier. identification;
  • the data determination module 1005 is configured to determine the state data of the state corresponding to the model identifier.
  • the first device information includes an endpoint and a cluster identifier
  • the information determination module 1004 is configured to determine the main element identifier corresponding to the endpoint and the element identifier corresponding to the cluster identifier based on the mapping relationship;
  • the information determination module 1004 is configured to determine each model identifier corresponding to the element identifier; and determine the state data of the state corresponding to each model identifier.
  • FIG. 12 shows a schematic structural diagram of a bridge device provided by an exemplary embodiment of the present application.
  • the bridge device includes: a processor 1201 , a receiver 1202 , a transmitter 1203 , a memory 1204 , and a bus 1205 .
  • the processor 1201 includes one or more processing cores, and the processor 1201 executes various functional applications and information processing by running software programs and modules.
  • the receiver 1202 and the transmitter 1203 may be implemented as a communication component, which may be a communication chip.
  • the memory 1204 is connected to the processor 1201 through the bus 1205 .
  • the memory 1204 may be configured to store at least one program code, and the processor 1201 is configured to execute the at least one program code, so as to implement various steps in the above method embodiments.
  • the memory 1204 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 Anytime Access Memory (SRAM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Programmable Read Only Memory (PROM).
  • EEPROM electrically erasable programmable read-only Memory
  • EPROM Erasable Programmable Read Only Memory
  • SRAM Static Anytime Access Memory
  • ROM Read Only Memory
  • Magnetic Memory Magnetic Memory
  • Flash Memory Programmable Read Only Memory
  • a computer-readable storage medium in which executable program code is stored, and the executable program code is loaded and executed by the processor to implement the above
  • the method embodiment provides a connection establishment method performed by a communication device.
  • a chip is also provided, the chip includes a programmable logic circuit and/or program instructions, when the chip runs on a bridge device, for implementing the connection establishment method as described above.
  • a computer program product for implementing the connection establishment method described above when the computer program product is executed by a processor of a bridging device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请公开了一种连接建立方法、装置、设备及存储介质,涉及物联网技术领域。该方法包括:基于所述桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系;建立所述CHIP虚拟设备与终端设备之间的连接,能够保证BLE Mesh设备接入到CHIP网络中,以使终端设备与BLE Mesh设备采用CHIP协议进行通信,扩展了控制BLE Mesh设备的方式。

Description

连接建立方法、装置、设备及存储介质 技术领域
本申请涉及物联网技术领域,特别涉及一种连接建立方法、装置、设备及存储介质。
背景技术
随着物联网技术的快速发展,多种多样的物联网设备能够接入网络,进而终端设备能够通过网络控制物联网设备。
物联网设备包括Zigbee(紫蜂)设备和Z-Wave(一种无线网络协议)设备,Zigbee设备采用Zigbee协议,Z-Wave设备采用Z-Wave协议,而终端设备采用CHIP(ConnectedHomeoverInternet ProtocolWorking Group,紫蜂联盟下通过网际互连协议连接家庭工作组)协议。因此,采用CHIP协议的终端设备需要通过桥接设备与Zigbee设备或Z-Wave设备建立连接,以便通过桥接设备进行协议转换,将Zigbee设备或Z-Wave设备接入到CHIP协议中,以使终端设备与Zigbee设备或Z-Wave设备之间在CHIP协议基础上进行通信。
但是,由于物联网设备中还包括BLEMesh(BluetoothLowEnergyMesh,蓝牙低功耗网格网络)设备,如何建立采用CHIP协议的终端设备与BLEMesh设备之间的连接成为亟需解决的问题。
发明内容
本申请实施例提供了一种连接建立方法、装置、设备及存储介质,终端设备与BLE Mesh设备采用CHIP协议进行通信,扩展了控制BLE Mesh设备的方式。所述技术方案如下:
根据本申请的一个方面,提供了一种连接建立方法,应用于桥接设备,所述方法包括:
基于所述桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系;
建立所述CHIP虚拟设备与终端设备之间的连接;
其中,所述CHIP虚拟设备和所述终端设备采用CHIP协议,所述BLE Mesh设备与所述终端设备用于基于所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系和所述CHIP虚拟设备与终端设备之间的连接进行通信。
根据本申请的一个方面,提供了一种连接建立装置,应用于桥接设备,所述装置包括:
关系建立模块,用于基于所述桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系;
连接建立模块,用于建立所述CHIP虚拟设备与终端设备之间的连接;
其中,所述CHIP虚拟设备和所述终端设备采用CHIP协议,所述BLE Mesh设备与所述终端设备用于基于所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系和所述CHIP虚拟设备与终端设备之间的连接进行通信。
根据本申请的一个方面,提供了一种桥接设备,所述终端设备包括:处理器;与所述处理器相连的收发器;用于存储所述处理器的可执行程序代码的存储器;其中,所述处理器被配置为加载并执行所述可执行程序代码以实现如上述方面所述的连接建立方法。
根据本申请的一个方面,提供了一种计算机可读存储介质,所述可读存储介质中存储有可执行程序代码,所述可执行程序代码由所述处理器加载并执行以实现如上述方面所述的连接建立方法。
根据本申请的一个方面,提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在桥接设备上运行时,用于实现如上述方面所述的连接建立方法。
根据本申请的一个方面,本申请实施例提供了一种计算机程序产品,当所述计算机程序产品被桥接设备的处理器执行时,其用于实现上述方面所述的连接建立方法。
本申请实施例提供的技术方案至少包括如下有益效果:
本申请实施例提供了一种建立BLE Mesh设备和CHIP虚拟设备的连接的方案,桥接设备建立BLE Mesh设备和CHIP虚拟设备的映射关系后,能够保证BLE Mesh设备接入到CHIP网络中,以使终端设备与BLE Mesh设备采用CHIP协议进行通信,扩展了控制BLE Mesh设备的方式。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请一个示例性实施例提供的CHIP虚拟设备的结构示意图;
图2示出了本申请一个示例性实施例提供的BLE Mesh设备的结构示意图;
图3示出了本申请一个示例性实施例提供的连接建立方法的流程图;
图4示出了本申请一个示例性实施例提供的映射关系图;
图5示出了本申请一个示例性实施例提供的映射关系图;
图6示出了本申请一个示例性实施例提供的一种BLE Mesh设备与终端设备连接的示意图;
图7示出了本申请一个示例性实施例提供的连接建立方法的流程图;
图8示出了本申请一个示例性实施例提供的连接建立方法的流程图;
图9示出了本申请一个示例性实施例提供的连接建立方法的流程图;
图10示出了本申请一个示例性实施例提供的连接建立装置的框图;
图11示出了本申请一个示例性实施例提供的连接建立装置的框图;
图12示出了本申请一个示例性实施例提供的通信设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种概念,但除非特别说明,这些概念不受这些术语限制。这些术语仅用于将一个概念与另一个概念区分。
首先,对本申请实施例中涉及的名词进行简单介绍:
CHIP虚拟设备:该CHIP虚拟设备为采用CHIP协议的设备,该CHIP虚拟设备包括端点、簇标识和属性标识,该端点用于表示CHIP虚拟设备的设备标识,簇标识用于表示CHIP虚拟设备的功能,属性标识用于表示CHIP虚拟设备的属性。
其中,该端点采用endpoint表示,簇标识采用cluster表示,属性标识采用attribute表示。每个endpoint中包括一个device(设备)ID(Identity document,身份识别号),该deviceID在CHIP协议中用于表示设备类型。
例如,如图1所示,该CHIP虚拟设备对应有endpoint1和endpoint2两个端点,endpoint1对应有cluster1和cluster2两个簇标识,cluster1对应有attribute1和attribute2两个属性标识,endpoint2对应有cluster3和cluster4两个簇标识,cluster2对应有attribute3和attribute4两个属性标识,另外attribute1和attribute2、attribute3和attribute4分别具有数据类型和数据,其中,数据类型由Type表示,数据由Data表示。
通过图1可知,CHIP虚拟设备对应有至少一个端点,并且每个端点对应有至少一个簇标识,具有至少一种功能,每种簇标识对应至少一个属性标识,每种功能下具有至少一个属性。
BLE Mesh设备:该BLE Mesh设备包括元素标识、模型标识和状态,元素标识用于表示 BLE Mesh设备的实体寻址标识,模型标识用于表示BLE Mesh设备的功能,状态用于表示BLE Mesh设备所处的状态。
其中,该元素标识采用element表示,模型标识采用model表示,状态采用state表示。
例如,如图2所示,该BLE Mesh设备对应有element1和element2两个元素标识,element1对应有model1和model2两个模型标识,model1对应有state1和state2两个状态,element2对应有model3和model4两个模型标识,model2对应有state3和state4两个状态,另外state1和state2、state3和state4中的每个state具有数据类型和数据,其中,数据类型由Type表示,数据由Data表示。
通过图2可知,BLE Mesh设备对应有至少一个元素标识,并且每个元素标识对应有至少一个模型标识,具有至少一种功能,每个模型标识对应至少一个状态,每种功能下具有至少一个状态。
桥接设备:该桥接设备作为桥梁将终端设备和BLE Mesh设备连接,以使BLE Mesh设备接入到终端设备采用的CHIP协议中。在一些实施例中,该桥接设备包括网关设备、智能家居设备或者其他类型的设备。
本申请实施例应用于采用CHIP协议与BLE Mesh设备进行通信的场景下,对于当前已知的至少一个BLE Mesh设备,采用本申请实施例提供的方法,通过桥接设备将采用CHIP协议的终端设备和BLE Mesh设备建立连接,以使终端设备与BLE Mesh设备在CHIP协议下进行通信。
图3示出了本申请一个示例性实施例提供的连接建立方法的流程图,该方法应用于桥接设备中,该方法包括以下内容中的至少部分内容:
301、基于桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立BLE Mesh设备与CHIP虚拟设备之间的映射关系。
在本申请实施例中,为了实现通过桥接设备将终端设备与BLE Mesh设备连接,先建立BLE Mesh设备与CHIP虚拟设备之间的映射关系,后续桥接设备根据该映射关系,对接收的终端设备或者BLE Mesh设备的请求进行处理,以实现终端设备与BLE Mesh设备之间的通信。
桥接设备基于与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立BLE Mesh设备与CHIP虚拟设备之间的映射关系,完成BLE Mesh设备与CHIP虚拟设备的映射。
在一些实施例中,建立BLE Mesh设备的设备信息与CHIP虚拟设备的设备信息之间的映射关系。
其中,BLE Mesh设备的设备信息包括元素标识、模型标识和状态,元素标识用于表示BLE Mesh设备的实体寻址标识,模型标识用于表示BLE Mesh设备的功能,状态用于表示BLE Mesh设备所处的状态。
CHIP虚拟设备的设备信息包括元素标识、模型标识和状态,元素标识用于表示BLE Mesh设备的实体寻址标识,模型标识用于表示BLE Mesh设备的功能,状态用于表示BLE Mesh设备所处的状态。
在BLE Mesh设备和CHIP虚拟设备包括上述设备信息的基础上,建立BLE Mesh设备的设备信息与CHIP虚拟设备的设备信息的映射关系包括以下情况:
(1)建立BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系。
在本申请实施例中,BLE Mesh设备的设备信息包括元素标识,CHIP虚拟设备的设备信息包括端点,则建立元素标识与端点的映射关系,在接收到端点时,即能够确定端点对应的元素标识。
例如,CHIP虚拟设备的端点为0x0012、0x0013和0x0014,BLE Mesh设备的元素标识为0x0001、0x0002和0x0003,则在映射关系中为0x0012对应0x0001,0x0013对应0x0002, 0x0014对应0x0003。
又例如,若BLE Mesh设备的元素标识为0x0001、0x0002和0x0003,则将CHIP虚拟设备的端点设置为0x0001、0x0002和0x0003,CHIP虚拟设备的端点0x0001直接表示BLE Mesh设备的元素标识0x0001,CHIP虚拟设备的端点0x0002直接表示BLE Mesh设备的元素标识0x0002,CHIP虚拟设备的端点0x0003直接表示BLE Mesh设备的元素标识0x0003。
在此种情况下,BLE Mesh设备的元素标识与CHIP虚拟设备的端点为等价关系,桥接设备能够直接确定CHIP虚拟设备的端点对应的BLE Mesh设备的元素标识。
在一些实施例中,BLE Mesh设备的元素标识包括主元素标识和从元素标识,该主元素标识能够表示BLE Mesh设备的节点寻址,从元素标识为在主元素标识的基础上累计值之和。
例如,主元素标识为0x0001,则第一个从元素标识为主元素标识加1之后的0x0002,第二个从元素标识为主元素标识加2之后的0x0003,以此类推,从元素标识均能够在主元素标识的基础上确定。
在一些实施例中,映射关系存储于映射关系表中;或者,映射关系存储于桥接设备中。
其中,桥接设备能够创建映射关系表,将BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系存储在映射关系表中,后续桥接设备接收到CHIP虚拟设备的端点时,查询该映射关系表,以确定对应的BLE Mesh设备的元素标识。
本申请实施例将映射关系存储在映射关系表中,直接通过查询映射关系表就能够确定映射关系,映射灵活,并且提高了查询效率。
或者,桥接设备与BLE Mesh设备建立连接后,直接确定BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系,将映射关系直接保存在桥接设备中,若桥接设备获取到该CHIP虚拟设备的端点,直接确定该CHIP虚拟设备的端点对应的BLE Mesh设备的元素标识。
本申请实施例直接将映射关系存储于桥接设备中,无需维护映射关系表,节省了资源。
在一些实施例中,确定CHIP虚拟设备的端点列表,端点列表中包括CHIP虚拟设备的至少一个端点,建立BLE Mesh设备的元素标识与CHIP虚拟设备的端点列表之间的映射关系。
在建立CHIP虚拟设备与BLE Mesh设备之间的映射关系的过程中,为BLE Mesh设备分配一个端点列表,建立BLE Mesh设备的元素标识与CHIP虚拟设备的端点列表之间的映射关系。
在一种可能实现方式中,采用CHIP虚拟设备的端点列表的标识与BLE Mesh设备的元素标识建立映射关系,根据CHIP虚拟设备的端点列表确定BLE Mesh设备的元素标识,进而确定CHIP虚拟设备的端点与BLE Mesh设备的元素标识的对应关系。
例如,该端点列表中包括0x0012、0x0013和0x0014三个端点,这三个端点分别与BLE Mesh设备的元素标识0x0001、0x0002和0x0003一一对应。
(2)建立BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系。
在本申请实施例中,BLE Mesh设备的设备信息还包括模型标识,CHIP虚拟设备还包括簇标识,建立模型标识与簇标识的映射关系,在接收到簇标识时,根据映射关系能够确定簇标识对应的模型标识。
例如,BLE Mesh设备的模型标识为0x1000,与该模型标识对应的簇标识为0x0008,建立的映射关系中包括0x1000与0x0008的对应关系。
(3)建立BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系。
在本申请实施例中,BLE Mesh设备的设备信息还包括状态,CHIP虚拟设备还包括属性标识,建立状态与属性标识的映射关系,在接收到状态时,根据映射关系能够确定状态对应的属性标识。
需要说明的是,本申请实施例中的建立映射关系的方式(1)、(2)和(3)可以互相结合,以使建立的映射关系包括多个设备信息之间的映射关系。
在一些实施例中,综合方式(1)、(2)和(3)来建立映射关系,则该映射关系中包括 BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系。
例如,图4示出了本申请一个示例性实施例提供的映射关系图,参见图4,CHIP虚拟设备的设备信息与BLE Mesh设备的设备信息具有一一对应的关系。
(4)建立BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系。
其中,BLE Mesh设备的元素标识包括主元素标识和从元素标识,基于该主元素标识能够寻址到该BLE Mesh设备,从元素标识为在主元素标识的基础上累计值之和。
该BLE Mesh设备的设备信息中包括主元素标识,CHIP虚拟设备的设备信息中包括端点,在本申请实施例中建立BLE Mesh设备的主元素标识与CHIP虚拟设备的端点的映射关系,在接收到CHIP虚拟设备的端点时,能够映射关系确定端点对应的BLE Mesh设备的主元素标识。
(5)建立BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系。
在本申请实施例中,BLE Mesh设备的设备信息还包括元素标识,CHIP虚拟设备还包括簇标识,建立元素标识与簇标识的映射关系,则在接收到簇标识时,根据映射关系确定簇标识对应的元素标识。
(6)建立BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
在本申请实施例中,BLE Mesh设备的设备信息还包括模型标识,CHIP虚拟设备的设备信息还包括属性标识,建立模型标识与属性标识的映射关系,则在接收到属性标识时,根据映射关系确定属性标识对应的模型标识。
需要说明的是,本申请实施例中的建立映射关系的方式(4)、(5)和(6)可以互相结合,以使建立的映射关系包括多个设备信息之间的映射关系。
在一些实施例中,综合方式(4)、(5)和(6)来建立映射关系,则该映射关系中包括BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
例如,图5示出了本申请一个示例性实施例提供的映射关系图,参见图5,CHIP虚拟设备的设备信息与BLE Mesh设备的设备信息具有一一对应的关系。
本申请实施例建立CHIP虚拟设备与BLE Mesh设备的映射关系后,后续终端根据该映射关系获取BLE Mesh设备的状态对应的状态数据。
302、建立CHIP虚拟设备与终端设备之间的连接。
在本申请实施例中,通过步骤301完成BLE Mesh设备与CHIP虚拟设备的映射关系的建立,后续在建立CHIP虚拟设备与终端设备之间的连接,此时桥接设备作为终端设备与BLE Mesh设备之间的桥梁,实现终端设备与BLE Mesh设备之间的通信。其中,该终端设备为具有CHIP客户端功能的设备,该终端设备具有执行控制服务或请求服务,或者还能够执行其他服务。
在一些实施例中,该终端设备中安装有应用程序(CHIP APP),该应用程序为采用CHIP协议控制BLE Mesh设备的程序。
例如,图6示出了本申请一个示例性实施例提供的一种BLE Mesh设备与终端设备连接的示意图。参见图6,桥接设备由Bridge表示,该桥接设备能够通过安全通信链路与每个BLE Mesh设备连接,并且还能够将BLE Mesh设备解释为CHIP虚拟设备显示在CHIP APP中,为CHIP APP提供可访问的接口。终端设备中安装有CHIP APP1、CHIP APP2和CHIP APP3,桥接设备包括CHIP device1和CHIP device2,与BLE Mesh设备对应Bridge device1和Bridge device2,则Bridge与Bridge device1和Bridge device2分别建立BLE Mesh网络连接,Bridge与CHIP device1和CHIP device 2分别采用CHIP网络连接,CHIP APP1、CHIP APP2和CHIP APP3中的每个CHIP APP能够调用Bridge提供的接口通过Bridge控制BLE Mesh设备。
303、基于CHIP虚拟设备与终端设备之间的连接,接收终端设备发送的读取请求。
在本申请实施例中,终端设备与BLE Mesh设备之间能够通过桥接设备通信后,则终端设备基于该连接向BLE Mesh设备发送读取请求,以读取BLE Mesh设备的状态数据。
其中,该读取请求用于读取BLE Mesh设备的状态数据。读取请求携带CHIP虚拟设备的第一设备信息,第一设备信息包括端点和簇标识,或者,第一设备信息包括端点、簇标识和属性标识。
304、基于映射关系,确定第一设备信息对应的第二设备信息。
在本申请实施例中,终端设备采用CHIP协议,则终端设备发送读取请求时,该读取请求中携带的设备信息均为CHIP虚拟设备的设备信息,桥接设备接收到该读取请求后,能够根据读取请求中包括的CHIP虚拟设备的设备信息和映射关系,确定BLE Mesh设备的设备信息。
由于BLE Mesh设备无法识别终端设备发送的读取请求中包括的设备信息,因此桥接设备能够根据建立的映射关系,将CHIP虚拟设备的设备信息转换为BLE Mesh设备的设备信息,若BLE Mesh设备接收到桥接设备发送的转换后的设备信息,能够根据该设备信息确定对应的状态数据。
在一些实施例中,由于映射关系中包括端点列表与元素标识的映射关系,桥接设备再基于映射关系确定端点对应的元素标识时,需要确定映射关系中端点所属的端点列表对应的元素标识。
需要说明的是,本申请实施例仅是以桥接设备基于端点列表与BLE Mesh设备之间的映射关系,确定端点对应的BLE Mesh设备的元素标识为例进行说明。而在此过程之前,终端设备需要先从桥接设备中获取端点列表中包括的CHIP虚拟设备的端点,进而根据获取的CHIP虚拟设备的端点获取对应的BLE Mesh设备的元素标识。
在一些实施例中,终端设备向桥接设备发送该端点列表的列表标识,则桥接设备根据该列表标识确定对应的端点列表,向终端设备返回该端点列表。
305、确定第二设备信息所属的BLE Mesh设备的状态数据。
在本申请实施例中,桥接设备确定第一设备信息对应的第二设备信息后,则向BLE Mesh设备发送包括第二设备信息的读取请求,BLE Mesh设备接收包括第二设备信息的读取请求后,将第二设备信息对应的状态数据发送给桥接设备,则桥接设备能够确定第二设备信息所属的BLE Mesh设备的状态数据。
在本申请实施例中,由于桥接设备建立的映射关系的方式不同,因此确定状态数据的方法也不同:
第一种方式:
由于终端设备发送的读取请求中包括的第一设备信息不同,因此需要采用不同的方式获取BLE Mesh设备的状态数据:
(1)若读取请求中包括端点和簇标识,则基于映射关系,确定端点对应的元素标识以及簇标识对应的模型标识,确定模型标识对应的状态的状态数据。
在本申请实施例中,桥接设备根据读取请求中包括的端点和簇标识确定对应的元素标识和模型标识,则能够确定该模型标识对应的至少一个状态的状态数据。
例如,若该模型标识对应一个状态,则确定这一个状态的状态数据,若该模型标识对应三个状态,则确定这三个状态的状态数据。
其中,桥接设备建立的CHIP虚拟设备与BLE Mesh设备的映射关系中包括BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系,或者,该映射关系中包括BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系,则该桥接设备接收到读取请求后,能够基于该映射关系确定端点对应的元素标识以及簇标识 对应的模型标识,确定模型标识对应的状态的状态数据。
(2)若读取请求中包括端点、簇标识和属性标识,则基于映射关系,确定端点对应的元素标识、簇标识对应的模型标识以及属性标识对应的状态,确定状态的状态数据。
在本申请实施例中,桥接设备根据读取请求中包括的端点、簇标识和属性标识,确定对应的元素标识、模型标识和状态,则能够确定该状态的状态数据。
其中,桥接设备建立的CHIP虚拟设备与BLE Mesh设备的映射关系中包括BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系,则该桥接设备接收到读取请求后,能够基于该映射关系确定端点对应的元素标识以及簇标识对应的模型标识,确定模型标识对应的状态的状态数据。
第二种方式:
由于终端设备发送的读取请求中包括的第一设备信息不同,因此需要采用不同的方式获取BLE Mesh设备的状态数据:
(1)若读取请求中包括端点、簇标识和属性标识,基于映射关系,确定端点对应的主元素标识以及簇标识对应的元素标识以及属性标识对应的模型标识,确定模型标识对应的状态的状态数据。
在本申请实施例中,桥接设备根据读取请求中包括的端点、簇标识和属性标识确定对应的主元素标识、元素标识和模型标识,则能够确定模型标识对应的至少一个状态的状态数据。
例如,若该模型标识对应一个状态,则确定这一个状态的状态数据,若该模型标识对应三个状态,则确定这三个状态的状态数据。
其中,桥接设备建立的CHIP虚拟设备与BLE Mesh设备的映射关系中包括BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
(2)若读取请求中包括端点和簇标识,基于映射关系,确定端点对应的主元素标识以及簇标识对应的元素标识,确定元素标识对应的每个模型标识,确定每个模型标识对应的状态的状态数据。
在本申请实施例中,桥接设备根据读取请求中包括的端点和簇标识确定对应的主元素标识和元素标识,则能够确定元素标识对应的至少一个模型标识,进而确定每个模型标识对应的至少一个状态的状态数据。
例如,元素标识对应一个模型标识,一个模型标识对应一个状态的状态数据,或者,元素标识对应多个模型标识,一个模型标识对应一个状态的状态数据,或者,元素标识对应多个模型标识,一个模型标识对应多个状态的状态数据。
其中,桥接设备建立的CHIP虚拟设备与BLE Mesh设备的映射关系中包括BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系,或者,该映射关系中包括BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
306、将状态数据转换为对应的属性数据。
307、向终端设备发送属性数据。
在本申请实施例中,桥接设备通过上述方式确定BLE Mesh设备的状态数据,向终端设备发送状态数据之前,需要先将状态数据转换为终端设备能够识别的属性数据,再向终端设备发送该属性数据,完成终端设备读取BLE Mesh设备的状态数据的过程。
需要说明的是,本申请实施例仅是以桥接设备为例对连接建立方法为例进行说明。在另一实施例中,该桥接设备中包括CHIP虚拟服务模块、CHIP桥接模块和BLE Mesh虚拟客户 端。
其中,该BLE Mesh虚拟客户端用于与BLE Mesh设备之间建立安全连接,与BLE Mesh设备进行交互,该CHIP桥接模块用于建立BLE Mesh设备与CHIP虚拟设备之间的映射关系,CHIP虚拟服务模块用于创建CHIP虚拟设备,建立与终端设备的安全连接,与终端设备进行交互。
本申请实施例提供了一种建立BLE Mesh设备和CHIP虚拟设备的连接的方案,桥接设备建立BLE Mesh设备和CHIP虚拟设备的映射关系后,能够保证BLE Mesh设备接入到CHIP网络中,以使终端设备与BLE Mesh设备采用CHIP协议进行通信,扩展了控制BLE Mesh设备的方式。
图3实施例中描述了桥接设备通过建立BLE Mesh设备和CHIP虚拟设备的映射关系,进而实现BLE Mesh设备和CHIP虚拟设备之间的通信的方法。在一些实施例中,该桥接设备中包括CHIP虚拟服务模块、CHIP桥接模块和BLE Mesh虚拟客户端,下面以桥接设备中各个模块之间、终端设备和BLE Mesh设备之间的交互进行说明。图7示出了本申请一个示例性实施例提供的连接建立方法的流程图,参见图7,该方法包括:
701、BLE Mesh虚拟客户端与BLE Mesh设备建立安全连接。
702、BLE Mesh虚拟客户端向CHIP桥接模块发送映射关系建立请求。
703、CHIP桥接模块基于该映射关系建立请求,建立BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系。
704、CHIP桥接模块向CHIP虚拟服务模块发送创建请求。
705、CHIP虚拟服务模块基于创建请求创建CHIP虚拟设备。
706、CHIP虚拟服务模块建立与终端设备的安全连接。
707、终端设备向CHIP虚拟服务模块发送读取请求。
708、CHIP虚拟服务模块向CHIP桥接模块发送关系解析请求。
709、CHIP桥接模块基于关系解析请求中包括的设备信息确定BLE Mesh设备的状态,向BLE Mesh虚拟客户端发送数据读取请求。
710、BLE Mesh虚拟客户端向BLE Mesh设备发送数据读取请求。
711、BLE Mesh虚拟客户端接收BLE Mesh设备返回的状态对应的状态数据。
712、BLE Mesh虚拟客户端向CHIP桥接模块发送状态数据。
713、CHIP桥接模块将状态数据转换为属性数据,向CHIP虚拟服务模块发送属性数据。
714、CHIP虚拟服务模块向终端设备发送属性数据。
在图7实施例的基础上,桥接设备还能够建立端点列表与BLE Mesh设备之间的映射关系,步骤703替换为7031,在步骤707之前,参见图8,该方法还包括步骤71-75:
7031、CHIP桥接模块基于该映射关系建立请求,建立BLE Mesh设备的设备标识与端点列表之间的映射关系,BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系。
71、终端设备向CHIP虚拟服务模块发送列表读取请求。
72、CHIP虚拟服务模块将接受的列表读取请求发送给CHIP桥接模块。
73、CHIP桥接模块根据列表读取请求中的列表标识确定对应的端点列表。
74、CHIP桥接模块向CHIP虚拟服务模块发送端点列表。
75、CHIP虚拟服务模块向终端设备发送端点列表。
上述图7实施例是以建立BLE Mesh设备与CHIP虚拟设备的映射关系的一种可能实现方式为例进行说明。下面将对建立BLE Mesh设备与CHIP虚拟设备的映射关系的另一种可能实 现方式进行说明。图9示出了本申请一个示例性实施例提供的连接建立方法的流程图,参见图9,该方法包括:
901、BLE Mesh虚拟客户端与BLE Mesh设备建立安全连接。
902、BLE Mesh虚拟客户端向CHIP桥接模块发送映射关系建立请求。
903、CHIP桥接模块基于该映射关系建立请求,建立BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系、BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系以及BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
904、CHIP桥接模块向CHIP虚拟服务模块发送创建请求。
905、CHIP虚拟服务模块基于创建请求创建CHIP虚拟设备。
906、CHIP虚拟服务模块建立与终端设备的安全连接。
907、终端设备向CHIP虚拟服务模块发送读取请求。
908、CHIP虚拟服务模块向CHIP桥接模块发送关系解析请求。
909、CHIP桥接模块基于关系解析请求中包括的设备信息确定BLE Mesh设备的状态,向BLE Mesh虚拟客户端发送数据读取请求。
910、BLE Mesh虚拟客户端向BLE Mesh设备发送数据读取请求。
911、BLE Mesh虚拟客户端接收BLE Mesh设备返回的状态对应的状态数据。
912、BLE Mesh虚拟客户端向CHIP桥接模块发送状态数据。
913、CHIP桥接模块将状态数据转换为属性数据,向CHIP虚拟服务模块发送属性数据。
914、CHIP虚拟服务模块向终端设备发送属性数据。
图10示出了本申请一个示例性实施例提供的连接建立装置的框图,该装置包括:
关系建立模块1001,用于基于桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立BLE Mesh设备与CHIP虚拟设备之间的映射关系;
连接建立模块1002,用于建立CHIP虚拟设备与终端设备之间的连接;
其中,CHIP虚拟设备和终端设备采用CHIP协议,BLE Mesh设备与终端设备用于基于BLE Mesh设备与CHIP虚拟设备之间的映射关系和CHIP虚拟设备与终端设备之间的连接进行通信。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的设备信息与CHIP虚拟设备的设备信息之间的映射关系。
在一些实施例中,BLE Mesh设备的设备信息包括元素标识、模型标识和状态,元素标识用于表示BLE Mesh设备的实体寻址标识,模型标识用于表示BLE Mesh设备的功能,状态用于表示BLE Mesh设备所处的状态;
CHIP虚拟设备的设备信息包括端点、簇标识和属性标识,端点用于表示CHIP虚拟设备的设备标识,簇标识用于表示CHIP虚拟设备的功能,属性标识用于表示CHIP虚拟设备的属性。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的元素标识与CHIP虚拟设备的端点之间的映射关系。
在一些实施例中,参见图11,关系建立模块1001,包括:
列表确定单元10011,用于确定CHIP虚拟设备的端点列表,端点列表中包括CHIP虚拟设备的至少一个端点;
建立单元10012,用于建立BLE Mesh设备的设备标识与CHIP虚拟设备的端点列表之间的映射关系。
在一些实施例中,映射关系存储于映射关系表中;或者,映射关系存储于桥接设备中。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的模型标识与CHIP虚拟设备的簇标识之间的映射关系。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的状态与CHIP虚拟设备的属性标识之间的映射关系。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的元素标识中的主元素标识与CHIP虚拟设备的端点之间的映射关系。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的元素标识与CHIP虚拟设备的簇标识之间的映射关系。
在一些实施例中,关系建立模块1001,用于建立BLE Mesh设备的模型标识与CHIP虚拟设备的属性标识之间的映射关系。
在一些实施例中,参见图11,接收模块1003,用于基于CHIP虚拟设备与终端设备之间的连接,接收终端设备发送的读取请求,读取请求携带CHIP虚拟设备的第一设备信息,第一设备信息包括端点和簇标识,或者,第一设备信息包括端点、簇标识和属性标识;
信息确定模块1004,用于基于映射关系,确定第一设备信息对应的第二设备信息;
数据确定模块1005,用于确定第二设备信息所属的BLE Mesh设备的状态数据;
转换模块1006,用于将状态数据转换为对应的属性数据;
发送模块1007,用于向终端设备发送属性数据。
在一些实施例中,第一设备信息包括端点和簇标识,信息确定模块1004,用于基于映射关系,确定端点对应的元素标识以及簇标识对应的模型标识;
数据确定模块1005,用于确定模型标识对应的状态的状态数据。
在一些实施例中,设备信息包括端点、簇标识和属性标识,信息确定模块1004,用于基于映射关系,确定端点对应的元素标识、簇标识对应的模型标识以及属性标识对应的状态;
数据确定模块1005,用于确定状态的状态数据。
在一些实施例中,信息确定模块1004,用于确定映射关系中端点所属的端点列表包括的至少一个端点;
发送模块1007,用于向终端设备发送至少一个端点。
在一些实施例中,第一设备信息包括端点、簇标识和属性标识,信息确定模块1004,用于基于映射关系,确定端点对应的主元素标识以及簇标识对应的元素标识以及属性标识对应的模型标识;
数据确定模块1005,用于确定模型标识对应的状态的状态数据。
在一些实施例中,第一设备信息包括端点和簇标识,信息确定模块1004,用于基于映射关系,确定端点对应的主元素标识以及簇标识对应的元素标识;
信息确定模块1004,用于确定元素标识对应的每个模型标识;确定每个模型标识对应的状态的状态数据。
图12示出了本申请一个示例性实施例提供的桥接设备的结构示意图,该桥接设备包括:处理器1201、接收器1202、发射器1203、存储器1204和总线1205。
处理器1201包括一个或者一个以上处理核心,处理器1201通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。
接收器1202和发射器1203可以实现为一个通信组件,该通信组件可以是一块通信芯片。
存储器1204通过总线1205与处理器1201相连。
存储器1204可用于存储至少一个程序代码,处理器1201用于执行该至少一个程序代码,以实现上述方法实施例中的各个步骤。
存储器1204可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:磁盘或光盘,电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),静态随时存取存储器(SRAM),只读存储器(ROM),磁存储器,快闪存储器,可编程只读存储器(PROM)。
在示例性实施例中,还提供了一种计算机可读存储介质,所述可读存储介质中存储有可 执行程序代码,所述可执行程序代码由所述处理器加载并执行以实现上述各个方法实施例提供的由通信设备执行的连接建立方法。
在示例性实施例中,还提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在桥接设备上运行时,用于实现如上述连接建立方法。
在示例性实施例中,还提供了一种计算机程序产品,当所述计算机程序产品被桥接设备的处理器执行时,其用于实现上述连接建立方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (38)

  1. 一种连接建立方法,其特征在于,应用于桥接设备,所述方法包括:
    基于所述桥接设备与蓝牙低功耗网格网络BLE Mesh设备之间的连接,创建紫蜂联盟下通过网际互连协议连接家庭工作组CHIP虚拟设备,并建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系;
    建立所述CHIP虚拟设备与终端设备之间的连接;
    其中,所述CHIP虚拟设备和所述终端设备采用CHIP协议,所述BLE Mesh设备与所述终端设备用于基于所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系和所述CHIP虚拟设备与终端设备之间的连接进行通信。
  2. 根据权利要求1所述的方法,其特征在于,所述建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系,包括:
    建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系。
  3. 根据权利要求2所述的方法,其特征在于,
    所述BLE Mesh设备的设备信息包括元素标识、模型标识和状态,所述元素标识用于表示所述BLE Mesh设备的实体寻址标识,所述模型标识用于表示所述BLE Mesh设备的功能,所述状态用于表示所述BLE Mesh设备所处的状态;
    所述CHIP虚拟设备的设备信息包括端点、簇标识和属性标识,所述端点用于表示所述CHIP虚拟设备的设备标识,所述簇标识用于表示所述CHIP虚拟设备的功能,所述属性标识用于表示所述CHIP虚拟设备的属性。
  4. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的元素标识与所述CHIP虚拟设备的端点之间的映射关系。
  5. 根据权利要求4所述的方法,其特征在于,所述建立所述BLE Mesh设备的元素标识与所述CHIP虚拟设备的端点之间的映射关系,还包括:
    确定所述CHIP虚拟设备的端点列表,所述端点列表中包括所述CHIP虚拟设备的至少一个端点;
    建立所述BLE Mesh设备的设备标识与所述CHIP虚拟设备的端点列表之间的映射关系。
  6. 根据权利要求4所述的方法,其特征在于,所述映射关系存储于映射关系表中;或者,所述映射关系存储于所述桥接设备中。
  7. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的模型标识与所述CHIP虚拟设备的簇标识之间的映射关系。
  8. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的状态与所述CHIP虚拟设备的属性标识之间的映射关系。
  9. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的元素标识中的主元素标识与所述CHIP虚拟设备的端点之间的映射关系。
  10. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的元素标识与所述CHIP虚拟设备的簇标识之间的映射关系。
  11. 根据权利要求3所述的方法,其特征在于,所述建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系,包括:
    建立所述BLE Mesh设备的模型标识与所述CHIP虚拟设备的属性标识之间的映射关系。
  12. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    基于所述CHIP虚拟设备与所述终端设备之间的连接,接收所述终端设备发送的读取请求,所述读取请求携带所述CHIP虚拟设备的第一设备信息,所述第一设备信息包括端点和簇标识,或者,所述第一设备信息包括端点、簇标识和属性标识;
    基于所述映射关系,确定所述第一设备信息对应的第二设备信息;
    确定所述第二设备信息所属的BLE Mesh设备的状态数据;
    将所述状态数据转换为对应的属性数据;
    向所述终端设备发送所述属性数据。
  13. 根据权利要求12所述的方法,其特征在于,所述第一设备信息包括端点和簇标识,所述基于所述映射关系,确定所述第一设备信息对应的第二设备信息,包括:
    基于所述映射关系,确定所述端点对应的元素标识以及所述簇标识对应的模型标识;
    所述确定所述第二设备信息所属的BLE Mesh设备的状态数据,包括:
    确定所述模型标识对应的状态的状态数据。
  14. 根据权利要求12所述的方法,其特征在于,所述第一设备信息包括端点、簇标识和属性标识,所述基于所述映射关系,确定所述第一设备信息对应的第二设备信息,包括:
    基于所述映射关系,确定所述端点对应的元素标识、所述簇标识对应的模型标识以及所述属性标识对应的状态;
    所述确定所述第二设备信息所属的BLE Mesh设备的状态数据,包括:
    确定所述状态的状态数据。
  15. 根据权利要求13或14所述的方法,其特征在于,所述接收所述终端设备发送的读取请求之前,所述方法还包括:
    确定所述映射关系中所述端点所属的端点列表包括的至少一个端点,向所述终端设备发送所述至少一个端点。
  16. 根据权利要求12所述的方法,其特征在于,所述第一设备信息包括端点、簇标识和属性标识,所述基于所述映射关系,确定所述第一设备信息对应的第二设备信息,包括:
    基于所述映射关系,确定所述端点对应的主元素标识以及所述簇标识对应的元素标识以及所述属性标识对应的模型标识;
    所述确定所述第二设备信息所属的BLE Mesh设备的状态数据,包括:
    确定所述模型标识对应的状态的状态数据。
  17. 根据权利要求12所述的方法,其特征在于,所述第一设备信息包括端点和簇标识,所述基于所述映射关系,确定所述第一设备信息对应的第二设备信息,包括:
    基于所述映射关系,确定所述端点对应的主元素标识以及所述簇标识对应的元素标识;
    所述确定所述第二设备信息所属的BLE Mesh设备的状态数据,包括:
    确定所述元素标识对应的每个模型标识;
    确定所述每个模型标识对应的状态的状态数据。
  18. 一种连接建立装置,其特征在于,应用于桥接设备,所述装置包括:
    关系建立模块,用于基于所述桥接设备与BLE Mesh设备之间的连接,创建CHIP虚拟设备,并建立所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系;
    连接建立模块,用于建立所述CHIP虚拟设备与终端设备之间的连接;
    其中,所述CHIP虚拟设备和所述终端设备采用CHIP协议,所述BLE Mesh设备与所述终端设备用于基于所述BLE Mesh设备与所述CHIP虚拟设备之间的映射关系和所述CHIP虚拟设备与终端设备之间的连接进行通信。
  19. 根据权利要求18所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的设备信息与所述CHIP虚拟设备的设备信息之间的映射关系。
  20. 根据权利要求19所述的装置,其特征在于,
    所述BLE Mesh设备的设备信息包括元素标识、模型标识和状态,所述元素标识用于表示所述BLE Mesh设备的实体寻址标识,所述模型标识用于表示所述BLE Mesh设备的功能,所述状态用于表示所述BLE Mesh设备所处的状态;
    所述CHIP虚拟设备的设备信息包括端点、簇标识和属性标识,所述端点用于表示所述CHIP虚拟设备的设备标识,所述簇标识用于表示所述CHIP虚拟设备的功能,所述属性标识用于表示所述CHIP虚拟设备的属性。
  21. 根据权利要求20所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的元素标识与所述CHIP虚拟设备的端点之间的映射关系。
  22. 根据权利要求21所述的装置,其特征在于,所述关系建立模块,包括:
    列表确定单元,用于确定所述CHIP虚拟设备的端点列表,所述端点列表中包括所述CHIP虚拟设备的至少一个端点;
    建立单元,用于建立所述BLE Mesh设备的设备标识与所述CHIP虚拟设备的端点列表之间的映射关系。
  23. 根据权利要求21所述的装置,其特征在于,所述映射关系存储于映射关系表中;或者,所述映射关系存储于所述桥接设备中。
  24. 根据权利要求20所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的模型标识与所述CHIP虚拟设备的簇标识之间的映射关系。
  25. 根据权利要求20所述的装置,其特征在于,关系建立模块,用于建立所述BLE Mesh设备的状态与所述CHIP虚拟设备的属性标识之间的映射关系。
  26. 根据权利要求20所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的元素标识中的主元素标识与所述CHIP虚拟设备的端点之间的映射关系。
  27. 根据权利要求20所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的元素标识与所述CHIP虚拟设备的簇标识之间的映射关系。
  28. 根据权利要求20所述的装置,其特征在于,所述关系建立模块,用于建立所述BLE Mesh设备的模型标识与所述CHIP虚拟设备的属性标识之间的映射关系。
  29. 根据权利要求19所述的装置,其特征在于,所述装置还包括:
    接收模块,用于基于所述CHIP虚拟设备与所述终端设备之间的连接,接收所述终端设备发送的读取请求,所述读取请求携带所述CHIP虚拟设备的第一设备信息,所述第一设备信息包括端点和簇标识,或者,所述第一设备信息包括端点、簇标识和属性标识;
    信息确定模块,用于基于所述映射关系,确定所述第一设备信息对应的第二设备信息;
    数据确定模块,用于确定所述第二设备信息所属的BLE Mesh设备的状态数据;
    转换模块,用于将所述状态数据转换为对应的属性数据;
    发送模块,用于向所述终端设备发送所述属性数据。
  30. 根据权利要求29所述的装置,其特征在于,所述第一设备信息包括端点和簇标识,所述信息确定模块,用于基于所述映射关系,确定所述端点对应的元素标识以及所述簇标识对应的模型标识;
    所述数据确定模块,用于确定所述模型标识对应的状态的状态数据。
  31. 根据权利要求29所述的装置,其特征在于,所述第一设备信息包括端点、簇标识和属性标识,所述信息确定模块,用于基于所述映射关系,确定所述端点对应的元素标识、所述簇标识对应的模型标识以及所述属性标识对应的状态;
    所述数据确定模块,用于确定所述状态的状态数据。
  32. 根据权利要求30或31所述的装置,其特征在于,所述信息确定模块,用于确定所述映射关系中所述端点所属的端点列表包括的至少一个端点;
    所述发送模块,用于向所述终端设备发送所述至少一个端点。
  33. 根据权利要求29所述的装置,其特征在于,所述第一设备信息包括端点、簇标识和属性标识,所述信息确定模块,用于基于所述映射关系,确定所述端点对应的主元素标识以及所述簇标识对应的元素标识以及所述属性标识对应的模型标识;
    所述数据确定模块,用于确定所述模型标识对应的状态的状态数据。
  34. 根据权利要求29所述的装置,其特征在于,所述第一设备信息包括端点和簇标识,所述信息确定模块,用于基于所述映射关系,确定所述端点对应的主元素标识以及所述簇标识对应的元素标识;
    所述信息确定模块,用于确定所述元素标识对应的每个模型标识;确定所述每个模型标识对应的状态的状态数据。
  35. 一种桥接设备,其特征在于,所述桥接设备包括:
    处理器;
    与所述处理器相连的收发器;
    用于存储所述处理器的可执行程序代码的存储器;
    其中,所述处理器被配置为加载并执行所述可执行程序代码以实现如权利要求1至17任一所述的连接建立方法。
  36. 一种计算机可读存储介质,其特征在于,所述可读存储介质中存储有可执行程序代码,所述可执行程序代码由所述处理器加载并执行以实现如权利要求1至17任一所述的连接建立方法。
  37. 一种芯片,其特征在于,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在桥接设备上运行时,用于实现如权利要求1至17任一所述的连接建立方法。
  38. 一种计算机程序产品,其特征在于,当所述计算机程序产品被桥接设备的处理器执行时,其用于实现如权利要求1至17任一所述的连接建立方法。
PCT/CN2020/134023 2020-12-04 2020-12-04 连接建立方法、装置、设备及存储介质 WO2022116191A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/134023 WO2022116191A1 (zh) 2020-12-04 2020-12-04 连接建立方法、装置、设备及存储介质
CN202080107383.6A CN116491222A (zh) 2020-12-04 2020-12-04 连接建立方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/134023 WO2022116191A1 (zh) 2020-12-04 2020-12-04 连接建立方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022116191A1 true WO2022116191A1 (zh) 2022-06-09

Family

ID=81853675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/134023 WO2022116191A1 (zh) 2020-12-04 2020-12-04 连接建立方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN116491222A (zh)
WO (1) WO2022116191A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734893A (zh) * 2015-04-02 2015-06-24 重庆邮电大学 一种面向wia-pa网络的tr069协议管理方法
US20160078698A1 (en) * 2014-09-16 2016-03-17 Honeywell International Inc. System and Method for Auto-Configuration of Devices in BIM Using Bluetooth Low Energy Devices
CN107613501A (zh) * 2017-09-28 2018-01-19 无锡商业职业技术学院 一种增强基站信号的蓝牙网络***
CN108684071A (zh) * 2018-04-25 2018-10-19 东峡大通(北京)管理咨询有限公司 Mesh网络的设备节点的功耗控制方法及***
CN109922150A (zh) * 2019-03-07 2019-06-21 深圳市简智联信息科技有限公司 虚拟设备信息处理方法、装置、物联网关和物联通信***
CN110247940A (zh) * 2018-03-08 2019-09-17 上海仪电(集团)有限公司中央研究院 基于Zigbee和BLE协议自适应智能网关控制***

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160078698A1 (en) * 2014-09-16 2016-03-17 Honeywell International Inc. System and Method for Auto-Configuration of Devices in BIM Using Bluetooth Low Energy Devices
CN104734893A (zh) * 2015-04-02 2015-06-24 重庆邮电大学 一种面向wia-pa网络的tr069协议管理方法
CN107613501A (zh) * 2017-09-28 2018-01-19 无锡商业职业技术学院 一种增强基站信号的蓝牙网络***
CN110247940A (zh) * 2018-03-08 2019-09-17 上海仪电(集团)有限公司中央研究院 基于Zigbee和BLE协议自适应智能网关控制***
CN108684071A (zh) * 2018-04-25 2018-10-19 东峡大通(北京)管理咨询有限公司 Mesh网络的设备节点的功耗控制方法及***
CN109922150A (zh) * 2019-03-07 2019-06-21 深圳市简智联信息科技有限公司 虚拟设备信息处理方法、装置、物联网关和物联通信***

Also Published As

Publication number Publication date
CN116491222A (zh) 2023-07-25

Similar Documents

Publication Publication Date Title
US11108653B2 (en) Network service management method, related apparatus, and system
WO2011137788A1 (zh) 设备管理方法、中间件及机器通信平台、设备和***
CN111416723B (zh) 一种设备管理方法及相关设备
CN113032166B (zh) 核间通信的方法、处理器、核间通信***及计算机可读存储介质
US20160241635A1 (en) M2m data querying and invoking methods, querying and invoking devices, and system
CN115486038B (zh) 物联网配置方法、装置、计算机设备及存储介质
CN111541662B (zh) 一种基于二进制通信协议的通信方法、电子设备及存储介质
WO2015168981A1 (zh) 属性的操作方法及装置
US10887249B2 (en) Resource trees by management controller
CN110417876A (zh) 会话方法、分布式***中的节点服务器及主控设备
WO2022116191A1 (zh) 连接建立方法、装置、设备及存储介质
WO2021102694A1 (zh) BLE Mesh设备的访问方法、装置、设备及存储介质
WO2020220272A1 (zh) 更改资源状态的方法、***、终端及存储介质
CN111740960A (zh) 物联网设备的通信方法、物联网设备及存储介质
CN115174310B (zh) Pdn拨号及配置方法、***、装置、设备及存储介质
CN116886558A (zh) 网络协议测试方法、装置、设备、介质及***
WO2022087795A1 (zh) 资源映射方法、装置、设备及存储介质
CN115442913A (zh) 协议接入方法、通信方法、开发设备、网关及存储介质
CN114900387A (zh) 设备的跨平台融合接入方法、***、网关及存储介质
WO2021057351A1 (zh) 在glibc环境下控制安卓蓝牙的装置、方法及终端设备
CN114531320A (zh) 通信方法、装置、设备、***及计算机可读存储介质
WO2022087796A1 (zh) Zigbee设备的属性订阅方法、装置及设备
CN109768905A (zh) 一种PPPoE报文传输的方法、***、设备及存储介质
WO2022104806A1 (zh) 异构网络设备的控制方法、装置、设备及存储介质
CN113347284B (zh) 资源访问方法、资源访问装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20964037

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202080107383.6

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20964037

Country of ref document: EP

Kind code of ref document: A1